/* === Нерпочка — base styles === */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Caveat:wght@400;600;700&display=swap');

/* Always hide closed <dialog>s — they take up the page as a block if any
   stylesheet forces display:flex/grid on them. */
dialog:not([open]) { display: none !important; }

:root {
  --bg: #FEFEFE;
  --ink: #1a1f2c;
  --ink-2: #4a5263;
  --ink-3: #7d8493;
  --line: #eef0f3;
  --line-2: #f6f7f9;
  /* Brand palette per presentation 06.06.2022 */
  --brand-purple: #6B2F85;
  --brand-purple-soft: #f4ecf8;
  --brand-purple-2: #8a45a4;
  --brand-green: #2BA43D;
  --brand-green-soft: #e8f6ec;
  --accent: #6B2F85;
  --accent-2: #8a45a4;
  --teal: #2aa39a;
  --warn: #d96b27;
  --ok: #1a8a5f;
  --err: #c2362a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(20, 30, 50, 0.04), 0 4px 16px rgba(20, 30, 50, 0.04);
  --shadow-2: 0 4px 16px rgba(20, 30, 50, 0.06), 0 24px 48px rgba(20, 30, 50, 0.05);
  --font: "Manrope", "Inter", "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "PT Serif", "Vollkorn", Georgia, serif;
  --font-hand: "Caveat", "Marck Script", "Bad Script", cursive;
  --container: 1180px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: #ffffff; color: var(--ink); overflow-x: hidden; color-scheme: light; }
body { font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; background-color: #ffffff !important; }
* { forced-color-adjust: none; }

/* Force light theme even when the OS or browser is set to dark. Only target core
   surfaces and text; do not override brand-tinted surfaces (footer, eyebrow, etc.). */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: light !important; }
  html, body { background-color: #FEFEFE !important; color: #1a1f2c !important; }
  .card, .topbar, .hero__visual, .plate, dialog, .pay-card, .qv__media { background: #ffffff !important; }
  .card__title, .card__cat, .price b, .price s, .qv__body, .qv__body h2, .qv__desc, .qv__reviews, .hero__text, .hero__text h1, .hero__text .hero__lead, .eyebrow { color: #1a1f2c !important; }
  /* Preserve brand purple/green where they are intentional */
  .eyebrow, .hero__tagline, .footer__copy, .footer nav a, .btn--accent, .btn--accent:hover { color: inherit; }
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(34px, 5vw, 60px); margin: 0 0 18px; }
h2 { font-size: clamp(24px, 3.2vw, 36px); margin: 0 0 14px; }
h3 { font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 12px; color: var(--ink-2); }

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

/* === Top bar === */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.94); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.topbar__left { display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { display: block; height: 40px; width: auto; }
.brand__name { display: none; }
.nav { display: flex; gap: 22px; }
.nav a { font-size: 15px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.topbar__actions { display: flex; align-items: center; gap: 6px; }
.iconbtn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--ink); }
.iconbtn:hover { background: var(--line-2); color: var(--ink); }
.cartbadge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 600; }

/* === Sidebar menu (drawer) === */
.topbar-burger {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px; padding: 0;
  background: none; border: 0; cursor: pointer; color: var(--ink);
}
.topbar-burger:hover { background: var(--line-2); }
.topbar-burger span {
  display: block; width: 22px; height: 2px; background: currentColor;
  border-radius: 2px; position: relative;
}
.topbar-burger span::before,
.topbar-burger span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px;
  background: currentColor; border-radius: 2px;
}
.topbar-burger span::before { top: -7px; }
.topbar-burger span::after { top: 7px; }

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(20,30,50,0.45);
  backdrop-filter: blur(2px); z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(360px, 88vw);
  background: #fff; z-index: 95; transform: translateX(-100%);
  transition: transform .26s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
  box-shadow: 0 10px 40px rgba(20,30,50,0.18);
}
.drawer.is-open { transform: translateX(0); }
.drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--line);
}
.drawer__title { font-family: var(--font-serif); font-size: 22px; margin: 0; color: var(--ink); }
.drawer__close {
  background: none; border: 0; cursor: pointer; color: var(--ink-2);
  font-size: 28px; line-height: 1; padding: 4px 10px; min-width: 36px; min-height: 36px;
}
.drawer__close:hover { color: var(--ink); }
.drawer__body { padding: 12px 14px 24px; overflow-y: auto; flex: 1; }
.drawer__section { padding: 12px 8px 6px; }
.drawer__section h4 {
  margin: 0 8px 8px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2);
}
.drawer__cats { display: flex; flex-direction: column; gap: 2px; }
.drawer__cats a, .drawer__links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px; border-radius: 10px; color: var(--ink); font-size: 15px;
  text-decoration: none; transition: background .15s ease;
}
.drawer__cats a:hover, .drawer__links a:hover { background: var(--line-2); }
.drawer__cats .count { font-size: 12px; color: var(--ink-2); }
.drawer__links { display: flex; flex-direction: column; gap: 2px; }
.drawer__contacts {
  margin-top: 8px; padding: 14px 16px; background: var(--line-2);
  border-radius: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.55;
}
.drawer__contacts a { color: var(--accent); text-decoration: none; }
.drawer__contacts a:hover { text-decoration: underline; }
.drawer__contacts strong { color: var(--ink); font-weight: 600; }

@media (max-width: 800px) {
  .nav { display: none; }
  .topbar__row { height: 60px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .topbar__row { height: 56px; }
  .brand__mark { height: 36px; }
  .iconbtn { width: 38px; height: 38px; }
  .section-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .section-head__controls { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
  .section-head__controls .search,
  .section-head__controls .select { width: 100%; min-width: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card__body { padding: 8px 8px 10px; gap: 4px; }
  .card__title { font-size: 13px; line-height: 1.25; }
  .card__cat { font-size: 10.5px; }
  .card__row { flex-direction: column; align-items: stretch; gap: 6px; }
  .card__actions { gap: 4px; }
  .card__actions .btn { padding: 7px 6px; font-size: 11.5px; white-space: nowrap; }
  .price b { font-size: 15px; }
  .price s { font-size: 11px; }
  .hero { padding: 32px 0 48px; }
  .hero__visual { min-height: 220px; border-radius: 18px; }
  .about, .delivery, .contacts { padding: 40px 0; }
  .about__list li { padding: 14px 14px; }
  .footer { padding: 22px 0; font-size: 13px; }
  .footer__row { flex-direction: column; gap: 10px; }
  .footer nav { flex-wrap: wrap; gap: 12px; }
  .cats { gap: 6px; }
  .cats a { padding: 6px 11px; font-size: 13px; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 8px 6px; }
  .kv { grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 13px; }
  .kv dt { font-size: 12px; }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(26px, 8vw, 36px); }
  h2 { font-size: clamp(20px, 5.5vw, 28px); }
  .hero__lead { font-size: 15px; }
  .hero__cta .btn { flex: 1; padding: 12px 14px; font-size: 14px; }
  .btn { padding: 11px 18px; font-size: 14px; }
  .card__actions .btn { padding: 9px 8px; font-size: 12px; white-space: nowrap; }
  /* Cart item: stack image on top, controls below. */
  .cart-item { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .cart-item__media { width: 100%; height: 140px; }
  .cart-item__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
  .cart-item__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .cart-item__actions .qty { flex: none; }
  .cart-item__sum { font-weight: 600; }
  .cart-item .btn--ghost { padding: 8px 12px; font-size: 13px; }
}

/* === Hero === */
.hero { padding: 60px 0 84px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--brand-purple) 0 50%, var(--brand-green) 50% 100%); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--brand-purple-soft); color: var(--brand-purple); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 16px; }
.hero__lead { font-size: 18px; max-width: 560px; color: var(--ink-2); }
.hero__tagline { font-family: var(--font-hand); font-size: 30px; line-height: 1; color: var(--brand-purple); margin: 6px 0 0; font-weight: 600; }
.hero__cta { display: flex; gap: 12px; margin: 22px 0 18px; flex-wrap: wrap; }
.hero__bullets { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-3); font-size: 14px; }
.hero__bullets li { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--purple { background: var(--brand-purple); }
.dot--green { background: var(--brand-green); }

.hero__visual { position: relative; aspect-ratio: 1 / 1; min-height: 320px; background: #ffffff; border-radius: 24px; overflow: hidden; box-shadow: 0 1px 2px rgba(20,30,50,0.04), 0 24px 60px rgba(20,30,50,0.05); display: grid; place-items: center; }
.hero__visual .hero__logo { display: block; width: 78%; max-width: 420px; height: auto; }
.plate { position: absolute; border-radius: 50%; box-shadow: 0 14px 32px rgba(40,40,60,0.10), 0 2px 6px rgba(40,40,60,0.05), inset 0 0 0 6px #ffffff, inset 0 0 0 7px #eaecf0; }
.plate--1 { width: 56%; height: 56%; left: 6%;  top: 18%; background: #ffffff; }
.plate--2 { width: 36%; height: 36%; right: 8%; top: 8%;  background: #ffffff; }
.plate--3 { width: 28%; height: 28%; right: 16%; bottom: 12%; background: #ffffff; }
.seal { position: absolute; left: 38%; top: 36%; width: 36%; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { min-height: 280px; }
}

/* === Buttons === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #2b3242; color: #fff; }
.btn--ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn--ghost:hover { background: var(--brand-purple-soft); color: var(--brand-purple); border-color: var(--brand-purple); }
.btn--accent { background: var(--brand-purple); color: #fff; box-shadow: 0 2px 6px rgba(107, 47, 133, 0.22); }
.btn--accent:hover { background: var(--accent-2); color: #fff; box-shadow: 0 4px 12px rgba(107, 47, 133, 0.30); }
.btn--green { background: var(--brand-green); color: #fff; box-shadow: 0 2px 6px rgba(43, 164, 61, 0.22); }
.btn--green:hover { background: #239237; color: #fff; box-shadow: 0 4px 12px rgba(43, 164, 61, 0.30); }
/* Brand "roof" notch on the primary add-to-cart button */
.btn--roof { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--block { width: 100%; }

/* === Catalog === */
.catalog { padding: 32px 0 80px; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin: 24px 0 18px; }
.section-head__controls { display: flex; gap: 10px; align-items: center; }
.search, .select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.search { min-width: 240px; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cats a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.cats a:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.cats a.is-active { background: var(--brand-purple); color: #fff; border-color: var(--brand-purple); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 4px 14px rgba(107, 47, 133, 0.10), 0 12px 32px rgba(20, 30, 50, 0.06); border-color: var(--brand-purple); }
.card__media { aspect-ratio: 3 / 4; background: var(--line-2); overflow: hidden; position: relative; }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card__media .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; }
.card__video { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 6px; letter-spacing: 0.2px; pointer-events: none; }
.card__body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-size: 15px; line-height: 1.35; color: var(--ink); }
.card__cat { font-size: 12px; color: var(--ink-3); }
.card__row { display: flex; justify-content: space-between; align-items: end; margin-top: auto; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font-size: 18px; font-weight: 700; }
.price s { color: var(--ink-3); font-size: 13px; }
.tag { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--brand-purple-soft); color: var(--brand-purple); font-weight: 600; letter-spacing: 0.02em; }
.tag--ok { background: var(--brand-green-soft); color: var(--brand-green); }
.tag--out { background: #f1f2f4; color: var(--ink-3); }

.empty { padding: 40px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }
.loadmore { display: flex; justify-content: center; margin: 24px 0 8px; }
.loadmore__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; font-size: 14px;
}
.loadmore__count {
  font-size: 12px; color: var(--ink-3); font-weight: 500;
  padding-left: 8px; border-left: 1px solid var(--line);
}

/* === About / Delivery / Contacts === */
.about, .delivery, .contacts { padding: 64px 0; border-top: 1px solid var(--line); }
.about__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.about__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.about__list li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: flex-start; gap: 14px; }
.about__list strong { color: var(--ink); }
.about__dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; margin-top: 3px; box-shadow: inset 0 0 0 2px #fff; }
.about__dot--purple { background: var(--brand-purple); }
.about__dot--green { background: var(--brand-green); }
.about__dot--white { background: #ffffff; box-shadow: inset 0 0 0 1px var(--line); }
.about__dot--mix { background: linear-gradient(135deg, var(--brand-purple) 0 50%, var(--brand-green) 50% 100%); }
.delivery__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

.contacts__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.contacts__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.contacts__card h3 { font-family: var(--font-serif); font-size: 18px; margin: 0 0 12px; color: var(--ink); }
.contacts__card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.contacts__card li { line-height: 1.5; }
.contacts__card a { color: var(--brand-purple); }
.contacts__card a:hover { text-decoration: underline; }
.contacts__schedule { gap: 6px !important; }
.contacts__schedule li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.contacts__schedule li:last-child { border-bottom: none; }
.contacts__schedule b { color: var(--ink); font-weight: 600; }
.contacts__note { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
@media (max-width: 800px) { .contacts__grid { grid-template-columns: 1fr; } }

/* === Legal / Opt text pages === */
.crumbs { font-size: 13px; color: var(--ink-3); margin: 0 0 12px; }
.crumbs a { color: var(--brand-purple); }
.legal__toc { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 28px; padding: 14px 18px; background: var(--brand-purple-soft); border-radius: var(--radius); }
.legal__toc a { color: var(--brand-purple); font-weight: 600; font-size: 14px; }
.legal__toc a:hover { text-decoration: underline; }
.legal h1 { margin-top: 32px; scroll-margin-top: 80px; }
.legal h2 { font-family: var(--font-serif); font-size: 20px; margin: 24px 0 8px; color: var(--ink); }
.legal p, .legal li { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 14px; }
.legal ul li, .legal ol li { margin-bottom: 6px; }
.legal__lead { font-size: 16px; color: var(--ink-2); font-style: italic; }
.legal__date { color: var(--ink-3); font-size: 13px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }

/* === Opt page === */
.opt__hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 32px; }
.opt__stat { background: var(--brand-purple-soft); border: 1px solid var(--brand-purple); border-radius: var(--radius); padding: 22px 18px; text-align: center; }
.opt__stat b { display: block; font-family: var(--font-serif); font-size: 26px; color: var(--brand-purple); margin-bottom: 6px; }
.opt__stat span { font-size: 13px; color: var(--ink-2); }
.opt__steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.opt__steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 16px 56px; position: relative; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.opt__steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-purple); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.opt__steps li b { color: var(--ink); }
.opt__terms, .opt__contacts { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.opt__terms li { padding-left: 22px; position: relative; line-height: 1.55; }
.opt__terms li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-green); font-weight: 700; }
.opt__contacts li { line-height: 1.6; }
.opt__contacts a { color: var(--brand-purple); }
.opt__contacts a:hover { text-decoration: underline; }
@media (max-width: 800px) { .opt__hero { grid-template-columns: 1fr; } }

@media (max-width: 800px) {
  .about__grid, .delivery__grid { grid-template-columns: 1fr; }
}

/* === Footer === */
.footer { border-top: 1px solid var(--line); padding: 36px 0 28px; color: var(--ink-3); font-size: 14px; background: var(--brand-purple-soft); }
.footer__row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__logo { height: 44px; width: auto; }
.footer__copy { margin: 0; color: var(--ink-2); font-size: 13px; }
.footer nav { display: flex; gap: 18px; }
.footer nav a { color: var(--ink-2); }
.footer nav a:hover { color: var(--brand-purple); }

/* === Quickview dialog === */
dialog.quickview { border: none; padding: 0; border-radius: 20px; max-width: 980px; width: 92vw; max-height: 92vh; background: #fff; overflow: hidden; }
dialog.quickview::backdrop { background: rgba(20,30,50,0.5); backdrop-filter: blur(2px); }
@media (max-width: 600px) {
  dialog.quickview[open] { display: flex; flex-direction: column; }
  dialog.quickview .qv__grid { flex: 1; min-height: 0; }
}

/* === Quick-order dialog (1 click) === */
dialog.quickorder { border: none; padding: 0; border-radius: 18px; max-width: 520px; width: 94vw; background: #fff; position: relative; z-index: 1000; }
dialog.quickorder::backdrop { background: rgba(20,30,50,0.5); backdrop-filter: blur(2px); }
dialog.quickorder form { display: flex; flex-direction: column; gap: 14px; padding: 26px 26px 22px; max-height: 90vh; overflow: auto; min-width: 0; }
dialog.dialog { border: none; padding: 0; border-radius: 18px; max-width: 720px; width: 94vw; max-height: 92vh; background: #fff; margin: auto; }
@media (max-width: 600px) {
  dialog.dialog { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  dialog.dialog .dialog__inner { border-radius: 0; }
}
dialog.dialog::backdrop { background: rgba(20,30,50,0.5); backdrop-filter: blur(2px); }
dialog.dialog .dialog__inner { padding: 26px 26px 22px; max-height: 92vh; overflow: auto; min-width: 0; position: relative; border-radius: 18px; }
dialog.dialog .dialog__close { position: absolute; top: 8px; right: 12px; background: transparent; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink-2, #6b7280); padding: 4px 10px; }
dialog.dialog .dialog__close:hover { color: var(--ink-1, #111); }
dialog.dialog .kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
dialog.dialog .kv > div { display: contents; }
dialog.dialog .kv span { color: var(--ink-2, #6b7280); }
dialog.dialog .kv b { font-weight: 600; }
dialog.dialog .table { width: 100%; border-collapse: collapse; }
dialog.dialog .table th, dialog.dialog .table td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left; font-size: 14px; }
dialog.dialog .table thead th { font-weight: 600; color: var(--ink-2, #6b7280); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.acc-orders__wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.acc-orders__wrap .acc-orders { min-width: 720px; }
.acc-orders__actions { white-space: nowrap; }
.acc-orders__actions .btn { margin-right: 4px; }
.acc-orders-cards { display: none; flex-direction: column; gap: 12px; }
.acc-order-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.acc-order-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acc-order-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.acc-order-card__row span { color: var(--ink-2, #6b7280); }
.acc-order-card__row b { font-weight: 600; text-align: right; }
.acc-order-card__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.acc-order-card__actions .btn { flex: 1; min-width: 110px; }
@media (max-width: 600px) {
  .acc-orders__wrap { display: none; }
  .acc-orders-cards { display: flex; }
}
dialog.quickorder header { display: flex; justify-content: space-between; align-items: center; }
dialog.quickorder h3 { margin: 0; font-family: var(--font-serif); font-size: 22px; }
dialog.quickorder .close { background: none; border: none; font-size: 26px; line-height: 1; color: #6b7280; cursor: pointer; padding: 4px 8px; }
dialog.quickorder .qproduct { margin: 0; color: var(--ink); font-weight: 600; font-size: 15px; padding: 10px 14px; background: var(--line-2); border-radius: 10px; word-break: break-word; }
dialog.quickorder .qproducts { display: flex; flex-direction: column; gap: 6px; }
dialog.quickorder .qproducts:empty { display: none; }
dialog.quickorder .qproducts .qrow { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--line-2); border-radius: 10px; }
dialog.quickorder .qproducts .qrow img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #fff; }
dialog.quickorder .qproducts .qrow .qrow__name { font-size: 13px; line-height: 1.3; color: var(--ink); word-break: break-word; }
dialog.quickorder .qproducts .qrow .qrow__price { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
dialog.quickorder .qproducts .qrow .qrow__qty { display: inline-flex; align-items: center; gap: 4px; }
dialog.quickorder .qproducts .qrow .qrow__qty button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; line-height: 1; color: var(--ink); }
dialog.quickorder .qproducts .qrow .qrow__qty button:hover { background: var(--brand-purple-soft); color: var(--brand-purple); border-color: var(--brand-purple); }
dialog.quickorder .qproducts .qrow .qrow__qty span { min-width: 18px; text-align: center; font-size: 13px; font-weight: 600; }
dialog.quickorder .qproducts .qrow .qrow__rm { background: none; border: none; color: #94a3b8; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
dialog.quickorder .qproducts .qrow .qrow__rm:hover { color: #ef4444; }
dialog.quickorder .qaddlabel { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #4b5563; margin-top: 4px; }
dialog.quickorder .qaddlabel input { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 14px; background: #fff; color: var(--ink); }
dialog.quickorder .qaddlabel input:focus { outline: none; border-style: solid; border-color: var(--brand-purple); box-shadow: 0 0 0 3px var(--brand-purple-soft); }
dialog.quickorder label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #4b5563; min-width: 0; }
dialog.quickorder label .req { color: var(--accent); }
dialog.quickorder input,
dialog.quickorder select { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; min-width: 0; width: 100%; max-width: 100%; }
dialog.quickorder select { text-overflow: ellipsis; }
dialog.quickorder input:focus,
dialog.quickorder select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
dialog.quickorder .qtype { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
dialog.quickorder .qtype legend { padding: 0 6px; font-size: 13px; color: #4b5563; }
dialog.quickorder .qtype .radio { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
dialog.quickorder .qtype .radio input { padding: 0; width: 18px; height: 18px; margin: 0; flex: none; }
dialog.quickorder .qsum { margin: 4px 0 0; padding: 14px 16px; background: var(--line-2); border-radius: 12px; font-size: 14px; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; min-width: 0; }
dialog.quickorder .qsum b { font-weight: 600; color: var(--ink); }
dialog.quickorder .qsum b.qsum-ship--free { color: var(--brand-green, #2BA43D); font-weight: 700; }
dialog.quickorder .qsum .qsum-total { color: var(--ink-2); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }
dialog.quickorder .qsum b.qsum-total { color: var(--ink); font-size: 18px; }
dialog.quickorder .qhint { margin: -4px 0 0; font-size: 12px; color: #6b7280; line-height: 1.4; }
dialog.quickorder .qfree { margin: 6px 0 0; font-size: 12.5px; color: var(--brand-green, #2BA43D); line-height: 1.4; font-weight: 600; padding: 8px 12px; background: var(--brand-green-soft, #e8f6ec); border-radius: 8px; text-align: center; }
dialog.quickorder button[type=submit] { margin-top: 4px; padding: 14px 18px; border-radius: 10px; border: none; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
dialog.quickorder button[type=submit]:hover { background: #ea5a26; }
dialog.quickorder button[type=submit]:disabled { opacity: 0.6; cursor: not-allowed; }
dialog.quickorder .qlegal { margin: 0; font-size: 11px; color: #9aa0aa; line-height: 1.4; }
dialog.quickorder .qoffice, dialog.quickorder .qaddress { display: none; }
dialog.quickorder[data-mode="courier"] .qaddress { display: flex; }
dialog.quickorder[data-mode="pickup"] .qoffice { display: flex; }
dialog.quickorder .qoffice { flex-direction: column; gap: 8px; }
dialog.quickorder .qoffice select { width: 100%; }
dialog.quickorder .qoffice__map { padding: 9px 12px; font-size: 13px; align-self: flex-start; }

/* === PVZ map dialog === */
dialog.pvzmap[open] { border: none; padding: 0; border-radius: 16px; width: 96vw; max-width: 980px; background: #fff; overflow: hidden; height: 86vh; max-height: 760px; min-height: 540px; display: flex; flex-direction: column; position: relative; z-index: 1100; }
dialog.pvzmap::backdrop { background: rgba(20, 30, 50, 0.6); backdrop-filter: blur(2px); }
dialog.pvzmap header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
dialog.pvzmap header h3 { margin: 0; font-family: var(--font-serif); font-size: 20px; }
dialog.pvzmap .close { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 4px 10px; border-radius: 8px; min-width: 36px; min-height: 36px; }
dialog.pvzmap .close:hover { background: var(--brand-purple-soft); color: var(--brand-purple); }
.pvz-popup-pick { display: block; width: 100%; margin-top: 10px; padding: 10px 14px; background: var(--brand-purple); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
.pvz-popup-pick:hover { background: var(--brand-purple-2, #8a45a4); }
.pvzmap__footer { display: flex; justify-content: flex-end; padding: 8px 20px 14px; border-top: 1px solid var(--line); background: #faf6f2; flex: 0 0 auto; }
.pvzmap__footer .btn-close { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 10px 20px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500; min-height: 44px; }
.pvzmap__footer .btn-close:hover { background: var(--brand-purple-soft); color: var(--brand-purple); border-color: var(--brand-purple); }
div.pvzmap__layout { display: grid; grid-template-columns: 360px 1fr; flex: 1 1 0; min-height: 0; overflow: hidden; }
ul.pvzmap__list { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; border-right: 1px solid var(--line); min-height: 0; }
ul.pvzmap__list li { padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background 0.12s; }
ul.pvzmap__list li:hover, ul.pvzmap__list li.is-active { background: var(--brand-purple-soft); }
ul.pvzmap__list .pvz-name { font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
ul.pvzmap__list .pvz-addr { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
ul.pvzmap__list .pvz-work { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
ul.pvzmap__list .pvz-pick { display: inline-block; margin-top: 6px; padding: 4px 10px; background: var(--brand-purple); color: #fff; border-radius: 6px; font-size: 12px; font-weight: 600; }
div.pvzmap__map { width: 100%; height: 100%; background: #eef0f3; }
p.pvzmap__hint { margin: 0; padding: 10px 20px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); background: #faf6f2; flex: 0 0 auto; }
dialog.pvzmap .leaflet-popup-content-wrapper { border-radius: 10px; }
dialog.pvzmap .leaflet-popup-content { font-size: 13px; margin: 10px 14px; }
dialog.pvzmap .leaflet-popup-content strong { display: block; margin-bottom: 4px; color: var(--brand-purple); }
.leaflet-pvz-icon { background: var(--brand-purple); width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25); display: flex; align-items: center; justify-content: center; }
.leaflet-pvz-icon span { transform: rotate(45deg); color: #fff; font-weight: 700; font-size: 13px; }
@media (max-width: 720px) {
  dialog.pvzmap { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  div.pvzmap__layout { grid-template-columns: 1fr; grid-template-rows: 50% 50%; height: calc(100vh - 110px); }
  ul.pvzmap__list { border-right: none; border-bottom: 1px solid var(--line); }
  dialog.pvzmap .close { min-width: 44px; min-height: 44px; font-size: 32px; }
  dialog.pvzmap header h3 { font-size: 17px; }
  dialog.pvzmap header { padding: 12px 16px; }
  .pvzmap__footer { padding: 10px 16px; }
  .pvzmap__footer .btn-close { width: 100%; }
}

/* === Card actions: side-by-side cart + 1-click === */
.card__actions { display: flex; gap: 6px; align-items: stretch; }
.card__actions > .qty { flex: 0 0 auto; }
.card__actions .btn { padding: 9px 10px; font-size: 13px; flex: 1; min-width: 0; white-space: nowrap; line-height: 1.2; }
.qv__grid { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr auto; min-height: 0; }
.qv__media { background: var(--line-2); aspect-ratio: 3/4; overflow: hidden; position: relative; }
.qv__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.qv__gallery { position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: pan-y; background: var(--line-2); }
.qv__track { display: flex; width: 100%; height: 100%; transition: transform 0.28s ease; }
.qv__slide { flex: 0 0 100%; width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; }
.qv__track img { width: 100%; height: 100%; object-fit: cover; }
.qv__track video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.qv__slide--video .qv__videotag { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.7); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; letter-spacing: 0.2px; pointer-events: none; }
.qv__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.9); border: 1px solid var(--line); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.qv__nav--prev { left: 10px; }
.qv__nav--next { right: 10px; }
.qv__nav:hover { background: var(--brand-purple); color: #fff; border-color: var(--brand-purple); }
.qv__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.qv__dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.6); cursor: pointer; transition: background 0.15s, transform 0.15s; }
.qv__dot.is-active { background: var(--brand-purple); transform: scale(1.3); }
.qv__dot.is-video { background: rgba(0,0,0,0.55); box-shadow: 0 0 0 1px rgba(255,255,255,0.3); position: relative; }
.qv__dot.is-video::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-40%, -50%); border-left: 4px solid #fff; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.qv__dot.is-active.is-video { background: var(--brand-purple); }
.qv__body { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; overflow: auto; min-height: 0; }
.qv__close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.06); border: none; cursor: pointer; z-index: 10; font-size: 22px; line-height: 1; color: var(--ink); display: grid; place-items: center; padding: 0; }
.qv__close:hover { background: var(--brand-purple); color: #fff; }
.qv__body h2 { font-size: 26px; margin: 0; }
.qv__body .price b { font-size: 24px; }
.qv__desc { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.qv__reviews { font-size: 13px; color: var(--ink-3); }
.qv__reviews ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.qv__reviews li { padding: 10px 12px; background: var(--line-2); border-radius: 10px; color: var(--ink-2); font-size: 13px; }
.qv__reviews li b { color: var(--ink); }
.qv__buy { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; padding: 16px 28px; border-top: 1px solid var(--line); background: #fff; position: sticky; bottom: 0; }
.qv__buy .qty { flex: none; }
.qv__buy #qv-add { flex: 1; min-width: 0; }
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  flex: 0 0 auto;
  max-width: 100%;
}
.qty button { background: transparent; border: 0; width: 36px; height: 36px; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink-1); }
.qty button:hover { background: var(--bg-1); }
/* The qty number should grow with the digits so values like 99999 never
 * clip. min-width: 2ch keeps single digits nicely centered; the span will
 * expand on its own for wider numbers. */
.qty span {
  min-width: 2ch;
  padding: 0 6px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.qty.qty--sm button { width: 28px; height: 32px; font-size: 16px; }
.qty.qty--sm span {
  min-width: 2ch;
  padding: 0 4px;
  font-size: 13px;
}

/* Per-unit hint shown under the bold price when qty > 1. */
.price__hint {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  dialog.quickorder, dialog.quickview {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  dialog.quickview .qv__grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; flex: 1; min-height: 0; }
  dialog.quickview .qv__media { aspect-ratio: auto; max-height: 70vh; min-height: 220px; }
  dialog.quickview .qv__media img { object-fit: cover; }
  dialog.quickview .qv__gallery { height: 100%; }
  dialog.quickview .qv__body { padding: 18px 18px 8px; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
  dialog.quickview .qv__body h2 { font-size: 20px; }
  dialog.quickview .qv__body .price b { font-size: 20px; }
  dialog.quickview .qv__close { top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); width: 44px; height: 44px; font-size: 24px; display: grid; place-items: center; }
  dialog.quickview .qv__nav { width: 32px; height: 32px; font-size: 18px; }
  dialog.quickview .qv__nav--prev { left: 6px; }
  dialog.quickview .qv__nav--next { right: 6px; }
  dialog.quickview .qv__dots { bottom: 8px; gap: 5px; }
  dialog.quickview .qv__buy { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  dialog.quickorder form { padding: 18px 16px 24px; gap: 12px; max-height: 100dvh; padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  dialog.quickorder h3 { font-size: 19px; }
  dialog.quickorder .close { font-size: 30px; padding: 6px 12px; }
  dialog.quickorder .qsum { font-size: 13px; padding: 12px 14px; }
  dialog.quickorder .qsum b.qsum-total { font-size: 16px; }
  dialog.quickorder button[type=submit] { padding: 16px 18px; font-size: 16px; }
}

/* === Auth & Account === */
.page { padding: 40px 0 80px; min-height: 60vh; }
.page h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 24px; }
.form { display: grid; gap: 14px; max-width: 480px; min-width: 0; width: 100%; }
.form label { font-size: 14px; color: var(--ink-2); display: grid; gap: 6px; min-width: 0; }
.form input { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; width: 100%; box-sizing: border-box; }
.form select { min-width: 0; width: 100%; box-sizing: border-box; }
.form textarea { min-width: 0; width: 100%; box-sizing: border-box; }
.form input:focus { outline: 2px solid var(--accent-2); border-color: var(--accent); }
.form .btn { margin-top: 6px; }
.form .hint { font-size: 13px; color: var(--ink-3); }
.form .deliv { min-width: 0; }

.card-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.card-block h3 { margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--ink-3); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.table input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.table .out { color: var(--ink-3); }

.flash { padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.flash--ok { background: #e8f5ee; color: var(--ok); }
.flash--err { background: #fdecea; color: var(--err); }

.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* === Cart summary on /cart: fixed floating card on the right === */
.cart-summary {
  position: fixed;
  top: 84px;
  right: 24px;
  width: 320px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  z-index: 40;
  padding: 18px 20px;
}
.cart-summary::-webkit-scrollbar { width: 6px; }
.cart-summary::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.cart-summary .kv { margin: 4px 0; }
.cart-summary h3 { margin: 0 0 10px; }
.cart-summary .line { margin: 12px 0; }
.cart-summary .btn--block { margin-top: 12px; padding: 12px 16px; }
.cart-summary .hint { font-size: 12px; line-height: 1.4; }
.cart-summary details { margin-top: 8px; }
.cart-summary details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  user-select: none;
  list-style: none;
  padding: 6px 0;
}
.cart-summary details summary::-webkit-details-marker { display: none; }
.cart-summary details summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s;
}
.cart-summary details[open] summary::before { transform: rotate(90deg); }
/* On /cart, expand the left column to use freed-up space */
.split--cart { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1100px) {
  .split--cart { grid-template-columns: 1fr; }
  .cart-summary {
    position: sticky;
    top: 60px;
    right: auto;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 80px);
    padding: 14px 16px;
  }
}

/* === Floating cart widget: compact pill pinned to the top-right corner on every non-/cart route === */
.cart-floater {
  position: fixed;
  top: 78px;
  right: 20px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: #fff;
  color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  font: inherit;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cart-floater:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}
.cart-floater__icon {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
}
.cart-floater__icon svg { width: 18px; height: 18px; }
.cart-floater__count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #c62828;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-floater__text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}
.cart-floater__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.cart-floater__total {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-1);
}
.cart-floater__arrow { color: var(--accent); font-size: 18px; }
@media (max-width: 600px) {
  .cart-floater {
    top: 70px;
    right: 12px;
    padding: 6px 12px 6px 6px;
    gap: 8px;
  }
  .cart-floater__icon { width: 28px; height: 28px; }
  .cart-floater__total { font-size: 13px; }
}

.line { height: 1px; background: var(--line); margin: 24px 0; }

/* === Cart item layout === */
.cart-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: start; padding: 18px; }
.cart-item__media { width: 110px; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--line-2); }
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.cart-item__meta { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cart-item__meta a { font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--ink); }
.cart-item__meta .card__cat { font-size: 12px; }
.cart-item__meta .price { margin-top: 4px; }
.cart-item__meta .price b { font-size: 18px; }
.cart-item__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; min-width: 110px; }
.cart-item__actions .qty { flex: none; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.cart-item__actions .qty button { width: 32px; height: 32px; border: none; background: transparent; cursor: pointer; font-size: 16px; color: var(--ink); }
.cart-item__actions .qty button:hover { background: var(--brand-purple-soft); color: var(--brand-purple); }
.cart-item__actions .qty span { min-width: 28px; text-align: center; font-weight: 600; }
.cart-item__sum { font-weight: 700; font-size: 18px; color: var(--brand-purple); }
.cart-item .btn--ghost { padding: 6px 12px; font-size: 12.5px; }

@media (max-width: 480px) {
  h1 { font-size: clamp(26px, 8vw, 36px); }
  h2 { font-size: clamp(20px, 5.5vw, 28px); }
  .hero__lead { font-size: 15px; }
  .hero__cta .btn { flex: 1; padding: 12px 14px; font-size: 14px; }
  .btn { padding: 11px 18px; font-size: 14px; }
  .card__actions .btn { padding: 9px 8px; font-size: 12px; white-space: nowrap; }
  /* Cart item: side-by-side image+info on top, controls below. */
  .cart-item { display: grid; grid-template-columns: 90px 1fr; grid-template-rows: auto auto; gap: 10px 12px; padding: 14px; }
  .cart-item__media { width: 90px; aspect-ratio: 3 / 4; border-radius: 10px; grid-row: 1 / 3; }
  .cart-item__meta { grid-column: 2; align-self: start; }
  .cart-item__actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; min-width: 0; gap: 8px 12px; }
  .cart-item__sum { font-size: 16px; }
  .cart-item .btn--ghost { padding: 6px 10px; font-size: 12px; }
}

.deliv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deliv label { font-size: 14px; color: var(--ink-2); display: grid; gap: 6px; }
.deliv input, .deliv select { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
@media (max-width: 700px) { .deliv { grid-template-columns: 1fr; } }

/* === Catalog: 2 columns on mobile (placed last to override desktop rule) === */
@media (max-width: 600px) {
  #catalog .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  #catalog .card__body { padding: 8px 8px 10px; gap: 4px; }
  #catalog .card__title { font-size: 13px; line-height: 1.25; }
  #catalog .card__cat { font-size: 10.5px; }
  #catalog .card__row { flex-direction: column; align-items: stretch; gap: 6px; }
  #catalog .card__actions { gap: 4px; }
  #catalog .card__actions .btn { padding: 7px 6px; font-size: 11.5px; white-space: nowrap; }
  #catalog .price b { font-size: 15px; }
  #catalog .price s { font-size: 11px; }
}
