:root {
  --red: #b3122e;
  --red-d: #8c0d22;
  --ink: #1b1a1f;
  --ink-2: #4b4852;
  --muted: #7a7580;
  --line: #ebe5dc;
  --bg: #fbf8f3;
  --card: #ffffff;
  --cream: #f4ede2;
  --gold: #b88a3b;
  --green: #1f9d55;
  --wa: #1fa855;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(27, 26, 31, .05), 0 8px 24px rgba(27, 26, 31, .06);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 248, 243, .9); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark svg { width: 32px; height: 32px; }
.brand__txt { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.brand__txt b { color: var(--red); font-weight: 700; }
.top__nav { display: flex; gap: 22px; margin-left: auto; }
.top__nav a { text-decoration: none; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.top__nav a:hover { color: var(--red); }
.cartbtn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; transition: border-color .15s, transform .15s; }
.cartbtn:hover { border-color: var(--ink); }
.cartbtn:active { transform: scale(.97); }
.cartbtn svg { width: 20px; height: 20px; }
.cartbtn__n { background: var(--red); color: #fff; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; padding: 0 6px; }
.cartbtn.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.08); } }

/* Hero */
.hero { padding: 56px 0 28px; background:
  radial-gradient(900px 300px at 85% -10%, rgba(179, 18, 46, .09), transparent 70%),
  radial-gradient(700px 260px at 0% 0%, rgba(184, 138, 59, .10), transparent 70%); }
.hero h1 { font-family: var(--serif); font-size: clamp(34px, 5.4vw, 60px); font-weight: 700; letter-spacing: -.02em; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero__sub { font-size: 17px; color: var(--ink-2); max-width: 58ch; margin: 16px 0 26px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; max-width: 680px; box-shadow: var(--shadow); }
.search:focus-within { border-color: var(--ink); }
.search svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; padding: 10px 0; }
.search button { border: 0; background: var(--red); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 999px; cursor: pointer; }
.search button:hover { background: var(--red-d); }
.hero__stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.hero__stats b { color: var(--ink); }

/* Categories */
.cats { padding: 8px 0 4px; }
.cats__row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 14px 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; text-align: center; transition: border-color .15s, background .15s, transform .15s; }
.cat:hover { border-color: #cfc6b8; }
.cat:active { transform: scale(.97); }
.cat svg { width: 30px; height: 30px; color: var(--red); }
.cat small { color: var(--muted); font-weight: 500; font-size: 11px; }
.cat[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat[aria-pressed="true"] svg { color: #fff; }
.cat[aria-pressed="true"] small { color: #c9c4cc; }

/* Catalog bar */
.catalog { padding: 26px 0 40px; }
.bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.bar h2 { font-family: var(--serif); font-size: 28px; }
.bar p { margin: 4px 0 0; font-size: 14px; }
.bar__ctl { display: flex; gap: 8px; }
.chipbtn, .sel select { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.chipbtn svg { width: 18px; height: 18px; }
.chipbtn b { background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.sel select { appearance: none; padding-right: 30px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%231b1a1f' stroke-width='2'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; }
.subs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.subs::-webkit-scrollbar { display: none; }
.sub { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sub small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.sub[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.sub[aria-pressed="true"] small { color: #ffd5dc; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 18px 14px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); cursor: pointer; text-align: left; padding: 0; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__img { aspect-ratio: 1 / 1; background: #f3efe8; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__img img { transform: scale(1.04); }
.card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card__sub { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card__t { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__p { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.price small { font-size: 11px; font-weight: 700; margin-left: 2px; color: var(--ink-2); }
.old { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.tag { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.add { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .15s; }
.add:hover { transform: scale(1.08); }
.add:active { transform: scale(.94); }
.add svg { width: 18px; height: 18px; }
.add.on { background: var(--red); color: #fff; }

.more { display: flex; justify-content: center; padding-top: 26px; }
.empty { text-align: center; padding: 40px 16px; border: 1px dashed #d8cfc2; border-radius: var(--radius); background: var(--card); }
.empty p { margin: 0 0 8px; }
.empty .btn { margin-top: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--ink); color: #fff; font-weight: 700; padding: 13px 20px; border-radius: 999px; cursor: pointer; text-decoration: none; font-size: 15px; transition: transform .15s, background .15s; }
.btn:active { transform: scale(.97); }
.btn--ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #178a45; }
.btn--red { background: var(--red); }
.btn--red:hover { background: var(--red-d); }
.btn svg { width: 18px; height: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* How */
.how { padding: 56px 0; background: var(--cream); }
.how h2, .faq h2 { font-family: var(--serif); font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 26px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.steps li { background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.steps b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; margin-bottom: 12px; }
.steps h3 { font-size: 17px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* FAQ */
.faq { padding: 56px 0 64px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; max-width: 820px; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; background: var(--card); }
.foot__in { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.foot p { margin: 0 0 4px; max-width: 60ch; }

/* Dialogs */
.sheet { border: 0; padding: 0; background: var(--card); color: var(--ink); border-radius: 20px; width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.sheet::backdrop { background: rgba(20, 16, 22, .5); backdrop-filter: blur(2px); }
.sheet[open] { animation: pop .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet__in { display: flex; flex-direction: column; max-height: inherit; }
.sheet--side { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100vw); border-radius: 20px 0 0 20px; }
.sheet--side[open] { animation: slide .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.sheet--side .sheet__in { height: 100%; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sheet__head h3 { font-size: 19px; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 22px; line-height: 1; cursor: pointer; }
.x:hover { border-color: var(--ink); }
.sheet__foot { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); margin-top: auto; background: var(--card); }
.sheet__foot .btn { flex: 1; }
.sheet__foot--col { flex-direction: column; }

.fgroup { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.fgroup h4 { font-size: 14px; margin-bottom: 10px; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.range label { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.range input { border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 16px; width: 100%; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.checks { display: grid; gap: 8px; }
.checks label, .tog { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.checks input, .tog input { width: 18px; height: 18px; accent-color: var(--red); }
.checks small { color: var(--muted); margin-left: auto; }
#fd .sheet__in, #cd .sheet__in { overflow: hidden; }
#fd .fgroup:last-of-type { border-bottom: 0; }
#fd .sheet__in > .fgroup { overflow-y: auto; }

/* Product detail */
.pd { display: grid; grid-template-columns: 1.05fr 1fr; overflow-y: auto; }
.pd__img { background: #f3efe8; position: relative; min-height: 100%; }
.pd__img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; }
.pd__img .x { position: absolute; top: 12px; left: 12px; display: none; }
.pd__info { padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.pd__info > .x { position: absolute; top: 14px; right: 14px; }
.pd__sub { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.pd h2 { font-family: var(--serif); font-size: 28px; padding-right: 40px; }
.pd__tr { font-size: 13px; color: var(--muted); margin: -6px 0 0; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.cost { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; font-size: 14px; }
.cost div { display: flex; justify-content: space-between; gap: 12px; }
.cost .tot { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-size: 16px; font-weight: 800; }
.cost .tot span:last-child { color: var(--red); font-size: 22px; }
.cost .note { font-size: 12px; color: var(--muted); display: block; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 18px; cursor: pointer; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }
.pd__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pd__actions .btn { flex: 1; min-width: 160px; }
.pd__src { font-size: 13px; color: var(--muted); }
.pd__src a { color: var(--ink-2); }
.pd__desc { font-size: 14px; color: var(--ink-2); margin: 0; }

/* Cart */
.clist { overflow-y: auto; padding: 8px 20px; flex: 1; }
.ci { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.ci img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #f3efe8; }
.ci h4 { font-size: 14px; font-weight: 600; line-height: 1.3; }
.ci p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.ci .qty button { width: 30px; height: 30px; font-size: 16px; }
.ci__r { display: grid; justify-items: end; gap: 6px; }
.ci__r b { font-size: 14px; }
.cempty { text-align: center; padding: 50px 10px; color: var(--muted); }
.ctot { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; }
.ctot span:last-child { color: var(--red); }
.cnote { font-size: 12px; color: var(--muted); margin: 0; }
.name-in { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 16px; width: 100%; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1060px) {
  .cats__row { grid-template-columns: repeat(9, 104px); overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .cats__row::-webkit-scrollbar { display: none; }
}
@media (max-width: 860px) {
  .top__nav { display: none; }
  .top__in { justify-content: space-between; }
  .steps { grid-template-columns: 1fr 1fr; }
  .pd { grid-template-columns: 1fr; }
  .pd__img img { aspect-ratio: 4 / 3.4; }
  .pd__img .x { display: grid; place-items: center; }
  .pd__info > .x { display: none; }
  .sheet:not(.sheet--side) { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 94dvh; }
}
@media (max-width: 560px) {
  .hero { padding: 34px 0 18px; }
  .hero__sub { font-size: 15px; }
  .search { padding-left: 14px; }
  .search button { padding: 11px 16px; }
  .cartbtn span { display: none; }
  .cats__row { grid-template-columns: repeat(9, 92px); gap: 8px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px 10px; }
  .card__body { padding: 8px 10px 10px; }
  .price { font-size: 15px; }
  .bar { flex-direction: column; align-items: stretch; }
  .bar__ctl { justify-content: space-between; }
  .bar h2 { font-size: 24px; }
  .steps { grid-template-columns: 1fr; }
  .foot__in { flex-direction: column; align-items: flex-start; }
  .pd__info { padding: 18px 16px; }
  .pd h2 { font-size: 23px; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
