/* ── リセット・基盤 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --color-primary: #2c6e49;
  --color-primary-dark: #1b4332;
  --color-secondary: #6c757d;
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-border: #dee2e6;
  --color-text: #212529;
  --color-text-light: #6c757d;
  --color-error: #dc3545;
  --color-member: #0d6efd;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── ヘッダー ── */
.site-header {
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0 1rem;
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-logo {
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
}
.header-nav { display: flex; gap: 1rem; align-items: center; }
.header-nav a { color: #cfe2ff; font-size: .9rem; }
.member-badge {
  background: rgba(255,255,255,.15);
  padding: .2rem .6rem;
  border-radius: 4px;
  font-size: .85rem;
}

/* ── メイン ── */
.main-content {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ── フッター ── */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-primary-dark);
  color: #adb5bd;
  font-size: .85rem;
  margin-top: auto;
}

/* ── ボタン ── */
.btn {
  display: inline-block;
  padding: .55rem 1.4rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: .95rem;
  font-family: inherit;
  text-decoration: none;
  transition: background .2s, opacity .2s;
  line-height: 1.5;
}
.btn-primary   { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--color-secondary); color: #fff; }
.btn-ghost     { background: transparent; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn-ghost:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.btn-block     { width: 100%; text-align: center; }
.btn-lg        { padding: .8rem 2rem; font-size: 1.05rem; }
.btn-sm        { padding: .3rem .8rem; font-size: .85rem; }

/* ── アラート ── */
.alert { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-error { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}
.hero h1 { font-size: 2rem; color: var(--color-primary-dark); margin-bottom: .5rem; }
.hero-sub { color: var(--color-text-light); margin-bottom: 2rem; }

.cta-box {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}
.cta-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}
.cta-item h2 { font-size: 1.1rem; margin-bottom: .5rem; color: var(--color-primary-dark); }
.cta-item p { font-size: .9rem; color: var(--color-text-light); margin-bottom: 1rem; }
.cta-divider {
  display: flex;
  align-items: center;
  color: var(--color-text-light);
  font-size: .9rem;
}
.member-welcome { background: #d1e7dd; border-radius: var(--radius); padding: 1.5rem; display: inline-block; }
.member-welcome p { margin-bottom: 1rem; }

/* ── フロー説明 ── */
.info-section { margin-top: 3rem; }
.info-section h2 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--color-primary-dark); }
.flow-list {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.flow-list li {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1rem;
  flex: 1;
  min-width: 120px;
  text-align: center;
  box-shadow: var(--shadow);
  font-size: .9rem;
}
.flow-num {
  display: block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: bold;
  margin: 0 auto .5rem;
}
.info-note { margin-top: 1rem; font-size: .85rem; color: var(--color-text-light); }

/* ── フォームページ ── */
.form-page { max-width: 680px; margin: 0 auto; }
.form-page h1 { font-size: 1.4rem; margin-bottom: 1.5rem; color: var(--color-primary-dark); }
.form-desc { color: var(--color-text-light); margin-bottom: 1.5rem; }

.card-form {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: .4rem;
  font-size: .9rem;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-select {
  width: 100%;
  padding: .55rem .8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}
.form-group input:focus, .form-select:focus {
  outline: 2px solid var(--color-primary);
  border-color: var(--color-primary);
}
.form-hint { font-size: .8rem; color: var(--color-text-light); margin-top: .3rem; display: block; }
.form-note { margin-top: 1rem; font-size: .9rem; color: var(--color-text-light); }
.required { color: var(--color-error); font-size: .8rem; font-weight: normal; }
.form-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ── ラジオボタン ── */
.payment-fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.2rem; }
.payment-fieldset legend { font-weight: bold; font-size: .9rem; padding: 0 .4rem; }
.radio-label { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; cursor: pointer; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }

/* ── ステップインジケーター ── */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  flex-shrink: 0;
}
.step-no {
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  background: var(--color-border);
  color: var(--color-text-light);
  font-weight: bold;
  text-align: center;
  font-size: .9rem;
}
.step.active .step-no { background: var(--color-primary); color: #fff; }
.step.done .step-no   { background: #198754; color: #fff; }
.step-label { font-size: .75rem; color: var(--color-text-light); }
.step.active .step-label { color: var(--color-primary); font-weight: bold; }
.step-line { flex: 1; height: 2px; background: var(--color-border); margin: 0 .3rem; margin-bottom: 1rem; }

/* ── 商品グリッド ── */
.product-category {
  font-size: 1rem;
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: .3rem;
  margin: 1.5rem 0 1rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.product-name { font-weight: bold; margin-bottom: .4rem; font-size: .95rem; }
.product-price { margin-bottom: .6rem; }
.price-member { color: var(--color-member); font-weight: bold; font-size: 1.05rem; }
.price-original { color: var(--color-text-light); font-size: .8rem; }
.price-normal { font-size: 1.05rem; }
.product-qty label { font-size: .85rem; margin-right: .4rem; }
.qty-input { width: 70px; padding: .3rem .5rem; text-align: center; border: 1px solid var(--color-border); border-radius: 4px; }
.member-notice { background: #d1e7dd; color: #0a3622; padding: .6rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.guest-notice  { background: #fff3cd; color: #664d03; padding: .6rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }

/* ── 確認テーブル ── */
.confirm-section { margin-bottom: 1.5rem; }
.confirm-section h2 { font-size: 1rem; color: var(--color-primary-dark); margin-bottom: .6rem; border-left: 4px solid var(--color-primary); padding-left: .6rem; }
.confirm-table { width: 100%; border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.confirm-table th, .confirm-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--color-border); font-size: .9rem; }
.confirm-table th { background: #f1f3f5; width: 35%; text-align: left; font-weight: bold; }
.items-table th, .items-table td { text-align: left; }
.items-table tfoot th, .items-table tfoot td { background: #f1f3f5; }
.total-price { font-size: 1.1rem; font-weight: bold; color: var(--color-primary-dark); }
.text-right  { text-align: right !important; }
.text-center { text-align: center !important; }
.confirm-intro { color: var(--color-text-light); margin-bottom: 1.5rem; }
.member-price-note { font-size: .85rem; color: var(--color-member); margin-top: .4rem; }

/* ── 完了ページ ── */
.complete-page { text-align: center; }
.complete-icon { font-size: 4rem; margin-bottom: 1rem; }
.complete-msg { color: var(--color-text-light); margin-bottom: 2rem; }
.contact-note { margin-top: 2rem; font-size: .9rem; color: var(--color-text-light); }

/* ── レスポンシブ ── */
@media (max-width: 600px) {
  .cta-box { flex-direction: column; }
  .flow-list { flex-direction: column; }
  .card-form { padding: 1.2rem; }
  .product-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 追加スタイル（改修版） ── */

/* 式場住所入力 */
#venue-address-group { animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; } }

/* スクロール固定合計バー */
.sticky-total {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary-dark);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .7rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.sticky-total-label { font-size: .9rem; opacity: .85; }
.sticky-total-amount { font-size: 1.4rem; font-weight: bold; }

/* 商品カード（写真あり） */
.product-card {
  display: flex;
  flex-direction: column;
}
.product-img-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  background: #f1f3f5;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.product-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: .85rem;
}
.product-info { padding: .8rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.product-name { font-weight: bold; font-size: .95rem; }
.product-price { }
.price-member { color: var(--color-member); font-weight: bold; }
.price-original { color: var(--color-text-light); font-size: .8rem; text-decoration: line-through; margin-left: .3rem; }

/* フォーム区切り */
.form-divider { border: none; border-top: 1px solid var(--color-border); margin: 1.5rem 0; }
.form-section-title { font-size: 1rem; color: var(--color-primary-dark); margin-bottom: 1rem; }
.form-hint-block { font-size: .85rem; color: var(--color-text-light); margin-bottom: 1rem; }

/* 振込先情報 */
.bank-info-box {
  background: #f0f4ff;
  border: 1px solid #b6c8ff;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: .5rem;
  margin-bottom: 1rem;
}
.bank-info-box h3 { font-size: .95rem; margin-bottom: .6rem; color: #1a3a8f; }
.bank-item + .bank-item { margin-top: .6rem; border-top: 1px solid #d0d8ff; padding-top: .6rem; }
.bank-label { font-weight: bold; font-size: .85rem; }
.bank-detail { font-size: .9rem; color: var(--color-text); }

/* アラートsuccess */
.alert-success { background: #d1e7dd; color: #0a3622; border: 1px solid #a3cfbb; }

/* ── 商品券セクション ── */
.gift-cert-section { margin-top: 1rem; }
.gift-cert-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 1.2rem;
}
.gift-cert-note {
  font-size: .85rem;
  color: #b45309;
  margin-bottom: 1rem;
  line-height: 1.7;
}
.gift-cert-input label {
  font-weight: bold;
  font-size: .9rem;
  display: block;
  margin-bottom: .5rem;
}
.gift-cert-select { max-width: 360px; font-size: 1rem; }

/* ── カテゴリショートカット ────────────────────────────── */
.category-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.2rem;
  padding: .8rem 1rem;
  background: var(--color-bg-light, #f8f9fa);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.cat-shortcut-btn {
  display: inline-block;
  padding: .35rem .9rem;
  background: #fff;
  border: 1px solid var(--color-primary, #1a3a8f);
  border-radius: 2rem;
  color: var(--color-primary, #1a3a8f);
  font-size: .85rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.cat-shortcut-btn:hover {
  background: var(--color-primary, #1a3a8f);
  color: #fff;
}

/* ── カテゴリ折りたたみ ────────────────────────────────── */
.category-section {
  margin-bottom: 1.5rem;
}
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: .3rem 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: .8rem;
}
.category-header:hover .product-category {
  color: var(--color-primary, #1a3a8f);
}
.cat-toggle-icon {
  font-size: .9rem;
  color: var(--color-text-light, #888);
  margin-left: .5rem;
  flex-shrink: 0;
}
.category-body {
  overflow: hidden;
  transition: opacity .2s;
}
.category-body.cat-collapsed {
  display: none;
}

/* ── 管理画面：削除ボタン ──────────────────────────────── */
.btn-danger {
  background: #dc3545;
  color: #fff;
  border: none;
}
.btn-danger:hover {
  background: #b02a37;
}

/* カテゴリ初期折りたたみ */
.category-body {
  display: none;
}
.category-body.cat-open {
  display: block;
}

/* 商品券同意チェックボックス */
.gift-cert-agree-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .6rem;
  font-size: .95rem;
  font-weight: bold;
  color: #c0392b;
  cursor: pointer;
}
.gift-cert-agree-label input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

/* ── カゴUI ────────────────────────────────────────────── */
.btn-cart-add {
  width: 100%;
  padding: .5rem;
  background: var(--color-primary, #1a3a8f);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .9rem;
  cursor: pointer;
  margin-top: .4rem;
  transition: background .15s;
}
.btn-cart-add:hover { background: var(--color-primary-dark, #122a6a); }

.cart-in-area {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .4rem;
}
.cart-qty-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  background: #f1f3f5;
  border-radius: var(--radius);
  padding: .3rem .6rem;
}
.btn-qty-minus, .btn-qty-plus {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-qty-minus:hover, .btn-qty-plus:hover { background: #e9ecef; }
.cart-qty-display {
  font-size: 1.1rem;
  font-weight: bold;
  min-width: 2rem;
  text-align: center;
}
.btn-cart-remove {
  width: 100%;
  padding: .4rem;
  background: #fff;
  color: #dc3545;
  border: 1px solid #dc3545;
  border-radius: var(--radius);
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-cart-remove:hover { background: #dc3545; color: #fff; }

/* 商品説明文 */
.product-description {
  font-size: .82rem;
  color: var(--color-text-light, #666);
  line-height: 1.5;
  margin-bottom: .3rem;
}

/* 数量限定・SOLD OUT */
.product-soldout {
  opacity: 0.6;
}
.soldout-badge {
  width: 100%;
  padding: .5rem;
  background: #6c757d;
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  font-weight: bold;
  font-size: .9rem;
  margin-top: .4rem;
}
.stock-remaining {
  text-align: center;
  font-size: .82rem;
  color: #c0392b;
  font-weight: bold;
  margin-top: .3rem;
}
