/* ===== デザイントークン ===== */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #2b2b2b;
  --muted: #8a857d;
  --line: #e7e2da;
  --accent: #b4744a;
  --accent-dark: #8f5836;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --wrap: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ===== ヘッダー ===== */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.logo { font-weight: 800; letter-spacing: 0.08em; font-size: 20px; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 20px; margin-left: 8px; font-size: 14px; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.header-spacer { flex: 1; }
.cart-link { position: relative; font-size: 22px; }
.cart-badge {
  position: absolute; top: -8px; right: -10px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
}

/* ===== ヒーロー ===== */
.hero {
  background: linear-gradient(120deg, #efe6da, #e4d5c3);
  padding: 72px 0;
  margin-bottom: 40px;
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 12px; }
.hero p { color: var(--muted); margin: 0 0 24px; max-width: 460px; }

/* ===== ボタン ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; font-size: 15px;
  transition: transform 0.05s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: #f2ede6; }

/* ===== セクション見出し ===== */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 20px; }
.section-head h2 { font-size: 22px; margin: 0; }
.section-head small { color: var(--muted); }

/* ===== 商品グリッド ===== */
.grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin-bottom: 64px;
}
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); }
.card__thumb { aspect-ratio: 1; background: #f0ece5; }
.card__body { padding: 14px 16px 18px; }
.card__cat { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.card__name { font-size: 15px; margin: 4px 0 8px; }
.card__price { font-weight: 700; color: var(--accent-dark); }

/* ===== 商品詳細 ===== */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0 80px; }
.detail__media { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #f0ece5; }
.detail__info h1 { font-size: 28px; margin: 8px 0 12px; }
.detail__price { font-size: 24px; font-weight: 700; color: var(--accent-dark); margin: 0 0 20px; }
.detail__price .tax { font-size: 13px; color: var(--muted); font-weight: 400; }
.detail__desc { color: #4d4a45; margin-bottom: 28px; }
.detail__info .btn { margin-right: 12px; }

/* ===== カート ===== */
.cart { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding: 32px 0 80px; align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 8px; }
.cart-row {
  display: grid; grid-template-columns: 72px 1fr auto auto auto;
  align-items: center; gap: 16px;
  background: var(--surface); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow);
}
.cart-row img { width: 72px; height: 72px; border-radius: 8px; }
.cart-row__name small { display: block; color: var(--muted); font-size: 12px; }
.cart-row__qty { display: flex; align-items: center; gap: 10px; }
.step {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 16px; line-height: 1;
}
.step:hover { background: #f2ede6; }
.cart-row__price { font-weight: 700; min-width: 88px; text-align: right; }
.cart-row__remove { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 16px; }
.cart-row__remove:hover { color: var(--accent); }
.cart-summary { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: sticky; top: 84px; }
.cart-summary__line { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 8px; }
.cart-summary__note { font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.cart-summary .btn { width: 100%; margin-bottom: 10px; }

.empty { text-align: center; color: var(--muted); padding: 80px 0; }
.empty a { color: var(--accent); text-decoration: underline; }

/* ===== フッター ===== */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 13px; text-align: center; }

/* ===== トースト ===== */
#toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.2s ease; z-index: 50;
}
#toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ===== レスポンシブ ===== */
@media (max-width: 720px) {
  .nav { display: none; }
  .detail, .cart { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-row { grid-template-columns: 56px 1fr auto; row-gap: 8px; }
  .cart-row img { width: 56px; height: 56px; }
  .cart-row__price { grid-column: 2 / 4; text-align: left; }
}
