/* ============================================================
   PEARL DISTRIBUTION — storefront styles
   Type: Marcellus (display, matches the logo's classic caps)
         Source Sans 3 (UI / body)
   Palette: cream #F9F6F1 (sampled from the logo file), warm ink,
            logo gold as the single accent.
   ============================================================ */

:root {
  --bg: #f9f6f1;
  --surface: #fffdf9;
  --ink: #26211a;
  --ink-2: #6f6759;
  --ink-3: #9b917f;
  --line: #e6dfd0;
  --line-soft: #efe9dc;
  --gold: #9d7a1c;
  --gold-deep: color-mix(in oklab, var(--gold), #26211a 22%);
  --gold-soft: color-mix(in oklab, var(--gold) 24%, #faf7f0);
  --gold-faint: color-mix(in oklab, var(--gold) 11%, #faf7f0);
  --menu-display: none;
  --filters-display: block;
  --chips-display: none;
  --green: #4a6741;
  --danger: #a4442e;
  --r: 10px;
  --r-sm: 6px;
  --font-display: "Marcellus", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --maxw: 1200px;
  --shadow-drawer: -24px 0 60px rgba(38, 33, 26, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--gold-soft); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* ---------- type ---------- */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; }
.eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  border-radius: var(--r-sm); font-weight: 600; font-size: 13.5px;
  padding: 11px 22px; border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  letter-spacing: 0.02em;
}
.btn-primary { background: var(--ink); color: #fbf8f1; border-color: var(--ink); }
.btn-primary:hover { background: #3a332a; border-color: #3a332a; }
.btn-gold { background: var(--gold); color: #fcfaf3; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fbf8f1; }
.btn-line { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink); }
.btn[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }

/* ---------- top strip ---------- */
.topstrip {
  background: var(--ink); color: #d9d2c4;
  font-size: 11.5px; letter-spacing: 0.06em;
  text-align: center; padding: 7px 16px;
}
.topstrip b { color: #e9d9ab; font-weight: 600; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(249, 246, 241, 0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-main {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; }
.brand-text { display: grid; line-height: 1; }
.brand-name { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.08em; line-height: 1; }
.brand-sub { font-size: 9px; letter-spacing: 0.295em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }

.search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 0 12px; height: 40px;
  max-width: 460px; margin-left: auto;
  transition: border-color 0.18s ease;
}
.search:focus-within { border-color: var(--gold); }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 13.5px; min-width: 0;
}
.search input::placeholder { color: var(--ink-3); }
.search svg { flex-shrink: 0; color: var(--ink-3); }

.hbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: transparent; border: 1px solid transparent; color: var(--ink);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.hbtn:hover { border-color: var(--line); background: var(--surface); }
.cart-count {
  position: absolute; top: 1px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--gold); color: #fcfaf3;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cart-count.pop { animation: pop 0.32s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* ---------- nav + mega menu ---------- */
.nav { border-top: 1px solid var(--line-soft); display: none; }
@media (min-width: 900px) { .nav { display: block; } }
.nav-inner { display: flex; align-items: stretch; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 11px 14px; font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-2); background: none; border: 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-item:hover .nav-link, .nav-link.on { color: var(--ink); border-bottom-color: var(--gold); }
.nav-link svg { transition: transform 0.18s ease; }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

.mega {
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0 0 var(--r) var(--r);
  box-shadow: 0 18px 40px rgba(38, 33, 26, 0.1);
  padding: 8px; z-index: 70;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.nav-item:hover .mega, .nav-item:focus-within .mega {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mega a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 9px 12px; border-radius: var(--r-sm); font-size: 13.5px;
}
.mega a:hover { background: var(--gold-faint); }
.mega a .n { color: var(--ink-3); font-size: 11.5px; }
.mega .mega-all {
  margin-top: 4px; border-top: 1px solid var(--line-soft);
  color: var(--gold-deep); font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* ---------- mobile drawer ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(38, 33, 26, 0.42);
  z-index: 80; opacity: 0; transition: opacity 0.22s ease; pointer-events: none;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.mdrawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw);
  background: var(--bg); z-index: 90; overflow-y: auto;
  transform: translateX(-102%); transition: transform 0.26s cubic-bezier(0.32, 0.72, 0.28, 1);
  border-right: 1px solid var(--line);
}
.mdrawer.open { transform: translateX(0); }
.mdrawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.mcat { border-bottom: 1px solid var(--line-soft); }
.mcat-top {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: 0; padding: 14px 16px;
  font-family: var(--font-display); font-size: 15.5px; color: var(--ink);
  letter-spacing: 0.03em;
}
.mcat-top svg { transition: transform 0.2s ease; color: var(--ink-3); }
.mcat.open .mcat-top svg { transform: rotate(180deg); }
.mcat-subs { overflow: hidden; max-height: 0; transition: max-height 0.24s ease; }
.mcat.open .mcat-subs { max-height: 320px; }
.mcat-subs a {
  display: block; padding: 10px 16px 10px 26px; font-size: 13.5px; color: var(--ink-2);
}
.mcat-subs a:active { background: var(--gold-faint); }
.mdrawer-foot { padding: 16px; display: grid; gap: 8px; }

/* ---------- hero banner ---------- */
.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-banner {
  position: relative; isolation: isolate;
  min-height: clamp(420px, 62vh, 600px);
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
}
/* the .wrap is a grid item; without width:100% its auto side-margins make it
   shrink-to-fit its content and self-center (pushing the text to mid-banner).
   Force it to fill the track so its own max-width + auto margins center the
   column exactly like the header, leaving the text flush-left in the gutter. */
.hero-banner > .wrap { width: 100%; min-width: 0; }
/* background photo + scrim are capped to the page width (--maxw) and centered,
   so the banner gets equal cream gutters on both sides and lines up with the
   header / category sections instead of bleeding full-width to the right */
.hero-bg {
  position: absolute; top: 0; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw); z-index: -2;
  background: var(--bg) url("../assets/hero-banner.jpg") no-repeat;
  background-size: cover; background-position: right center;
}
/* warm scrim keeps the left-side text legible no matter the crop */
.hero-scrim {
  position: absolute; top: 0; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw); z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(249, 246, 241, 0.97) 0%,
    rgba(249, 246, 241, 0.92) 26%,
    rgba(249, 246, 241, 0.55) 48%,
    rgba(249, 246, 241, 0.12) 66%,
    rgba(249, 246, 241, 0) 80%
  );
}
.hero-content { max-width: 30rem; padding: 40px 0; }
.hero-title {
  font-size: clamp(32px, 5vw, 54px); line-height: 1.1;
  margin: 14px 0 18px; text-wrap: balance;
}
.hero-title em { font-style: normal; color: var(--gold); }
.hero-sub {
  color: var(--ink-2); max-width: 42ch; margin: 0 0 26px;
  font-size: 15.5px; line-height: 1.6; text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
/* on narrow screens the products crop out of view — strengthen the scrim
   into a vertical wash so the overlaid text stays fully readable */
@media (max-width: 720px) {
  .hero-banner { min-height: 460px; }
  .hero-bg { background-position: 72% center; }
  .hero-scrim {
    background: linear-gradient(
      180deg,
      rgba(249, 246, 241, 0.94) 0%,
      rgba(249, 246, 241, 0.86) 42%,
      rgba(249, 246, 241, 0.78) 100%
    );
  }
  .hero-content { max-width: none; padding: 32px 0; }
}

/* entrance animation — base state is final; hidden state only applies once JS
   confirms the page is actually rendering (html.anim via rAF) */
@media (prefers-reduced-motion: no-preference) {
  html.anim .rise { animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
  .rise-1 { animation-delay: 0.05s; } .rise-2 { animation-delay: 0.14s; }
  .rise-3 { animation-delay: 0.23s; } .rise-4 { animation-delay: 0.32s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  html.anim .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
  html.anim .reveal.in { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */
.section { padding: 44px 0 8px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 22px;
}
.section-title { font-size: clamp(21px, 2.6vw, 27px); margin-top: 6px; }
.section-link {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold-deep); border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 2px; white-space: nowrap;
  transition: border-color 0.15s ease;
}
.section-link:hover { border-bottom-color: var(--gold); }

/* hairline ornament under section titles */
.rule { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rule::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.rule::after { content: ""; flex: 0 0 120px; height: 1px; background: var(--line); }

/* ---------- placeholder imagery ---------- */
.ph {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(135deg, rgba(157, 122, 28, 0.045) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, #f4efe4, #ece5d3);
  overflow: hidden;
}
.ph .ph-letter {
  font-family: var(--font-display); color: rgba(157, 122, 28, 0.26);
  font-size: 64px; line-height: 1; user-select: none;
}
.ph .ph-cap {
  position: absolute; bottom: 8px; left: 0; right: 0; text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9.5px; letter-spacing: 0.08em; color: var(--ink-3);
  padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- category cards ---------- */
.cat-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
  transition: border-color 0.18s ease;
}
.cat-card:hover { border-color: var(--gold); }
.cat-card .cat-media { height: 130px; }
.cat-card .cat-body { padding: 16px 18px 18px; }
.cat-card h3 { font-size: 19px; }
.cat-card .cat-subs { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip {
  font-size: 11.5px; color: var(--ink-2); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.cat-card:hover .cat-chip { border-color: var(--line); }

/* ---------- product grid + card ---------- */
.prod-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 168px), 1fr));
}
@media (max-width: 460px) { .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.18s ease;
}
.pcard:hover { border-color: #cdc2a8; }
.pcard-media { position: relative; aspect-ratio: 1 / 1; cursor: pointer; overflow: hidden; }
.pcard-media .ph, .pcard-media img { transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1); }
.pcard:hover .pcard-media .ph, .pcard:hover .pcard-media img { transform: scale(1.035); }
.pcard-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2; white-space: nowrap;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(255, 253, 249, 0.92); color: var(--gold-deep);
  border: 1px solid var(--gold-soft); border-radius: 3px; padding: 3px 7px;
}
.pcard-body { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pcard-brand { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.pcard-name {
  font-size: 13.5px; font-weight: 600; line-height: 1.32; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.pcard-name:hover { color: var(--gold-deep); }
.pcard-meta { font-size: 11.5px; color: var(--ink-3); }
.pcard-foot { margin-top: auto; padding-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard-price { font-size: 14.5px; font-weight: 700; letter-spacing: 0.01em; }
.pcard-price .cur { font-size: 10.5px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.addbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 33px; min-width: 33px; padding: 0 11px;
  border: 1px solid var(--ink); border-radius: var(--r-sm);
  background: transparent; color: var(--ink); font-size: 12px; font-weight: 600;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.addbtn:hover { background: var(--ink); color: #fbf8f1; }
.addbtn.added { background: var(--green); border-color: var(--green); color: #fbf8f1; }

/* ---------- reassurance strip ---------- */
.assure { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 52px; background: var(--surface); }
.assure-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 720px) { .assure-grid { grid-template-columns: repeat(3, 1fr); } }
.assure-item { padding: 22px 20px; text-align: center; }
.assure-item + .assure-item { border-top: 1px solid var(--line-soft); }
@media (min-width: 720px) { .assure-item + .assure-item { border-top: 0; border-left: 1px solid var(--line-soft); } }
.assure-item h3 { font-size: 16px; margin-bottom: 4px; }
.assure-item p { margin: 0; font-size: 12.5px; color: var(--ink-2); }

/* ---------- listing page ---------- */
.listing { display: grid; gap: 26px; padding: 28px 0 56px; }
@media (min-width: 900px) { .listing { grid-template-columns: 230px 1fr; } }
.crumbs { font-size: 12px; color: var(--ink-3); padding-top: 20px; }
.crumbs a:hover { color: var(--gold-deep); }
.crumbs .sep { margin: 0 6px; color: var(--line); }

.filters h2 { font-size: 18px; margin-bottom: 12px; }
.fgroup { border-top: 1px solid var(--line-soft); padding: 12px 0; }
.fgroup-name {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700; margin-bottom: 8px;
}
.fopt {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: 0; text-align: left;
  padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px);
  border-radius: var(--r-sm); font-size: 13.5px; color: var(--ink-2);
}
.fopt:hover { background: var(--gold-faint); color: var(--ink); }
.fopt.on { color: var(--ink); font-weight: 700; background: var(--gold-faint); }
.fopt .n { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.fopt.sub { padding-left: 22px; font-size: 13px; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.toolbar .count { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.toolbar select {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 12.5px; color: var(--ink); outline: none;
}
.toolbar select:focus { border-color: var(--gold); }
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.chip.on { background: var(--ink); color: #fbf8f1; border-color: var(--ink); }
.empty {
  text-align: center; padding: 64px 20px; border: 1px dashed var(--line); border-radius: var(--r);
  color: var(--ink-2);
}
.empty h3 { font-size: 20px; margin-bottom: 6px; }

/* ---------- product page ---------- */
.pdp { display: grid; gap: 30px; padding: 26px 0 60px; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.pdp-media { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1 / 1; background: var(--surface); }
.pdp-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pdp-thumb { inline-size: 64px; block-size: 64px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.pdp-thumb.is-active { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.pdp-thumb-ph { display: block; inline-size: 100%; block-size: 100%; background: var(--line-soft); }
.pdp-title { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.18; margin: 6px 0 10px; }
.pdp-price { font-size: 24px; font-weight: 700; margin: 14px 0 4px; }
.pdp-price .cur { font-size: 14px; color: var(--ink-3); font-weight: 600; margin-left: 4px; }
.pdp-desc { color: var(--ink-2); max-width: 54ch; text-wrap: pretty; }
.attrs { margin: 20px 0; border-top: 1px solid var(--line-soft); }
.attrs div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.attrs dt { color: var(--ink-3); text-transform: capitalize; }
.attrs dd { margin: 0; font-weight: 600; white-space: nowrap; }
.qtyrow { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.stepper {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); height: 42px;
}
.stepper button {
  width: 38px; height: 100%; background: none; border: 0; color: var(--ink-2);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.stepper button:hover { color: var(--ink); }
.stepper span { min-width: 34px; text-align: center; font-weight: 700; font-size: 14px; }
.stepper.sm { height: 30px; }
.stepper.sm button { width: 28px; font-size: 13px; }
.stepper.sm span { min-width: 24px; font-size: 12.5px; }

/* ---------- cart drawer ---------- */
.cdrawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 94vw);
  background: var(--bg); z-index: 90; display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform 0.26s cubic-bezier(0.32, 0.72, 0.28, 1);
  border-left: 1px solid var(--line); box-shadow: var(--shadow-drawer);
}
.cdrawer.open { transform: translateX(0); }
.cdrawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.cdrawer-head h2 { font-size: 19px; }
.cdrawer-body { flex: 1; overflow-y: auto; padding: 6px 18px; }
.cline { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.cline-media { width: 64px; height: 64px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-soft); flex-shrink: 0; }
.cline-info { flex: 1; min-width: 0; }
.cline-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cline-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.cline-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cline-price { font-weight: 700; font-size: 13px; }
.cline-x { background: none; border: 0; color: var(--ink-3); padding: 4px; border-radius: 4px; display: flex; }
.cline-x:hover { color: var(--danger); }
.cdrawer-foot { border-top: 1px solid var(--line); padding: 16px 18px; background: var(--surface); }
.totrow { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-2); padding: 3px 0; }
.totrow > span:first-child { white-space: nowrap; }
.totrow > span:last-child { text-align: right; }
.totrow.grand { font-size: 16px; color: var(--ink); font-weight: 700; padding: 8px 0 14px; }
.cempty { text-align: center; padding: 56px 16px; color: var(--ink-2); }
.cempty h3 { font-size: 19px; margin: 0 0 6px; }

/* ---------- checkout ---------- */
.checkout { display: grid; gap: 30px; padding: 28px 0 60px; max-width: 980px; margin: 0 auto; }
@media (min-width: 900px) { .checkout { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.panel h2 { font-size: 21px; margin-bottom: 4px; }
.panel .hint { font-size: 12.5px; color: var(--ink-3); margin: 0 0 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 5px; }
.field label .opt { color: var(--ink-3); font-weight: 400; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); padding: 10px 12px; font-size: 14px; outline: none;
  transition: border-color 0.16s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); background: var(--surface); }
.field textarea { resize: vertical; min-height: 76px; }
.field .err { color: var(--danger); font-size: 12px; margin-top: 4px; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.sumline { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.sumline > span:last-child { white-space: nowrap; }
.sumline .q { color: var(--ink-3); }
.confirm { max-width: 560px; margin: 0 auto; text-align: center; padding: 64px 16px 80px; }
.confirm-badge {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--green); color: #fbf8f1; display: flex; align-items: center; justify-content: center;
}
.confirm h1 { font-size: 30px; margin-bottom: 10px; }
.confirm p { color: var(--ink-2); text-wrap: pretty; }
.confirm .ref { font-family: ui-monospace, Menlo, monospace; background: var(--gold-faint); border: 1px solid var(--gold-soft); border-radius: var(--r-sm); padding: 3px 9px; color: var(--gold-deep); font-size: 13px; }

/* ---------- footer ---------- */
.footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--bg); }
.footer-grid { display: grid; gap: 28px; padding: 40px 0 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; } }
.footer img { width: 120px; }
.footer h4 {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 12px; font-weight: 700;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.footer ul li { line-height: 1.45; }
.footer ul a:hover { color: var(--gold-deep); }
.footer-bottom {
  border-top: 1px solid var(--line-soft); padding: 14px 0 18px;
  font-size: 11.5px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- contact buttons (fixed, static — no motion) ---------- */
.contact-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  display: flex; flex-direction: column; gap: 8px;
}
.fab {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(38, 33, 26, 0.08);
  box-shadow: 0 4px 14px rgba(38, 33, 26, 0.18);
}
.fab.wa { background: #2a8f4d; color: #fff; }
.fab.tel { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* ---------- responsive switches ---------- */
@media (max-width: 899px) {
  :root { --menu-display: inline-flex; --filters-display: none; --chips-display: flex; }
}

/* ---------- misc ---------- */
.page-head { padding: 30px 0 4px; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 32px); }
.notfound { text-align: center; padding: 80px 16px; color: var(--ink-2); }
