/* ==================================================================
   80 VINTACE — stylesheet
   ================================================================== */
:root {
  --paper: #f6f1e6;
  --paper-2: #efe7d7;
  --card: #fffdf7;
  --ink: #241d14;
  --ink-soft: #5c5245;
  --ink-mute: #8b8072;
  --brass: #a97b32;
  --brass-dark: #7d5a20;
  --brass-soft: #e8d7b6;
  --forest: #3d5b4a;
  --rust: #a4402c;
  --line: #ddd1ba;
  --shadow: 0 1px 2px rgba(60, 45, 25, .06), 0 8px 24px rgba(60, 45, 25, .07);
  --shadow-lg: 0 4px 12px rgba(60, 45, 25, .1), 0 24px 48px rgba(60, 45, 25, .12);
  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1180px;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, "Noto Serif Thai", serif;
  --sans: "Sukhumvit Set", "Noto Sans Thai", "Prompt", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(169, 123, 50, .06), transparent 45%),
    radial-gradient(circle at 88% 0%, rgba(61, 91, 74, .05), transparent 40%);
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; letter-spacing: .2px; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brass-dark); text-decoration: none; }
a:hover { color: var(--rust); }
img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.muted { color: var(--ink-mute); }
.small { font-size: .86rem; }
.center { text-align: center; }
.right { text-align: right; }
.mono { font-family: "SF Mono", "JetBrains Mono", Consolas, monospace; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }

.eyebrow {
  font-size: .75rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass-dark); font-weight: 600; margin-bottom: 10px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246, 241, 230, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar { background: var(--ink); color: var(--paper-2); font-size: .78rem; letter-spacing: .04em; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topbar a { color: var(--brass-soft); }
.header-main { display: flex; align-items: center; gap: 18px; padding: 14px 20px; max-width: var(--wrap); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--brass); color: var(--brass-dark);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  background: linear-gradient(160deg, #fffaf0, #eadfc7);
}
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; letter-spacing: .16em; color: var(--ink); line-height: 1; }
.brand-sub { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); }
.nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  padding: 8px 12px; border-radius: 999px; color: var(--ink-soft);
  font-size: .93rem; font-weight: 500; transition: .18s;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.active { background: var(--ink); color: var(--paper); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  display: grid; place-items: center; font-size: 1.05rem; color: var(--ink); transition: .18s;
}
.icon-btn:hover { border-color: var(--brass); background: #fff; }
.cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--rust); color: #fff;
  font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .menu-toggle { display: grid; }
  .nav {
    display: none; width: 100%; order: 5; flex-direction: column; gap: 2px;
    padding: 10px 0 4px; border-top: 1px solid var(--line); margin-left: 0;
  }
  .nav.open { display: flex; }
  .header-main { flex-wrap: wrap; }
  .header-actions { margin-left: auto; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--sans); font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: .18s; text-align: center; line-height: 1.2;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #3a2e21; color: #fff; transform: translateY(-1px); }
.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover { background: var(--brass-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brass); background: var(--card); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  background: var(--brass-soft); color: var(--brass-dark);
}
.badge-rust { background: #f3ddd7; color: var(--rust); }
.badge-forest { background: #dbe6de; color: var(--forest); }
.badge-ink { background: var(--ink); color: var(--paper); }
.pill {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: .88rem; font-family: var(--sans); color: var(--ink-soft);
}
.pill:hover { border-color: var(--brass); }
.pill.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.card-flat { box-shadow: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, #f0e6d3 0%, #f7f2e8 45%, #e9e3d3 100%);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-top: 60px; padding-bottom: 60px; }
.hero h1 { margin-bottom: 18px; }
.hero p.lead { font-size: 1.06rem; color: var(--ink-soft); max-width: 46ch; }
.hero-art {
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: #fff;
}
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--brass-dark); }
.hero-stats span { font-size: .82rem; color: var(--ink-mute); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ---------- product grid ---------- */
.grid-products {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px;
}
.product-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .2s; position: relative;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brass-soft); }
.product-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; display: block; }
.product-thumb svg { width: 100%; height: 100%; display: block; }
.product-flag { position: absolute; top: 10px; left: 10px; z-index: 2; }
.product-body { padding: 15px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.product-name { font-family: var(--serif); font-size: 1.08rem; line-height: 1.35; margin: 0; }
.product-name a { color: var(--ink); }
.product-name a:hover { color: var(--brass-dark); }
.product-meta { font-size: .8rem; color: var(--ink-mute); }
.price { font-family: var(--sans); font-size: 1.25rem; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.price-old { font-size: .88rem; color: var(--ink-mute); text-decoration: line-through; margin-left: 6px; font-family: var(--sans); }
.product-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.product-actions .btn { flex: 1; padding: 10px 12px; font-size: .87rem; }


/* ---------- รูปถ่ายสินค้า ---------- */
.product-thumb img.photo, .line-thumb img.photo, .main-image img.photo, .hero-art img.photo, .cat-card img.photo {
  width: 100%; height: 100%; object-fit: cover; display: block; background: var(--paper-2);
}
.product-card:hover .product-thumb img.photo { transform: scale(1.03); }
.product-thumb img.photo { transition: transform .35s ease; }
.credit-list { list-style: none; padding: 0; margin: 0; font-size: .86rem; }
.credit-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.credit-list img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* ---------- filters ---------- */
.toolbar {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 26px;
}
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field .req { color: var(--rust); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fffefa; font-family: var(--sans); font-size: .95rem; color: var(--ink); transition: .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(169, 123, 50, .15); }
textarea { min-height: 92px; resize: vertical; }
.field-error { display: none; color: var(--rust); font-size: .8rem; margin-top: 4px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--rust); background: #fdf6f4; }
.field.invalid .field-error { display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fffefa;
  cursor: pointer; margin-bottom: 10px; transition: .15s;
}
.choice:hover { border-color: var(--brass); }
.choice.selected { border-color: var(--brass); background: #fdf7ea; box-shadow: 0 0 0 2px rgba(169, 123, 50, .12); }
.choice input { margin-top: 4px; accent-color: var(--brass-dark); }
.choice b { display: block; font-size: .95rem; }
.choice small { color: var(--ink-mute); }
.choice .fee { margin-left: auto; font-weight: 700; white-space: nowrap; }

/* ---------- layout helpers ---------- */
.layout-2 { display: grid; grid-template-columns: 1.6fr .9fr; gap: 28px; align-items: start; }
@media (max-width: 940px) { .layout-2 { grid-template-columns: 1fr; } }
.sticky-side { position: sticky; top: 96px; }

/* ---------- cart / summary tables ---------- */
.line-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line-item:last-child { border-bottom: 0; }
.line-thumb { width: 92px; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.line-thumb svg { width: 100%; height: 100%; display: block; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; font-size: 1rem; color: var(--ink); }
.qty button:hover { background: var(--paper-2); }
.qty span { min-width: 34px; text-align: center; font-weight: 600; font-size: .9rem; }
.link-danger { color: var(--rust); background: none; border: 0; cursor: pointer; font-size: .82rem; padding: 0; font-family: var(--sans); }
.link-danger:hover { text-decoration: underline; }

.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .94rem; }
.summary-row.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.1rem; font-weight: 700; }

/* ---------- steps ---------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.step { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-mute); }
.step i {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-2); color: var(--ink-mute); font-style: normal; font-size: .8rem; font-weight: 700;
  border: 1px solid var(--line);
}
.step.done i { background: var(--forest); color: #fff; border-color: var(--forest); }
.step.active i { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.step.active { color: var(--ink); font-weight: 600; }
.step::after { content: "›"; margin-left: 8px; color: var(--line); }
.step:last-child::after { content: ""; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.tab {
  padding: 11px 18px; border: 1px solid transparent; border-bottom: 0; background: transparent;
  border-radius: 10px 10px 0 0; cursor: pointer; font-family: var(--sans); font-size: .95rem;
  font-weight: 600; color: var(--ink-mute);
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--card); border-color: var(--line); color: var(--ink); margin-bottom: -1px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- QR ---------- */
.qr-frame {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: inline-block; box-shadow: var(--shadow); text-align: center;
}
.qr-head {
  background: linear-gradient(100deg, #1b3a6b, #2f6ba8); color: #fff; border-radius: 10px 10px 0 0;
  padding: 10px 16px; margin: -18px -18px 16px; font-weight: 700; letter-spacing: .1em; font-size: .8rem;
}
.qr-frame svg { display: block; margin: 0 auto; }
.qr-amount { font-size: 1.5rem; font-weight: 700; margin-top: 12px; }
.countdown { font-family: "SF Mono", Consolas, monospace; font-weight: 700; color: var(--rust); }

.bank-card {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fffefa; margin-bottom: 10px;
}
.bank-logo { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .78rem; color: #fff; background: var(--forest); }
.bank-logo.kbank { background: #0a8376; }
.bank-logo.scb { background: #4b2e83; }
.bank-logo.bbl { background: #1e4b9c; }
.acc-number { font-family: "SF Mono", Consolas, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; }

.note {
  border-left: 3px solid var(--brass); background: #fdf7ea; padding: 14px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .92rem;
}
.note-warn { border-left-color: var(--rust); background: #fdf1ee; }
.note-ok { border-left-color: var(--forest); background: #eef4ef; }

/* ---------- dropzone ---------- */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center;
  background: #fffefa; cursor: pointer; transition: .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brass); background: #fdf7ea; }
.slip-preview { max-height: 260px; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #cfc4b2; margin-top: 60px; padding: 48px 0 24px; }
.site-footer h4 { color: var(--paper); font-size: 1rem; letter-spacing: .06em; }
.site-footer a { color: #cfc4b2; }
.site-footer a:hover { color: var(--brass-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 18px; font-size: .82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-list { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.footer-list li { margin-bottom: 8px; }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink); color: var(--paper); padding: 13px 18px; border-radius: 999px;
  box-shadow: var(--shadow-lg); font-size: .9rem; animation: slide .25s ease;
  display: flex; align-items: center; gap: 10px;
}
.toast.ok { background: var(--forest); }
.toast.err { background: var(--rust); }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------- misc ---------- */
.breadcrumb { font-size: .84rem; color: var(--ink-mute); padding: 18px 0 0; }
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--brass-dark); }
.empty { text-align: center; padding: 60px 20px; }
.empty .mark { font-size: 3rem; opacity: .5; }
.divider { height: 1px; background: var(--line); margin: 26px 0; border: 0; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 38%; font-weight: 600; color: var(--ink-soft); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); cursor: pointer; aspect-ratio: 1; }
.gallery button.active { border-color: var(--brass); box-shadow: 0 0 0 2px rgba(169, 123, 50, .2); }
.main-image { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.main-image svg { width: 100%; height: 100%; display: block; }
.status-track { list-style: none; padding: 0; margin: 0; }
.status-track li { display: flex; gap: 14px; padding-bottom: 22px; position: relative; }
.status-track li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--paper-2);
  border: 2px solid var(--line); flex-shrink: 0; margin-top: 4px; z-index: 2;
}
.status-track li::after { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.status-track li:last-child::after { display: none; }
.status-track li.done::before { background: var(--forest); border-color: var(--forest); }
.status-track li.current::before { background: var(--brass); border-color: var(--brass); box-shadow: 0 0 0 4px rgba(169, 123, 50, .18); }
.order-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 20px; margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: .93rem; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dt { font-weight: 600; } }
.kv dt { color: var(--ink-mute); margin: 0; }
.kv dd { margin: 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brass-dark); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--ink-soft); padding-bottom: 6px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.feature .mark { font-size: 1.6rem; margin-bottom: 8px; display: block; }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 3 / 2; display: block; background: var(--paper-2);
}
.cat-card svg { width: 100%; height: 100%; }
.cat-card span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px; color: #fff; font-family: var(--serif);
  font-size: 1.15rem; background: linear-gradient(transparent, rgba(30, 22, 14, .8));
}
.print-only { display: none; }
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .print-only { display: block; }
}
