/* Gwine — classic, quiet luxury */
:root {
  --ground: #F6F1E8;
  --paper: #FBF8F2;
  --sand: #EFE8DC;
  --line: #DDD3C3;
  --line-soft: #E4DBCC;
  --ink: #1D1B18;
  --muted: #5E574D;
  --muted-2: #A89E8E;
  --gold: #7A5C24;       /* small gold text on light */
  --gold-light: #C9A96A; /* gold on dark */
  --gold-line: #9C7A3C;
  --dark: #1D1B18;
  --dark-2: #2A2724;
  --accent: #5C1A26;     /* burgundy */
  --serif-en: 'Cormorant Garamond', 'Times New Roman', serif;
  --serif-kr: 'Noto Serif KR', serif;
  --sans: 'Noto Sans KR', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* type */
.eyebrow { font-size: 12px; letter-spacing: 0.3em; color: var(--gold); text-transform: uppercase; }
.eyebrow.on-dark { color: var(--gold-light); }
.h-display { margin: 0; font-family: var(--serif-kr); font-weight: 600; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.3; letter-spacing: -0.01em; }
.h-section { margin: 0; font-family: var(--serif-kr); font-weight: 600; font-size: clamp(26px, 3vw, 38px); line-height: 1.4; }
.h-en { font-family: var(--serif-en); font-weight: 600; line-height: 1.1; }
.lead { margin: 0; font-size: 17px; line-height: 1.8; color: var(--muted); }
.body { margin: 0; font-size: 15px; line-height: 1.9; color: var(--muted); }
.small { font-size: 13px; color: var(--muted); line-height: 1.7; }
.rule { width: 48px; height: 1px; background: var(--gold-line); border: 0; margin: 0; }
.center { text-align: center; }
.section-head { display: flex; flex-direction: column; gap: 16px; }
.section-head.center { align-items: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 32px; font-size: 15px; letter-spacing: 0.04em; text-decoration: none; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-primary:hover { background: #47131D; border-color: #47131D; color: var(--paper); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; }
.link-accent { color: var(--accent); text-decoration: none; font-size: 14px; }
.link-accent:hover { text-decoration: underline; }

/* top bar + header */
.topbar { background: var(--dark); color: #E9E1D3; font-size: 13px; letter-spacing: 0.02em; }
.topbar .wrap { padding-top: 10px; padding-bottom: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 32px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--ground); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.logo { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.logo-word { font-family: var(--serif-en); font-size: 40px; font-weight: 600; line-height: 1; }
.logo-sub { font-size: 10px; letter-spacing: 0.28em; color: var(--gold); }
.main-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }
.main-nav a { text-decoration: none; color: var(--ink); padding: 6px 0; }
.main-nav a[aria-current="page"] { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--ink); cursor: pointer; text-decoration: none; }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.cart-count[hidden] { display: none; }

/* sections */
.section { padding: 112px 0; }
.section-tight { padding: 72px 0; }
.bg-paper { background: var(--paper); border-top: 1px solid var(--line-soft); }
.bg-sand { background: var(--sand); border-top: 1px solid var(--line-soft); }
.bg-dark { background: var(--dark); color: var(--ground); }
.bg-dark .body, .bg-dark .lead { color: #CFC6B8; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; } .gap-56 { gap: 56px; }

/* hero */
.hero { padding: 88px 0 96px; }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-media { flex: 1 1 420px; min-width: 0; height: 520px; background: var(--dark); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-media::after { content: ''; position: absolute; inset: 20px; border: 1px solid #5A4A30; pointer-events: none; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* placeholders */
.ph { background: var(--sand); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); font-size: 13px; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.dark { background: var(--dark-2); color: var(--gold-light); }

/* trust */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.trust .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 32px; }
.trust-item { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }
.trust-num { font-family: var(--serif-en); font-size: 22px; color: var(--gold); }
.trust-item strong { font-size: 16px; font-weight: 500; }

/* cards */
.cards { display: flex; flex-wrap: wrap; gap: 24px; }
.producer-card { flex: 1 1 250px; min-width: 0; background: var(--paper); border: 1px solid var(--line-soft); padding: 36px 28px; display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); }
.producer-card:hover { border-color: var(--gold-line); color: var(--ink); }
.producer-card .tag { font-size: 11px; letter-spacing: 0.24em; color: var(--gold); text-transform: uppercase; }
.producer-card h3 { margin: 0; font-size: 30px; }
.producer-card .kr { font-family: var(--serif-kr); font-size: 15px; color: var(--muted); }
.producer-card p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
.producer-card .more { margin-top: auto; padding-top: 12px; font-size: 14px; color: var(--accent); }

.wine-card { flex: 1 1 250px; min-width: 0; max-width: 100%; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 14px; }
.wine-card:hover { color: var(--ink); }
.wine-card:hover .ph { background: #E8DFD0; }
.wine-card .ph { height: 320px; }
.wine-card .tag { font-size: 11px; letter-spacing: 0.24em; color: var(--gold); text-transform: uppercase; }
.wine-card .name { font-family: var(--serif-en); font-size: 22px; font-weight: 600; line-height: 1.25; }
.wine-card .meta { font-size: 13px; color: var(--muted); }
.wine-card .price { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 17px; font-weight: 500; }
.wine-card .price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; letter-spacing: 0.08em; padding: 4px 8px; border: 1px solid var(--line); color: var(--muted); width: fit-content; }

/* filter pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 14px; }
.pill[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* sets */
.set-card { flex: 1 1 340px; min-width: 0; border: 1px solid #5A4A30; padding: 44px 36px; display: flex; flex-direction: column; gap: 18px; }
.set-card.gold { border-color: var(--gold-light); }
.set-card .big { font-family: var(--serif-en); font-size: 44px; line-height: 1; color: var(--gold-light); }
.set-card strong { font-size: 20px; font-weight: 500; }
.set-card .note { font-size: 14px; color: var(--gold-light); }

/* steps */
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 24px; }
.steps li { flex: 1 1 230px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--ink); }
.steps .n { font-family: var(--serif-en); font-size: 18px; color: var(--gold); }
.steps strong { font-size: 17px; font-weight: 500; }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.input { min-height: 52px; padding: 0 16px; border: 1px solid #A89E8E; background: var(--paper); font-size: 15px; font-family: inherit; color: var(--ink); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.6; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 auto; }

/* product detail */
.pd { padding: 40px 0 96px; }
.pd .wrap { display: flex; flex-wrap: wrap; gap: 56px; }
.pd-media { flex: 1 1 460px; min-width: 0; }
.pd-media .ph { height: 620px; }
.pd-info { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.pd-info h1 { margin: 0; font-size: clamp(34px, 3.4vw, 46px); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.facts div { display: flex; flex-direction: column; gap: 4px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--ink); height: 52px; }
.qty button { width: 48px; background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty button:disabled { opacity: 0.3; cursor: not-allowed; }
.qty output { min-width: 44px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.qty.small-qty { height: 40px; }
.qty.small-qty button { width: 40px; }
.panel { background: var(--paper); border: 1px solid var(--line-soft); padding: 24px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.line { display: flex; justify-content: space-between; gap: 16px; }
.line .k { color: var(--muted); }
.line.total { padding-top: 14px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 500; }
.notice { font-size: 13px; line-height: 1.7; color: var(--muted); }
.msg { font-size: 14px; color: var(--accent); min-height: 1.4em; }

/* producer page */
.p-hero { background: var(--dark-2); color: var(--ground); position: relative; overflow: hidden; }
.p-hero .bg { position: absolute; inset: 0; }
.p-hero .bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.p-hero .wrap { position: relative; min-height: 560px; padding-top: 24px; padding-bottom: 72px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.p-hero h1 { margin: 0; font-size: clamp(48px, 6vw, 88px); line-height: 1; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: inherit; }
.p-hero .crumbs { color: var(--gold-light); }
.kv { margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.gallery { display: flex; flex-wrap: wrap; gap: 16px; }
.gallery .main { flex: 2 1 480px; min-width: 0; height: 360px; }
.gallery .side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gallery .side .ph { flex: 1 1 172px; }

/* cart */
.cart-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.cart-items { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.cart-summary { flex: 1 1 340px; min-width: 0; }
.cart-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.cart-row .ph { width: 88px; height: 120px; flex: 0 0 auto; }
.cart-row .info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cart-row .info .name { font-family: var(--serif-en); font-size: 20px; font-weight: 600; line-height: 1.25; text-decoration: none; color: var(--ink); }
.cart-row .line-price { min-width: 96px; text-align: right; font-weight: 500; }
.remove { background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 4px; }

/* guide */
.g-card { background: var(--paper); border: 1px solid var(--line-soft); padding: 40px 36px; display: flex; flex-direction: column; gap: 16px; }
.g-card .n { font-family: var(--serif-en); font-size: 20px; color: var(--gold); }
.g-card h2 { margin: 0; font-family: var(--serif-kr); font-weight: 600; font-size: 24px; }
.g-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table.tax { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; }
table.tax th { text-align: left; padding: 12px 8px; font-weight: 500; border-bottom: 1px solid var(--ink); }
table.tax td { padding: 14px 8px; border-bottom: 1px solid var(--line-soft); }
table.tax td:last-child { color: var(--muted); }
.faq { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-top: 1px solid var(--line); }
.faq strong { font-size: 15px; font-weight: 500; }

/* footer */
.site-footer { background: var(--dark); color: #CFC6B8; }
.site-footer .wrap { padding-top: 72px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 48px; }
.f-cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.f-col { flex: 1 1 200px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.6; }
.f-col strong { color: var(--ground); font-weight: 500; font-size: 14px; }
.f-brand { flex: 1 1 260px; }
.f-brand .logo-word { color: var(--ground); font-size: 36px; }
.f-bottom { border-top: 1px solid #3A3631; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 12px; line-height: 1.7; color: var(--muted-2); }
.f-bottom a { color: #CFC6B8; }
.f-bottom nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* age gate */
.gate { position: fixed; inset: 0; z-index: 100; background: rgba(29, 27, 24, 0.92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate[hidden] { display: none; }
.gate-box { background: var(--ground); max-width: 440px; width: 100%; padding: 48px 36px; display: flex; flex-direction: column; gap: 20px; text-align: center; align-items: center; }
.gate-box .logo-word { font-size: 44px; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.gate-actions .btn { flex: 1 1 160px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 14px 22px; font-size: 14px; z-index: 50; max-width: calc(100% - 48px); }
.toast[hidden] { display: none; }

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 64px; }
  .hero-media { height: 380px; }
  .pd-media .ph { height: 440px; }
  .site-header { position: static; }
  .topbar .wrap { gap: 4px 16px; font-size: 12px; }
  .site-header .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding-top: 14px; padding-bottom: 8px; }
  .logo { grid-column: 1; grid-row: 1; }
  .logo-word { font-size: 34px; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto; gap: 22px; white-space: nowrap; padding-bottom: 4px; }
}
