/* ===== カテゴリタブ ===== */
.category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.cat-tab {
  padding: 8px 18px;
  border: 2px solid var(--clr-border);
  border-radius: 20px;
  background: #fff;
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-tab:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}
.cat-tab.active {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}
.tab-badge {
  background: var(--clr-accent);
  color: #fff;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.tab-badge:empty { display: none; }

/* ===== モーダル画像（2枚対応） ===== */
.modal-imgs {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #f5f5f0;
  justify-content: center;
  align-items: flex-start;
}
.modal-img {
  flex: 1;
  max-width: calc(50% - 4px);
  max-height: 70vh;
  object-fit: contain;
  display: block;
}
.modal-imgs .modal-img:only-child {
  max-width: 100%;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:       #f7f5f0;
  --clr-surface:  #ffffff;
  --clr-primary:  #1a5276;
  --clr-accent:   #c0392b;
  --clr-border:   #d5cfc6;
  --clr-text:     #2c2c2c;
  --clr-muted:    #777;
  --clr-tag:      #eaf1f8;
  --radius:       6px;
  --shadow:       0 2px 8px rgba(0,0,0,.08);
  --font-head:    'Noto Serif JP', serif;
  --font-body:    'Noto Sans JP', sans-serif;
}

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
}

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@600;700&display=swap');

/* ===== Header ===== */
header {
  background: var(--clr-primary);
  color: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
header h1 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  letter-spacing: .05em;
}
header nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .85rem;
  border: 1px solid rgba(255,255,255,.35);
  padding: 5px 14px;
  border-radius: var(--radius);
  transition: background .2s;
}
header nav a:hover { background: rgba(255,255,255,.15); }

/* ===== Steps ===== */
.steps {
  display: flex;
  justify-content: center;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--clr-border);
  padding: 14px 0;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--clr-muted);
  padding: 0 20px;
  position: relative;
}
.step:not(:last-child)::after {
  content: '›';
  position: absolute;
  right: -4px;
  font-size: 1.2rem;
  color: var(--clr-border);
}
.step.active { color: var(--clr-primary); font-weight: 700; }
.step.done { color: #27ae60; }
.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .75rem;
  font-weight: 700;
  background: var(--clr-border);
  color: #fff;
}
.step.active .step-num { background: var(--clr-primary); }
.step.done   .step-num { background: #27ae60; }

/* ===== Main Layout ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ===== Section Title ===== */
.section-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--clr-primary);
  border-left: 4px solid var(--clr-primary);
  padding-left: 12px;
  margin-bottom: 8px;
}
.section-desc {
  font-size: .85rem;
  color: var(--clr-muted);
  margin-bottom: 28px;
  margin-left: 16px;
}

/* ===== Notice Box ===== */
.notice {
  background: var(--clr-tag);
  border: 1px solid #aac4de;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .85rem;
  line-height: 1.7;
  margin-bottom: 32px;
}
.notice strong { color: var(--clr-primary); }

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.product-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.product-card .img-wrap {
  background: #f0ece5;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.product-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
  transition: opacity .2s;
}
.product-card .img-wrap .dummy-img {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e8f4f8 0%, #d6e8f0 100%);
  gap: 10px;
}
.product-card .img-wrap .dummy-img .lf-num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--clr-primary);
  opacity: .7;
}
.product-card .img-wrap .dummy-img .lf-title {
  font-size: .7rem;
  color: var(--clr-primary);
  opacity: .6;
  text-align: center;
  padding: 0 8px;
  line-height: 1.4;
}
.product-card .img-wrap .zoom-icon {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(255,255,255,.8);
  border-radius: 4px;
  padding: 3px 5px;
  font-size: .7rem;
  color: var(--clr-muted);
  opacity: 0;
  transition: opacity .2s;
}
.product-card .img-wrap:hover .zoom-icon { opacity: 1; }

.product-card .card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-card .card-num {
  font-size: .72rem;
  color: #fff;
  background: var(--clr-primary);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 700;
  width: fit-content;
}
.product-card .card-name {
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
}
.product-card .card-price {
  font-size: .75rem;
  color: var(--clr-muted);
}
.product-card .card-price strong {
  color: var(--clr-accent);
  font-size: .9rem;
}
.product-card select {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: .85rem;
  font-family: var(--font-body);
  background: #fff;
  color: var(--clr-text);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.product-card select:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(26,82,118,.12);
}
.product-card select.has-value {
  border-color: var(--clr-primary);
  background: var(--clr-tag);
  font-weight: 700;
  color: var(--clr-primary);
}

/* ===== Sticky Cart ===== */
.sticky-cart {
  position: sticky;
  bottom: 0;
  background: var(--clr-primary);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 -3px 12px rgba(0,0,0,.15);
  z-index: 100;
  flex-wrap: wrap;
}
.sticky-cart .cart-info {
  display: flex;
  gap: 24px;
  font-size: .9rem;
  flex-wrap: wrap;
}
.sticky-cart .cart-info span { opacity: .8; }
.sticky-cart .cart-info strong { font-size: 1.05rem; }
.cart-total-label { font-size: .8rem; opacity: .7; display: block; }
.cart-total-val { font-family: var(--font-head); font-size: 1.4rem; letter-spacing: .02em; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, opacity .2s, transform .1s;
  border: none;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: #fff;
  color: var(--clr-primary);
}
.btn-primary:hover { background: #e8f4f8; }
.btn-primary:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}
.btn-accent {
  background: var(--clr-accent);
  color: #fff;
}
.btn-accent:hover { background: #a93226; }
.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);
}
.btn-outline:hover { background: var(--clr-tag); }

/* ===== Confirm / Complete Pages ===== */
.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.card h2 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--clr-primary);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--clr-border);
}

table.order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
table.order-table th,
table.order-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--clr-border);
}
table.order-table th {
  background: var(--clr-tag);
  color: var(--clr-primary);
  font-weight: 700;
  white-space: nowrap;
}
table.order-table tr:last-child td { border-bottom: none; }
table.order-table .num { text-align: right; }

.total-box {
  background: var(--clr-tag);
  border: 1px solid #aac4de;
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-top: 8px;
}
.total-box table { width: 100%; }
.total-box td { padding: 5px 8px; font-size: .9rem; }
.total-box td:last-child { text-align: right; font-weight: 500; }
.total-box .grand-total td { 
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--clr-accent);
  font-weight: 700;
  border-top: 2px solid var(--clr-border);
  padding-top: 12px;
}

.info-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.info-table th {
  width: 140px;
  text-align: left;
  padding: 10px 12px;
  background: var(--clr-tag);
  color: var(--clr-primary);
  font-weight: 700;
  border-bottom: 1px solid var(--clr-border);
  vertical-align: top;
}
.info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--clr-border);
}

/* ===== Form ===== */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--clr-text);
}
.form-group label .req {
  color: var(--clr-accent);
  margin-left: 4px;
  font-size: .75rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(26,82,118,.1);
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-group .hint { font-size: .78rem; color: var(--clr-muted); margin-top: 4px; }

/* ===== Actions ===== */
.form-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ===== Complete ===== */
.complete-icon {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 16px;
}
.complete-msg {
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 24px;
}
.complete-msg strong { color: var(--clr-primary); }

/* ===== Footer ===== */
footer {
  text-align: center;
  font-size: .78rem;
  color: var(--clr-muted);
  padding: 24px;
  border-top: 1px solid var(--clr-border);
  margin-top: 40px;
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 8px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
  animation: modal-in .2s ease;
}
@keyframes modal-in {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.modal-header {
  background: var(--clr-primary);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: .9rem;
}
.modal-close {
  background: none; border: none; color: #fff;
  font-size: 1.2rem; cursor: pointer; line-height: 1;
  opacity: .7; transition: opacity .2s;
}
.modal-close:hover { opacity: 1; }
.modal-body { padding: 0; }
.modal-body .modal-dummy {
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e8f4f8 0%, #d6e8f0 100%);
  gap: 16px;
}
.modal-body .modal-dummy .lf-num-lg {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 700;
  color: var(--clr-primary);
  opacity: .65;
}
.modal-body .modal-dummy .lf-title-lg {
  font-size: 1rem;
  color: var(--clr-primary);
  opacity: .55;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sticky-cart { flex-direction: column; align-items: flex-start; }
  .steps { gap: 0; overflow-x: auto; padding: 12px 8px; }
  .step { padding: 0 10px; font-size: .72rem; white-space: nowrap; }
  .card { padding: 18px 16px; }
  .info-table th { width: 100px; }
}
