/* Vitrin — Deli (şarküteri) theme. Values in :root are overridden by theme settings (ThemeContext.CssVariablesAsync). */
:root {
  --brand: #7A2230; --brand-dark: #5A1822; --accent: #E8B04B; --ink: #1E1B18; --ink-2: #4A433D; --muted: #6B635B;
  --surface: #F4F1EC; --accent-soft: #FBF4E4; --line: #E3DED6; --field: #CFC8BE; --ok: #2F6B4F; --ok-bg: #E6F0EA; --err: #B42318; --err-bg: #FEF3F2;
  --font-display: 'Bricolage Grotesque', sans-serif; --font-body: 'Source Sans 3', sans-serif;
  --radius: 14px; --radius-sm: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
/* Footer stays at the bottom on short pages; content never touches it. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main#main { flex: 1 0 auto; padding-bottom: 72px; }
@media (max-width: 720px) { body > main#main { padding-bottom: 48px; } }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, .display { font-family: var(--font-display); line-height: 1.08; margin: 0; }
h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 16px; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.section { padding-top: 64px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.link { color: var(--brand); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Announcement + header */
.announce { background: var(--ink); color: #fff; font-size: 14px; text-align: center; padding: 9px 16px; }
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
/* Focus/anchor/validation scrolling stops below the sticky header (77 px desktop, ~101 px with the mobile search row). */
html { scroll-padding-top: 96px; }
@media (max-width: 900px) { html { scroll-padding-top: 120px; } }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 76px; }
.logo { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.logo img { max-height: 48px; width: auto; }
.main-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }
@media (min-width: 901px) {
  .main-nav { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; white-space: nowrap; }
  .header-tools { flex-shrink: 0; }
}
.nav-extras { display: none; }
@media (max-width: 900px) {
  .header-tools .header-extra { display: none; }
  .main-nav.open .nav-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 12px; }
  .main-nav.open .nav-extras a { border-bottom: 0; min-height: 44px; }
}
.nav-more { position: relative; }
.nav-more[hidden] { display: none; }
.nav-more > button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.nav-more > button.active, .nav-more > button[aria-expanded="true"] { color: var(--brand); }
.nav-more-list { position: absolute; top: calc(100% + 14px); left: -12px; z-index: 40; min-width: 220px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(30,27,24,.12); padding: 8px; display: flex; flex-direction: column; }
.nav-more-list[hidden] { display: none; }
.nav-more-list a { padding: 9px 12px; border-radius: var(--radius-sm); }
.nav-more-list a:hover, .nav-more-list a:focus-visible { background: var(--surface); }
.main-nav a.active { color: var(--brand); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 0 16px; min-height: 44px; }
.search input { border: 0; background: none; font: 16px var(--font-body); outline: none; width: 180px; color: var(--ink); }
.search:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; } /* the input itself has no outline */
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); position: relative; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.cart-count { position: absolute; top: 4px; right: 2px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; order: 10; width: 100%; flex-direction: column; padding: 8px 0 16px; }
  .main-nav.open { display: flex; }
  .main-nav.open { gap: 0; padding: 4px 0 12px; }
  .main-nav.open a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); }
  .search input { width: 120px; }
}
@media (max-width: 640px) {
  .header-tools { flex: 1 1 100%; margin-left: 0; }
  .search { flex: 1; min-width: 0; }
  .search input { width: 100%; min-width: 0; }
}

/* Mega menu (Shared/Components/HeaderMenu + megamenu.js): trigger button and full-width panel under the header on desktop,
   an accordion inside the toggled menu on phones. --surface-soft: lighter surface of the accordion's lower levels. */
.site-header { --surface-soft: color-mix(in srgb, var(--surface) 55%, #fff); }
.nav-item { display: flex; align-items: center; }
.nav-trigger { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-trigger .chev, .mega-col-toggle .chev { flex-shrink: 0; transition: transform .15s ease; }
.nav-trigger.active, .nav-item.open > .nav-trigger { color: var(--brand); }
.nav-item.open > .nav-trigger .chev, .mega-col.open > .mega-col-toggle .chev { transform: rotate(180deg); }
.nav-trigger:focus-visible, .mega a:focus-visible, .mega-col-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.main-nav .nav-item > .nav-alt { display: none; }
.mega { display: none; white-space: normal; font-weight: 400; }
.mega-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.mega-col-toggle, .mega-all .m { display: none; }
.mega-links { list-style: none; margin: 0; padding: 0; }
/* Inside "Daha fazla" (site.js overflow) the item is its plain link. */
.nav-more-list .nav-item { display: block; }
.nav-more-list .nav-item > .nav-trigger, .nav-more-list .nav-item > .mega { display: none; }
.nav-more-list .nav-item > .nav-alt { display: block; }
.mega-backdrop { position: fixed; inset: 0; z-index: 19; background: rgba(30,27,24,.38); }
.mega-backdrop[hidden] { display: none; }
@media (min-width: 901px) {
  .main-nav { align-items: center; }
  .nav-trigger { min-height: 76px; border-bottom: 3px solid transparent; padding-top: 3px; }
  .nav-item.open > .nav-trigger { border-bottom-color: var(--brand); }
  .nav-item.open > .mega,
  .main-nav:not([data-mega-ready]) .nav-item:hover > .mega,
  .main-nav:not([data-mega-ready]) .nav-item:focus-within > .mega { display: block; }
  .mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 1; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px -24px rgba(30,27,24,.28); max-height: calc(100vh - 140px); overflow-y: auto; cursor: auto; }
  .mega-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 36px; padding-bottom: 36px; }
  .mega-body.has-promo { grid-template-columns: minmax(0, 1fr) 320px; }
  /* auto-fit: fewer columns (leaf-only columns are merged) share the width instead of leaving empty tracks before the promo. */
  .mega-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px 40px; align-content: start; }
  .mega-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .mega-col-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); min-height: 40px; display: flex; align-items: center; }
  .mega-links { display: flex; flex-direction: column; gap: 2px; }
  .mega-links a { display: flex; align-items: center; min-height: 36px; font-size: 16px; color: var(--ink-2); }
  .mega-links a:hover, .mega-col-title:hover { color: var(--brand); }
  .mega-all a { color: var(--brand); font-weight: 600; font-size: 15px; margin-top: 6px; gap: 6px; }
  .mega-promo { background: var(--brand); color: #fff; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; align-self: start; }
  .mega-promo:hover { color: #fff; }
  .mega-promo-img { display: block; height: 180px; background: var(--brand-dark); }
  .mega-promo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .mega-promo-text { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
  .mega-promo-text b { font-size: 24px; line-height: 1.15; }
  .mega-promo-cta { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-height: 44px; padding: 0 20px; border-radius: 999px; background: #fff; color: var(--brand); font-weight: 600; margin-top: 6px; }
  .mega-foot { background: var(--surface); }
  .mega-foot .mega-wrap { display: flex; flex-wrap: wrap; align-items: center; min-height: 56px; }
  .mega-foot a { font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
  .mega-promo-img:empty { display: none; }
}
@media (min-width: 901px) and (pointer: coarse) { .mega-links a { min-height: 44px; } }
@media (max-width: 900px) {
  .main-nav.open > a, .main-nav.open .nav-trigger { min-height: 52px; }
  .main-nav.open .nav-item { display: block; border-bottom: 1px solid var(--line); }
  .nav-trigger { width: 100%; justify-content: space-between; text-align: left; font-size: 17px; }
  .nav-trigger .chev { width: 18px; height: 18px; }
  .nav-item.open > .mega { display: block; }
  .mega-wrap { padding: 0; }
  .mega-col { border-top: 1px solid var(--line); background: var(--surface-soft); }
  .main-nav.open .mega-col-title { min-height: 48px; padding-left: 16px; border-bottom: 0; }
  .main-nav.open .mega-col-title.has-links { display: none; }
  .mega-col-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0 0 0 16px; border: 0; background: none; font: 600 16px var(--font-body); color: var(--ink); cursor: pointer; text-align: left; }
  .mega-col.open > .mega-col-toggle { color: var(--brand); }
  .mega-links { display: none; padding-bottom: 6px; }
  .mega-col.open > .mega-links { display: block; }
  .main-nav.open .mega-links a { min-height: 44px; padding-left: 32px; border-bottom: 0; color: var(--ink-2); gap: 6px; }
  .main-nav.open .mega-all a { color: var(--brand); font-weight: 600; }
  .mega-all .d { display: none; }
  .mega-all .m { display: inline; }
  .main-nav.open .mega-promo { display: none; }
  .main-nav.open .mega-foot a { gap: 6px; min-height: 48px; padding-left: 16px; border-top: 1px solid var(--line); border-bottom: 0; color: var(--brand); font-weight: 600; }
  .mega-backdrop { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nav-trigger .chev, .mega-col-toggle .chev { transition: none; } }

/* Buttons & badges */
.btn { font: 600 16px var(--font-body); min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-soft { background: var(--surface); color: var(--ink); }
.btn-light { background: #fff; color: var(--brand); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 17px; font-weight: 700; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-round { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 999px; }
.badge { display: inline-block; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 6px; }
.badge-sale { background: var(--accent); color: var(--ink); }
.badge-stock { background: var(--ok-bg); color: var(--ok); }
.badge-out { background: var(--ink); color: #fff; } /* readable on light product photos */
.badge-soft { background: var(--surface); color: var(--ink-2); font-weight: 600; }
.card-badges .badge-soft { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.input, .select, .textarea, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  font: 400 16px var(--font-body); min-height: 48px; padding: 10px 14px; border: 1px solid var(--field); border-radius: var(--radius-sm); background: #fff; color: var(--ink); width: 100%;
}
.field textarea, .textarea { min-height: 96px; }
/* Read-only fields (e.g. the e-mail on /hesap/profil) must not look editable. */
.input[readonly], .field input[readonly]:not([type=checkbox]):not([type=radio]) { background: var(--surface); color: var(--ink-2); border-color: var(--line); cursor: default; }
.input:focus, .select:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field-error, .field-validation-error { color: var(--err); font-size: 13px; font-weight: 600; }
.input-validation-error { border-color: var(--err) !important; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex-shrink: 0; }
.choice { display: flex; align-items: center; gap: 12px; border: 1px solid var(--field); border-radius: 12px; padding: 14px 16px; font-weight: 600; cursor: pointer; --choice-indent: 40px; }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.choice input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; } /* never squeezed by a long label/aside */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--field); background: #fff; font-weight: 600; cursor: pointer; }
.pill input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.pill input:disabled + span { opacity: .45; text-decoration: line-through; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--field); border-radius: 999px; }
.qty button { width: 48px; height: 48px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); }
.qty input { width: 64px; border: 0; text-align: center; font: 700 16px var(--font-body); background: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.label-caps { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Alerts */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; font-size: 15px; }
.alert-error { background: var(--err-bg); color: var(--err); }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-info { background: var(--accent-soft); color: var(--ink-2); }
/* On surface pages (account) the soft tone would melt into the page: white box like the cards around it. */
.surface-page .alert-info { background: #fff; border: 1px solid var(--line); }

/* Placeholder & media */
.ph { background: var(--surface); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.square { aspect-ratio: 1 / 1; }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; padding-top: 32px; }
.hero-main { grid-column: span 7; background: var(--brand); color: #fff; border-radius: 20px; padding: 56px; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; min-height: 440px; position: relative; overflow: hidden; }
.hero-main img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero-main > * { position: relative; }
.hero-main h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.02; }
.hero-main p { font-size: 18px; max-width: 460px; opacity: .92; }
.eyebrow { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.hero-side { grid-column: span 5; display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 24px; }
.hero-tile { border-radius: 20px; background: var(--surface); padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; position: relative; overflow: hidden; min-height: 200px; }
.hero-tile.accent { background: var(--accent); }
.hero-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-tile .text { position: relative; }
.hero-tile.has-img .text { background: rgba(255,255,255,.92); border-radius: 12px; padding: 12px 16px; align-self: flex-start; }
@media (max-width: 900px) { .hero-main, .hero-side { grid-column: span 12; } .hero-main { padding: 32px; min-height: 340px; } }

/* Category circles */
.cat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cat-row a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-weight: 700; }
.cat-row .ph { width: 100%; aspect-ratio: 1/1; border-radius: 999px; }
@media (max-width: 900px) { .cat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  /* Phones: one horizontally scrolling row (the next circle peeks in), so products are not two screens down. */
  .cat-row { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
  .cat-row::-webkit-scrollbar { display: none; }
  .cat-row a { flex: 0 0 80px; font-size: 12px; gap: 6px; }
  .cat-row .ph { width: 80px; }
}

/* Product grid & card */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.product-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .product-grid, .product-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } }
.product-card { display: flex; flex-direction: column; gap: 8px; }
.product-card .media { position: relative; }
.product-card .media .badge { position: absolute; top: 12px; left: 12px; }
.product-card .meta { font-size: 13px; color: var(--muted); }
.product-card .name { font-weight: 700; font-size: 17px; }
.product-card .price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; min-height: 44px; } /* same height with or without the 44px add button (sold out) */
/* Cards in a row share the same bottom line even when one shows an extra line (meta, urgency). */
.product-grid > *, .product-grid .product-card { height: 100%; }
.price { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.price .unit { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: 400; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 15px; margin-right: 6px; font-family: var(--font-body); font-weight: 400; }
.product-card.out .media-link { opacity: .6; } /* not the badges: they keep their contrast */

/* Category page */
.breadcrumb { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 16px; }
.breadcrumb a { color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.with-aside { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.with-aside > aside { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 28px; }
.with-aside > .main { flex: 999 1 560px; min-width: 0; }
@media (max-width: 900px) { .with-aside > aside { max-width: none; } }
.filters-box > summary { display: none; }
@media (max-width: 900px) {
  .filters-box > summary { display: inline-flex; list-style: none; }
  .filters-box > summary::-webkit-details-marker { display: none; }
  .filters-box[open] > summary { margin-bottom: 20px; }
  .filters-apply:not([hidden]) { position: sticky; bottom: 0; z-index: 5; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #fff 30%); }
  .filters-apply .btn { width: 100%; min-height: 48px; }
}
@media (min-width: 901px) { .filters-apply { display: none; } }
.filter-group { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.filter-group legend { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-bottom: 8px; }
.filter-group .check { min-height: 36px; align-items: center; }
.filter-group .check input { margin-top: 0; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pager { display: flex; gap: 8px; justify-content: center; margin: 48px 0 32px; }
.pager a, .pager span { min-width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--field); display: flex; align-items: center; justify-content: center; padding: 0 12px; }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.empty { text-align: center; padding: 64px 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* Product page */
.pdp { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px; padding-bottom: 64px; }
.pdp-gallery { grid-column: span 7; display: flex; flex-direction: column; gap: 12px; }
.pdp-gallery .main-img { aspect-ratio: 1/1; border-radius: 20px; }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.thumbs button { aspect-ratio: 1/1; border: 2px solid transparent; border-radius: var(--radius-sm); padding: 0; background: var(--surface); cursor: pointer; overflow: hidden; }
.thumbs button[aria-current=true] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info { grid-column: span 5; display: flex; flex-direction: column; gap: 24px; }
.pdp-info .price { font-size: 36px; }
.pdp-info dl { margin: 0; }
.pdp-info dt { font-weight: 700; }
.pdp-info dd { margin: 0 0 14px; color: var(--ink-2); }
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.buy-row .btn { flex: 1; min-width: 200px; }
.rich { line-height: 1.65; color: var(--ink-2); }
.rich p + p { margin-top: 12px; }
@media (max-width: 900px) { .pdp-gallery, .pdp-info { grid-column: span 12; } .pdp { gap: 24px; } }
/* Wide screens: the gallery stays in view (below the sticky 77px header) while the longer info column scrolls. It never gets
   taller than the viewport: the thumbnails are one horizontally scrolling row (5 visible, however many there are), and the
   main image gives up height (contained, not cropped). With the 600px minimum window the main image keeps at least
   600 - 124 - 12 - one thumbnail row (≈ 1/5 of the gallery width, at most ~150px) ≈ 300px. Shorter window: no sticky. */
@media (min-width: 901px) and (min-height: 600px) {
  .pdp-gallery { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 124px); }
  .pdp-gallery > * { flex-shrink: 0; }
  .pdp-gallery > .main-img { flex: 0 1 auto; min-height: 0; }
  .pdp-gallery > .main-img > img { object-fit: contain; }
  .pdp-gallery > .thumbs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 5);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .pdp-gallery > .thumbs > * { scroll-snap-align: start; }
}

/* Boxes, checkout, account */
.surface-page { background: var(--surface); }
.box { background: #fff; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.box.bordered { border: 1px solid var(--line); }
.box h2 { font-size: 22px; font-weight: 600; }
.checkout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-bottom: 80px; }
.checkout > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.checkout > aside { flex: 1 1 340px; max-width: 440px; position: sticky; top: 96px; }
@media (max-width: 900px) { .checkout > aside { max-width: none; position: static; } }
.line-item { display: flex; gap: 14px; align-items: center; }
.line-item .thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); flex-shrink: 0; }
.line-item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.summary { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.summary .r { display: flex; justify-content: space-between; gap: 12px; }
.summary .total { font-family: var(--font-display); font-size: 24px; font-weight: 600; padding-top: 6px; }
.summary .discount { color: var(--ok); }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 0 8px 12px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 16px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-scroll { overflow-x: auto; }
.account { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 32px; padding-bottom: 80px; }
.account > nav { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.account > nav a { padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.account > nav a:hover { background: var(--surface); color: var(--ink); }
.account > nav a.active { background: #fff; color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.surface-page .account > nav a:hover { background: rgba(255,255,255,.6); }
.account > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
/* Narrow screens: the account menu is one horizontally scrollable row above the content (site.js scrolls the active item into view). */
@media (max-width: 900px) {
  .account { row-gap: 16px; }
  .account > nav { flex: 1 1 100%; max-width: none; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; gap: 4px; margin: 0 -4px; padding: 2px 4px; }
  .account > nav::-webkit-scrollbar { display: none; }
  .account > nav a, .account > nav form { flex-shrink: 0; white-space: nowrap; }
  .account > nav a.active { box-shadow: inset 0 -3px 0 var(--brand); }
  .account > nav form button { width: auto; white-space: nowrap; }
}
.auth-card { max-width: 440px; margin: 48px auto 80px; }
.status { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface); }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.warn { background: #FEF0C7; color: #93370D; }
.status.bad { background: var(--err-bg); color: var(--err); }

/* Benefits + footer */
.benefits { background: var(--surface); margin-top: 80px; }
.benefits .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 48px; }
.benefits h3 { margin-bottom: 6px; }
.benefits p { color: var(--ink-2); }
@media (max-width: 720px) { .benefits .wrap { grid-template-columns: 1fr; } }
.site-footer { background: var(--ink); color: #D9D3CB; }
.site-footer a { color: #D9D3CB; }
.site-footer a:hover { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 56px; padding-bottom: 40px; font-size: 15px; }
.site-footer .cols > div { display: flex; flex-direction: column; gap: 10px; }
.site-footer b { color: #fff; }
.site-footer .bottom { position: relative; padding-top: 20px; padding-bottom: 28px; font-size: 13px; color: #A69E95; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 900px) { .site-footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Divider lines follow the content edge, not the .wrap padding. */
.site-footer .bottom::before { content: ""; position: absolute; top: 0; left: 32px; right: 32px; border-top: 1px solid #3A3430; }
@media (max-width: 720px) { .site-footer .bottom::before { left: 16px; right: 16px; } }

/* Toast for add-to-cart */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 12px; font-weight: 600; transition: transform .25s ease, opacity .2s ease, visibility .25s; z-index: 50; display: flex; gap: 16px; align-items: center; max-width: calc(100% - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast:not(.show) { visibility: hidden; opacity: 0; }
.toast a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.cookie-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; z-index: 40; font-size: 14px; }
.wa-float { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 999px; background: #1F8F4E; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.18); z-index: 45; }
.wa-float:hover { color: #fff; background: #17733e; }
body:has([data-cookie-bar]) .wa-float { bottom: 96px; }
