:root {
  --app-viewport-height: 100dvh;
  --app-safe-top: 0px;
  --app-safe-right: 0px;
  --app-safe-bottom: 0px;
  --app-safe-left: 0px;
  --bg: #f4efe6;
  --surface: rgba(250, 247, 241, .86);
  --surface-solid: #f8f4ed;
  --surface-2: #eee7dc;
  --text: #122825;
  --muted: #64736f;
  --emerald: #0c604a;
  --emerald-deep: #073f34;
  --gold: #a3742b;
  --gold-soft: #d3ae69;
  --line: rgba(17, 72, 60, .18);
  --card-line: #1a715d;
  --shadow: 0 18px 50px rgba(42, 28, 11, .13);
  --glass: rgba(248, 244, 237, .92);
  --nav-height: 76px;
}

[data-theme="dark"] {
  --bg: #002e27;
  --surface: rgba(3, 60, 49, .78);
  --surface-solid: #063d33;
  --surface-2: #0a493c;
  --text: #fbf3e5;
  --muted: #b2c4bc;
  --emerald: #e8c27c;
  --emerald-deep: #f2d79d;
  --gold: #e7c074;
  --gold-soft: #bd9252;
  --line: rgba(235, 199, 128, .26);
  --card-line: #d8b66d;
  --shadow: 0 22px 58px rgba(0, 14, 11, .38);
  --glass: rgba(1, 49, 40, .94);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; background: #062e28; overscroll-behavior-y: none; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(226, 192, 123, .14), transparent 23rem),
    linear-gradient(135deg, #eae1d2 0%, #f8f5ee 48%, #e5dac9 100%);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }

body::before, body::after, .desktop-aura::before, .desktop-aura::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: 0;
  opacity: .28;
  background:
    repeating-linear-gradient(117deg, transparent 0 130px, rgba(150, 108, 46, .25) 131px, transparent 133px 268px),
    radial-gradient(ellipse at 80% 9%, transparent 0 34%, rgba(161, 118, 60, .28) 34.2%, transparent 34.7%);
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 50% -20%, #12614d, transparent 50%),
    radial-gradient(circle at 0 80%, rgba(15, 93, 75, .7), transparent 35%),
    #002d26;
}

[data-theme="dark"] body::before {
  opacity: .36;
  background:
    repeating-linear-gradient(117deg, transparent 0 130px, rgba(226, 190, 112, .23) 131px, transparent 133px 268px),
    radial-gradient(ellipse at 80% 9%, transparent 0 34%, rgba(224, 180, 94, .32) 34.2%, transparent 34.7%);
}

button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
  position: relative;
  width: min(100%, 440px);
  min-height: var(--app-viewport-height, 100dvh);
  margin: 0 auto;
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background-color .35s ease;
}

.app-shell::before {
  content: "";
  position: fixed;
  top: 0;
  width: min(100%, 440px);
  height: 100vh;
  pointer-events: none;
  opacity: .22;
  background:
    linear-gradient(113deg, transparent 18%, rgba(168, 120, 50, .42) 18.2%, transparent 18.8%),
    linear-gradient(155deg, transparent 74%, rgba(168, 120, 50, .38) 74.2%, transparent 74.8%);
  z-index: 0;
}

[data-theme="dark"] .app-shell::before { opacity: .28; }
.topbar, main, .bottom-nav { position: relative; z-index: 1; }

.topbar {
  height: calc(74px + max(env(safe-area-inset-top), var(--app-safe-top)));
  padding: calc(12px + max(env(safe-area-inset-top), var(--app-safe-top))) calc(18px + max(env(safe-area-inset-right), var(--app-safe-right))) 10px calc(18px + max(env(safe-area-inset-left), var(--app-safe-left)));
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

.icon-button, .theme-switch {
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.menu-button { justify-self: start; color: var(--emerald-deep); }
.brand { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.brand > div { display: grid; text-align: left; line-height: 1.05; }
.brand strong { font-size: 13px; font-weight: 700; letter-spacing: -.02em; }
.brand span { font-size: 8px; margin-top: 4px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 28px; height: 31px; position: relative; display: block; filter: drop-shadow(0 3px 4px rgba(0,0,0,.12)); }
.brand-mark::before { content: ""; position: absolute; inset: 2px; border: 1px solid var(--gold); transform: rotate(30deg); border-radius: 3px; }
.brand-mark i, .brand-mark b { position: absolute; bottom: 4px; width: 10px; height: 21px; background: linear-gradient(145deg, #3fd6a5, #00664f 60%, #003f34); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.brand-mark i { left: 6px; transform: rotate(-16deg); }
.brand-mark b { right: 5px; height: 18px; transform: rotate(18deg); }

.theme-switch { justify-self: end; position: relative; width: 48px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.theme-switch svg { width: 16px; height: 16px; position: absolute; transition: opacity .25s, transform .35s; }
.theme-switch .sun { left: 7px; color: var(--gold); opacity: 1; }
.theme-switch .moon { right: 7px; color: var(--muted); opacity: .5; }
.theme-switch span { position: absolute; width: 22px; height: 22px; border-radius: 8px; right: 4px; background: var(--surface-solid); box-shadow: 0 2px 8px rgba(0,0,0,.18); transition: transform .35s; }
[data-theme="dark"] .theme-switch span { transform: translateX(-18px); }
[data-theme="dark"] .theme-switch .sun { opacity: .35; }
[data-theme="dark"] .theme-switch .moon { opacity: 1; color: var(--gold); }

main { padding: 12px 14px calc(var(--nav-height) + 34px); }
.section-heading > div > span, .bottom-sheet header div > span { display: block; color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.apply-button {
  margin-top: 17px;
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: linear-gradient(135deg, #14775a, #0b503f);
  color: #fffaf0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  box-shadow: 0 8px 18px rgba(5, 72, 54, .22);
}

.search-section { padding: 16px 0 0; }
.search-box { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); backdrop-filter: blur(8px); }
.search-box svg { width: 19px; }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; appearance: none; -webkit-appearance: none; background: transparent !important; color: var(--text); font-size: 13px; box-shadow: none; }
.search-box input::-webkit-search-decoration, .search-box input::-webkit-search-cancel-button { display: none; }
.search-box input::placeholder { color: var(--muted); opacity: .82; }
.search-box button { border: 0; background: transparent; color: var(--muted); font-size: 21px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.search-box.has-value button { opacity: 1; pointer-events: auto; }
.control-row { display: grid; grid-template-columns: .9fr 1.25fr; gap: 9px; padding-top: 9px; }
.control-button { height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 11px; font-weight: 700; }
.control-button svg { width: 17px; }
.control-button .chevron { width: 14px; margin-left: auto; }
.control-button b { min-width: 17px; height: 17px; padding: 2px 4px; border-radius: 6px; color: #fff; background: var(--emerald); font-size: 9px; display: none; place-items: center; }
.control-button b.show { display: grid; }

.catalog-section { padding-top: 22px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 0 2px 9px; }
.section-heading h2 { margin: 2px 0 0; font-size: 17px; line-height: 1.2; letter-spacing: -.025em; }
.section-heading button { border: 0; background: transparent; color: var(--muted); padding: 5px 0; font-size: 10px; }
.section-heading button span { color: var(--gold); font-size: 17px; vertical-align: -1px; }
.category-list { display: grid; grid-auto-flow: column; grid-auto-columns: 76px; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 3px; }
.category-list::-webkit-scrollbar { display: none; }
.category-card { height: 94px; padding: 8px 4px 7px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); transition: transform .2s, border-color .2s, background .2s; }
.category-card.active { border-color: var(--card-line); background: color-mix(in srgb, var(--surface-solid), var(--emerald) 8%); }
.category-card:active { transform: scale(.97); }
.category-card b { font-size: 8px; text-transform: uppercase; }
.mini-device { position: relative; display: block; margin-top: 2px; width: 22px; height: 53px; border: 1px solid #81938c; border-radius: 6px 6px 8px 8px; background: linear-gradient(90deg, #dfded7, #457668 32%, #ebede6 56%, #19493e); box-shadow: 0 5px 8px rgba(0,0,0,.12); }
.mini-device i { position: absolute; top: -5px; left: 6px; width: 10px; height: 8px; border-radius: 3px 3px 1px 1px; background: #1b2521; }
.mini-device.slim { width: 15px; }
.mini-device.box { width: 31px; height: 45px; border-radius: 8px; background: linear-gradient(110deg, #282b29, #82705d 45%, #171a19); }
.mini-device.bottle { width: 24px; height: 46px; border-radius: 5px 5px 9px 9px; background: linear-gradient(90deg, #eef0e9, #8ea69d, #fff); }
.mini-device.accessory { height: 45px; transform: rotate(24deg); border-radius: 5px; background: linear-gradient(90deg, #eee, #b7bcb7, #fafafa); }

.products-section { padding-top: 22px; }
.product-heading { align-items: center; }
.result-count { min-width: 28px; height: 28px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); text-align: center; font-size: 10px; }
.quick-sort { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 1px 0 11px; }
.quick-sort::-webkit-scrollbar { display: none; }
.quick-sort button { white-space: nowrap; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 600; }
.quick-sort button.active { color: #fff; border-color: var(--emerald); background: var(--emerald); }
[data-theme="dark"] .quick-sort button.active { color: #15352e; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.product-card { min-width: 0; position: relative; padding: 9px; overflow: hidden; border: 1px solid var(--card-line); border-radius: 14px; background: var(--surface); box-shadow: 0 6px 18px rgba(22, 58, 48, .06); }
.product-visual { height: 137px; position: relative; display: grid; place-items: center; margin: -9px -9px 7px; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(34, 137, 102, .18), transparent 55%); }
.product-visual::after { content: ""; position: absolute; width: 74px; height: 12px; bottom: 15px; border-radius: 50%; background: rgba(0,0,0,.18); filter: blur(6px); }
.product-photo {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 138px;
  display: block;
  background-image: url("assets/product-sprite-v1.png");
  background-repeat: no-repeat;
  background-size: 300% 100%;
  filter: drop-shadow(0 9px 8px rgba(0,0,0,.2));
}
.product-photo-1 { background-position: left center; }
.product-photo-2 { background-position: center center; }
.product-photo-3 { background-position: right center; }
.product-device { position: relative; width: 48px; height: 103px; border: 1px solid var(--product-accent, #c9a75f); border-radius: 9px 9px 13px 13px; background: var(--product-gradient, linear-gradient(100deg,#123c33,#527265 38%,#06372c)); box-shadow: inset 0 0 8px rgba(255,255,255,.18), 0 9px 13px rgba(0,0,0,.22); transform: rotate(var(--tilt, -4deg)); z-index: 1; }
.product-device::before { content: ""; position: absolute; left: 12px; top: -21px; width: 24px; height: 25px; border-radius: 7px 7px 3px 3px; background: linear-gradient(90deg, #161b19, #606661, #0c100e); border: 1px solid #090b0a; }
.product-device::after { content: "◇"; position: absolute; left: 50%; top: 30px; color: var(--product-accent, #e3c278); font-size: 24px; transform: translateX(-50%); }
.product-device.box { width: 66px; height: 82px; border-radius: 12px; }
.product-device.box::before { left: 30px; top: -20px; width: 24px; }
.product-device.slim { width: 33px; height: 111px; }
.product-device.slim::before { left: 6px; width: 20px; }
.product-device.bottle { width: 43px; height: 82px; border-radius: 6px 6px 12px 12px; background: linear-gradient(90deg, #e8eee9, #718e83 35%, #fbfcf7 57%, #315d50); }
.product-device.bottle::before { left: 8px; top: -28px; width: 25px; height: 31px; background: linear-gradient(90deg, #f3f4ef, #b7bfbb, #fff); clip-path: polygon(30% 0, 70% 0, 100% 60%, 100% 100%, 0 100%, 0 60%); }
.product-device.accessory { width: 73px; height: 72px; border-radius: 50% 50% 15px 15px; }
.product-device.accessory::before { display: none; }
.product-badge { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 4px 6px; border-radius: 6px; color: #493614; background: #f3d58a; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.favorite { position: absolute; top: 6px; right: 6px; z-index: 2; width: 31px; height: 31px; display: grid; place-items: center; border: 0; background: transparent; }
.favorite svg { width: 18px; height: 18px; }
.favorite.active svg { color: #b7765e; fill: currentColor; }
.product-card h3 { overflow: hidden; margin: 0; font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.product-flavor { margin: 3px 0 9px; color: var(--muted); font-size: 9px; }
.product-footer { min-height: 33px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price { font-size: 14px; font-weight: 700; }
.add-button { width: 36px; height: 33px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-solid); color: var(--emerald-deep); transition: .2s; }
.add-button svg { width: 17px; }
.add-button.added { color: #fff; border-color: var(--emerald); background: var(--emerald); }
[data-theme="dark"] .add-button.added { color: #13342d; }
.empty-state { padding: 35px 12px 28px; border: 1px dashed var(--line); border-radius: 15px; text-align: center; color: var(--muted); }
.empty-state span { color: var(--gold); font-size: 36px; }
.empty-state h3 { margin: 4px 0; color: var(--text); font-size: 14px; }
.empty-state p { margin: 0; font-size: 11px; }
.empty-state button { margin-top: 14px; border: 0; background: transparent; color: var(--emerald); font-size: 11px; font-weight: 700; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 440px);
  height: calc(var(--nav-height) + max(env(safe-area-inset-bottom), var(--app-safe-bottom)));
  padding: 8px calc(8px + max(env(safe-area-inset-right), var(--app-safe-right))) calc(7px + max(env(safe-area-inset-bottom), var(--app-safe-bottom))) calc(8px + max(env(safe-area-inset-left), var(--app-safe-left)));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: none;
  z-index: 15;
}
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font-size: 8px; }
.bottom-nav svg { width: 21px; height: 21px; }
.bottom-nav button.active { color: var(--gold); }
.nav-icon-wrap { position: relative; height: 22px; }
.nav-icon-wrap b { position: absolute; top: -8px; right: -12px; min-width: 17px; height: 17px; display: none; place-items: center; padding: 0 4px; border: 2px solid var(--glass); border-radius: 9px; background: var(--emerald); color: #fff; font-size: 8px; }
.nav-icon-wrap b.show { display: grid; }
[data-theme="dark"] .nav-icon-wrap b { color: #13342d; }

.backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(0, 20, 16, .56); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.backdrop:not(.open) { pointer-events: none; }
.backdrop.open { opacity: 1; }
.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 31;
  width: min(100%, 440px);
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--surface-solid);
  box-shadow: 0 -20px 50px rgba(0,0,0,.24);
  transform: translate(-50%, 105%);
  transition: transform .32s cubic-bezier(.2,.75,.2,1);
}
.bottom-sheet.open { transform: translate(-50%, 0); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 13px; border-radius: 4px; background: var(--line); }
.bottom-sheet header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.bottom-sheet h2 { margin: 2px 0 0; font-size: 21px; }
.sheet-close { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: transparent; }
.sheet-close svg { width: 18px; }
.filter-group { padding: 17px 0; border-top: 1px solid var(--line); }
.filter-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 12px; }
.filter-title output { color: var(--gold); font-weight: 700; }
.filter-title button { border: 0; background: transparent; color: var(--muted); font-size: 9px; }
input[type="range"] { width: 100%; height: 4px; appearance: none; border-radius: 4px; background: linear-gradient(90deg, var(--emerald) var(--range-fill, 100%), var(--surface-2) var(--range-fill, 100%)); }
input[type="range"]::-webkit-slider-thumb { width: 21px; height: 21px; appearance: none; border: 3px solid var(--surface-solid); border-radius: 50%; background: var(--gold); box-shadow: 0 2px 7px rgba(0,0,0,.2); }
.range-labels { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 8px; }
.strength-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.strength-grid button { min-width: 0; height: 52px; padding: 5px 2px; display: grid; place-items: center; align-content: center; gap: 1px; border: 1px solid var(--line); border-radius: 11px; background: transparent; }
.strength-grid button b { font-family: "Cormorant Garamond", Georgia, serif; font-size: 18px; line-height: 1; }
.strength-grid button span { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 5.5px; text-overflow: ellipsis; white-space: nowrap; }
.strength-grid button.active { color: #fff; border-color: var(--emerald); background: var(--emerald); }
.strength-grid button.active span { color: currentColor; opacity: .8; }
[data-theme="dark"] .strength-grid button.active { color: #18392f; }
.apply-button { width: 100%; min-height: 48px; margin-top: 8px; font-size: 11px; }
.compact-sheet { padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
.sort-list { display: grid; gap: 7px; }
.sort-list button { height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; background: transparent; font-size: 11px; }
.sort-list i { width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 50%; }
.sort-list button.active { border-color: var(--card-line); }
.sort-list button.active i { border: 5px solid var(--emerald); }
.cart-sheet { max-height: 84vh; }
.cart-items { max-height: 45vh; overflow-y: auto; }
.cart-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line); }
.cart-thumb { width: 45px; height: 54px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); color: var(--gold); font-size: 25px; }
.cart-info h3 { margin: 0; font-size: 11px; }
.cart-info p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.qty-control { display: flex; align-items: center; gap: 4px; }
.qty-control button { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: transparent; }
.qty-control svg { width: 13px; }
.qty-control span { min-width: 20px; text-align: center; font-size: 10px; font-weight: 700; }
.cart-empty { display: grid; place-items: center; padding: 25px 0; color: var(--muted); font-size: 11px; }
.cart-empty span { color: var(--gold); font-size: 35px; }
.cart-empty p { margin: 3px; }
.cart-total { display: flex; justify-content: space-between; padding: 17px 0 2px; border-top: 1px solid var(--line); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-height) + 15px); z-index: 50; max-width: calc(100% - 34px); padding: 10px 14px; border: 1px solid rgba(230, 194, 121, .5); border-radius: 11px; background: #073f34; color: #fff8e9; box-shadow: 0 10px 24px rgba(0,0,0,.22); font-size: 10px; transform: translate(-50%, 25px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  body { padding: 28px 0; }
  .app-shell { min-height: calc(100vh - 56px); border: 1px solid rgba(207, 173, 105, .55); border-radius: 28px; }
  .app-shell::before { height: calc(100vh - 56px); }
  .topbar { border-radius: 28px 28px 0 0; }
  .bottom-nav { bottom: 28px; border-radius: 0 0 28px 28px; }
  .bottom-sheet { bottom: 28px; border-radius: 24px; border-bottom: 1px solid var(--line); }
  .toast { bottom: 115px; }
}

@media (max-width: 350px) {
  .product-visual { height: 126px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Reference-aligned compact Telegram layout */
.topbar {
  height: calc(62px + env(safe-area-inset-top));
  padding: calc(8px + env(safe-area-inset-top)) 12px 7px;
  grid-template-columns: 42px 1fr auto;
}
.brand { position: absolute; left: 50%; transform: translateX(-50%); }
.brand > div { text-align: center; }
.brand strong { font-size: 12px; }
.brand span { margin-top: 3px; font-size: 7px; letter-spacing: .04em; text-transform: none; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 5px; }
.theme-switch { width: 38px; height: 34px; border-radius: 11px; }
.theme-switch svg { width: 13px; height: 13px; }
.theme-switch .sun { left: 5px; }
.theme-switch .moon { right: 5px; }
.theme-switch span { width: 18px; height: 18px; right: 3px; border-radius: 6px; }
[data-theme="dark"] .theme-switch span { transform: translateX(-14px); }
.header-cart { position: relative; width: 35px; height: 35px; display: grid; place-items: center; border: 0; border-radius: 10px; color: var(--emerald-deep); background: transparent; }
.header-cart svg { width: 20px; height: 20px; }
.header-cart b { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; display: none; place-items: center; border: 2px solid var(--glass); border-radius: 9px; color: #fff; background: var(--emerald); font-size: 7px; }
.header-cart b.show { display: grid; }
[data-theme="dark"] .header-cart b { color: #16372f; }

main { padding: 10px 10px calc(var(--nav-height) + 22px); }

.app-shell[data-view="home"] .search-section { display: none; }
.app-shell[data-view="catalog"] .search-section { padding-top: 2px; }
.app-shell[data-view="catalog"] .catalog-section { padding-top: 13px; }
.catalog-section { padding-top: 16px; }
.section-heading { padding: 0 2px 7px; }
.section-heading h2 { font-size: 14px; }
.section-heading > div > span { font-size: 8px; }

.category-list { grid-auto-columns: 68px; gap: 5px; }
.category-card { height: 80px; padding: 6px 3px 5px; border-radius: 9px; }
.category-card b { font-size: 6px; letter-spacing: -.02em; }
.mini-device { margin-top: 4px; scale: .82; transform-origin: center; }
.app-shell[data-view="home"] .category-list { grid-auto-flow: initial; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
.app-shell[data-view="home"] .category-card { min-width: 0; }

.products-section { padding-top: 16px; }
.app-shell[data-view="home"] .quick-sort,
.app-shell[data-view="home"] .result-count { display: none; }
.home-see-all { display: none; }
.app-shell[data-view="home"] .home-see-all { display: block; }
.app-shell[data-view="home"] .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.app-shell[data-view="home"] .product-card { padding: 6px; border-radius: 9px; }
.app-shell[data-view="home"] .product-visual { height: 99px; margin: -6px -6px 5px; }
.app-shell[data-view="home"] .product-visual::after { width: 48px; bottom: 10px; }
.app-shell[data-view="home"] .product-device { scale: .73; }
.app-shell[data-view="home"] .favorite { top: 2px; right: 2px; width: 25px; height: 25px; }
.app-shell[data-view="home"] .favorite svg { width: 14px; height: 14px; }
.app-shell[data-view="home"] .product-badge { top: 5px; left: 5px; padding: 3px 4px; font-size: 6px; }
.app-shell[data-view="home"] .product-card h3 { font-size: 9px; }
.app-shell[data-view="home"] .product-flavor { height: 20px; margin: 2px 0 5px; overflow: hidden; font-size: 7px; line-height: 1.4; }
.app-shell[data-view="home"] .product-price { font-size: 11px; }
.app-shell[data-view="home"] .add-button { width: 28px; height: 27px; border-radius: 7px; }
.app-shell[data-view="home"] .add-button svg { width: 14px; }

.bottom-nav { height: calc(69px + env(safe-area-inset-bottom)); padding-top: 6px; }
.bottom-nav button { gap: 3px; font-size: 7px; }
.bottom-nav svg { width: 19px; height: 19px; }

/* Pixel-aligned home screen based on the supplied light/dark references. */
:root {
  --bg: #f8f5ee;
  --surface: rgba(255, 252, 246, .76);
  --surface-solid: #fbf8f1;
  --surface-2: #eee8dd;
  --text: #15302b;
  --muted: #697a76;
  --emerald: #0a5b45;
  --emerald-deep: #063e34;
  --gold: #9b6a24;
  --gold-soft: #c49a55;
  --line: rgba(32, 91, 76, .19);
  --card-line: #bfc8c0;
  --glass: rgba(249, 246, 239, .97);
  --nav-height: 64px;
}

[data-theme="dark"] {
  --bg: #002b24;
  --surface: rgba(1, 35, 28, .8);
  --surface-solid: #032f28;
  --surface-2: #063a31;
  --text: #fff8e9;
  --muted: #b8c7c1;
  --emerald: #e5bd72;
  --emerald-deep: #f2d49b;
  --gold: #e5bd72;
  --gold-soft: #bf9150;
  --line: rgba(232, 194, 119, .24);
  --card-line: #2a725e;
  --glass: rgba(0, 34, 28, .985);
}

body {
  background:
    radial-gradient(ellipse at 15% 8%, rgba(255,255,255,.92), transparent 31rem),
    repeating-linear-gradient(118deg, transparent 0 148px, rgba(170,126,62,.12) 149px, transparent 151px 292px),
    #eee5d7;
}

[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 52% -10%, rgba(13,102,79,.72), transparent 46rem),
    repeating-linear-gradient(118deg, transparent 0 148px, rgba(226,184,101,.12) 149px, transparent 151px 292px),
    #002c25;
}

body::before { display: none; }

.app-shell {
  background:
    radial-gradient(ellipse at 105% 18%, rgba(59,129,104,.035), transparent 40%),
    var(--bg);
}
[data-theme="dark"] .app-shell {
  background:
    radial-gradient(ellipse at 70% -12%, rgba(10,94,72,.18), transparent 42%),
    linear-gradient(126deg, transparent 0 58%, rgba(222,180,96,.016) 58.15%, transparent 58.55%),
    var(--bg);
}

.app-shell::before { display: none; }
.topbar {
  height: calc(63px + env(safe-area-inset-top));
  padding: calc(8px + env(safe-area-inset-top)) 12px 7px;
  border-bottom-color: var(--line);
  background: var(--glass);
}
html[data-telegram-mock="true"] .topbar {
  height: 82px;
  padding-top: 27px;
}
html[data-telegram-mock="true"] .topbar::before,
html[data-telegram-mock="true"] .topbar::after {
  position: absolute;
  top: 8px;
  z-index: 2;
  color: var(--text);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}
html[data-telegram-mock="true"] .topbar::before { content: "9:41"; left: 18px; }
html[data-telegram-mock="true"] .topbar::after { content: "▮▮▮ ))) ▰"; right: 15px; font-size: 7px; letter-spacing: 1px; }
html[data-telegram-hosted="true"] .topbar {
  height: 63px;
  padding-top: 8px;
}
html[data-telegram-hosted="true"] .topbar::before,
html[data-telegram-hosted="true"] .topbar::after { display: none; }
.menu-button svg { width: 21px; height: 21px; }
.brand strong { font-size: 12px; line-height: 1; }
.brand span { color: var(--muted); font-size: 7px; }
.header-actions { gap: 2px; }
.theme-switch {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}
.theme-switch span { display: none; }
.theme-switch .sun { left: 9px; opacity: 1; }
.theme-switch .moon { right: 9px; opacity: 0; }
[data-theme="dark"] .theme-switch .sun { opacity: 0; }
[data-theme="dark"] .theme-switch .moon { opacity: 1; }

main { padding: 10px 11px calc(var(--nav-height) + 24px); }
.catalog-section { padding-top: 17px; }
.app-shell[data-view="home"] .catalog-section { padding-top: 4px; }
.section-heading { align-items: center; padding: 0 2px 8px; }
.section-heading > div > span { display: none; }
.section-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.section-heading button { color: var(--muted); font-size: 9px; }
.section-heading button span { font-size: 15px; }
.category-list { gap: 4px; }
.app-shell[data-view="home"] .category-list { grid-template-columns: repeat(4, minmax(0,1fr)); }
.category-card {
  height: 104px;
  padding: 5px 2px 4px;
  border-color: var(--card-line);
  border-radius: 8px;
  background: rgba(0, 42, 34, .16);
  box-shadow: none;
}
[data-theme="light"] .category-card { background: rgba(255,255,255,.46); }
.category-card.active { color: var(--text); border-color: var(--card-line); background: rgba(0,42,34,.16); }
[data-theme="light"] .category-card.active { background: rgba(255,255,255,.46); }
[data-theme="dark"] .category-card,
[data-theme="dark"] .category-card.active { background: rgba(0,24,19,.55); }
.category-card b {
  min-height: 14px;
  display: grid;
  place-items: center;
  font-size: 6.2px;
  line-height: 1.08;
  text-transform: uppercase;
}
.mini-device { scale: .98; margin-top: 8px; }

.products-section { padding-top: 18px; }
.product-heading { padding-bottom: 8px; }
.app-shell[data-view="home"] .product-grid { gap: 5px; }
.product-card {
  padding: 6px;
  border-color: var(--card-line);
  border-radius: 9px;
  background: rgba(0, 42, 34, .28);
  box-shadow: none;
}
[data-theme="light"] .product-card { background: rgba(255,255,255,.52); }
[data-theme="dark"] .product-card { background: rgba(0,24,19,.55); }
.app-shell[data-view="home"] .product-visual {
  height: 146px;
  margin: -6px -6px 5px;
  background:
    radial-gradient(ellipse at 50% 73%, rgba(20,103,76,.11), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.07), transparent 58%);
}
.product-visual::after { bottom: 9px; opacity: .66; }
.app-shell[data-view="home"] .product-device { scale: .87; }
.app-shell[data-view="home"] .product-photo { width: 88px; height: 132px; }
.product-device { border-width: 1px; box-shadow: inset 7px 0 9px rgba(255,255,255,.13), inset -8px 0 11px rgba(0,0,0,.14), 0 8px 11px rgba(0,0,0,.24); }
.product-device::after { content: "◇"; font-family: Georgia,serif; }
.product-device.color-green.slim { width: 42px; height: 118px; border-radius: 7px 7px 11px 11px; }
.product-device.color-green.slim::before { left: 9px; width: 23px; }
.product-device.color-blue.slim { width: 36px; height: 116px; border-radius: 8px 8px 12px 12px; }
.product-device.color-blue.slim::before { left: 7px; width: 20px; }
.favorite { color: var(--emerald-deep); }
.app-shell[data-view="home"] .product-card h3 { font-size: 10px; line-height: 1.25; }
.app-shell[data-view="home"] .product-flavor { height: 17px; margin: 2px 0 7px; font-size: 8px; line-height: 1.35; }
.product-spec-line { min-height: 14px; margin: -4px 0 7px; display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--muted); font-size: 7px; font-weight: 600; white-space: nowrap; }
.product-spec-line span:first-child { color: var(--gold); }
.app-shell[data-view="home"] .product-spec-line { min-height: 12px; margin: -3px 0 5px; gap: 2px; font-size: 6px; }
.app-shell[data-view="home"] .product-price { font-size: 14px; }
.app-shell[data-view="home"] .add-button { width: 31px; height: 30px; border-color: var(--card-line); }
.product-badge { border: 1px solid rgba(139,96,38,.22); }

.bottom-nav {
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 6px 7px calc(5px + env(safe-area-inset-bottom));
  background: var(--glass);
}
.bottom-nav button { gap: 3px; font-size: 7.5px; }
.bottom-nav svg { width: 21px; height: 21px; }

@media (min-width: 720px) {
  .bottom-nav { bottom: 28px; }
}

/* Rich material pass: marble, layered glass and denser home content. */
:root {
  --card-line: rgba(26, 105, 85, .72);
  --line: rgba(25, 83, 69, .2);
  --glass: rgba(249, 246, 239, .9);
}

[data-theme="dark"] {
  --card-line: rgba(224, 186, 111, .78);
  --line: rgba(232, 194, 119, .25);
  --glass: rgba(0, 37, 30, .91);
}

[data-theme="light"] .app-shell {
  background-color: #f7f3ea;
  background-image:
    linear-gradient(rgba(249, 247, 241, .68), rgba(248, 245, 238, .78)),
    url("assets/marble-light-v1.png");
  background-position: center top;
  background-size: 100% auto;
  background-repeat: repeat-y;
}

[data-theme="dark"] .app-shell {
  background-color: #00382f;
  background-image:
    linear-gradient(rgba(0, 36, 29, .54), rgba(0, 31, 25, .67)),
    url("assets/marble-dark-v1.png");
  background-position: center top;
  background-size: 100% auto;
  background-repeat: repeat-y;
}

.topbar {
  box-shadow: 0 7px 24px rgba(20, 50, 42, .06);
}

[data-theme="light"] .topbar,
[data-theme="light"] .bottom-nav {
  background: rgba(250, 248, 243, .91);
}

[data-theme="dark"] .topbar,
[data-theme="dark"] .bottom-nav {
  background: rgba(0, 36, 29, .93);
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading h2::after {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: .72;
}

.category-card {
  height: 98px;
  border-width: 1px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 7px 16px rgba(26, 52, 43, .07);
}

[data-theme="light"] .category-card,
[data-theme="light"] .category-card.active {
  border-color: rgba(35, 112, 90, .48);
  background:
    linear-gradient(145deg, rgba(255,255,255,.88), rgba(250,247,240,.55)),
    url("assets/marble-light-v1.png") center / 360px auto;
}

[data-theme="dark"] .category-card,
[data-theme="dark"] .category-card.active {
  border-color: rgba(225, 187, 113, .67);
  background:
    linear-gradient(145deg, rgba(0,49,40,.72), rgba(0,28,23,.78)),
    url("assets/marble-dark-v1.png") center / 360px auto;
  box-shadow:
    inset 0 1px 0 rgba(247,213,151,.08),
    0 8px 19px rgba(0, 17, 13, .22);
}

.category-card .mini-device,
.category-card .mini-device.classic,
.category-card .mini-device.slim,
.category-card .mini-device.box,
.category-card .mini-device.bottle,
.category-card .mini-device.accessory {
  width: 43px;
  height: 64px;
  margin: 1px 0 0;
  scale: 1;
  transform: none;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("assets/product-sprite-v1.png");
  background-repeat: no-repeat;
  background-size: 300% 100%;
  box-shadow: none;
  filter: drop-shadow(0 7px 5px rgba(0,0,0,.18));
}

.category-card .mini-device::before,
.category-card .mini-device::after,
.category-card .mini-device i { display: none; }
.category-card:nth-child(1) .mini-device { background-position: left center; }
.category-card:nth-child(2) .mini-device { background-position: center center; }
.category-card:nth-child(3) .mini-device { background-position: right center; }
.category-card:nth-child(4) .mini-device {
  background-image: url("assets/product-sprite-v2.png");
  background-position: left center;
}
.category-card:nth-child(5) .mini-device {
  background-image: url("assets/product-sprite-v2.png");
  background-position: right center;
}
.category-card[data-category="device"] .mini-device { background-image: url("assets/product-sprite-v2.png"); background-position: left center; }
.category-card[data-category="cartridge"] .mini-device { background-image: url("assets/product-sprite-v2.png"); background-position: right center; }
.category-card[data-category="pod"] .mini-device { background-image: url("assets/product-sprite-v1.png"); background-position: left center; }
.category-card[data-category="liquid"] .mini-device { background-image: url("assets/product-sprite-v1.png"); background-position: right center; }

.catalog-category-label { display: none; }

.app-shell[data-view="catalog"] .catalog-section {
  padding-top: 10px;
}

.app-shell[data-view="catalog"] .catalog-section .section-heading,
.app-shell[data-view="catalog"] .products-section > .product-heading,
.app-shell[data-view="catalog"] .quick-sort {
  display: none;
}

.app-shell[data-view="catalog"] .category-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 6px;
  padding: 0 0 3px;
  overflow-x: auto;
}

.app-shell[data-view="catalog"] .category-card,
[data-theme="light"] .app-shell[data-view="catalog"] .category-card,
[data-theme="dark"] .app-shell[data-view="catalog"] .category-card {
  width: auto;
  min-width: max-content;
  height: 33px;
  padding: 0 11px;
  display: grid;
  place-items: center;
  border-color: var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  box-shadow: none;
}

[data-theme="light"] .app-shell[data-view="catalog"] .category-card {
  background: rgba(255,255,255,.58);
}

.app-shell[data-view="catalog"] .category-card.active {
  color: #fffdf4;
  border-color: #0e684f;
  background: #17694f;
}

[data-theme="dark"] .app-shell[data-view="catalog"] .category-card.active {
  color: #fff5df;
  border-color: rgba(229,190,114,.78);
  background: rgba(5, 88, 66, .86);
}

.app-shell[data-view="catalog"] .category-card .mini-device { display: none; }
.app-shell[data-view="catalog"] .category-card b {
  min-height: 0;
  display: block;
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}
.app-shell[data-view="catalog"] .home-category-label { display: none; }
.app-shell[data-view="catalog"] .catalog-category-label { display: inline; }
.app-shell[data-view="catalog"] .products-section { padding-top: 9px; }

[data-theme="light"] .app-shell[data-view="catalog"] {
  background-image:
    linear-gradient(rgba(249,247,241,.78), rgba(248,245,238,.85)),
    url("assets/marble-light-v1.png");
}

[data-theme="dark"] .app-shell[data-view="catalog"] {
  background-image:
    linear-gradient(rgba(0,34,27,.64), rgba(0,29,24,.74)),
    url("assets/marble-dark-v1.png");
}

.product-card {
  isolation: isolate;
  border-width: 1px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    0 9px 20px rgba(15, 46, 37, .1);
}

[data-theme="light"] .product-card {
  border-color: rgba(26, 105, 85, .72);
  background:
    linear-gradient(150deg, rgba(255,255,255,.9), rgba(249,246,238,.7)),
    url("assets/marble-light-v1.png") center / 430px auto;
}

[data-theme="dark"] .product-card {
  border-color: rgba(226, 187, 111, .86);
  background:
    linear-gradient(150deg, rgba(0,50,41,.74), rgba(0,27,22,.82)),
    url("assets/marble-dark-v1.png") center / 430px auto;
  box-shadow:
    inset 0 1px 0 rgba(251,220,160,.11),
    0 10px 22px rgba(0, 14, 11, .27);
}

.product-visual {
  isolation: isolate;
}

.product-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(21, 122, 90, .2), transparent 37%),
    linear-gradient(120deg, rgba(255,255,255,.08), transparent 42% 67%, rgba(203,163,84,.07));
}

[data-theme="dark"] .product-visual::before {
  background:
    radial-gradient(ellipse at 50% 82%, rgba(36, 151, 112, .27), transparent 38%),
    linear-gradient(120deg, rgba(255,255,255,.035), transparent 42% 67%, rgba(228,187,108,.08));
}

.product-photo-v2 { background-image: url("assets/product-sprite-v2.png"); }
.product-photo-v2-1 { background-position: left center; }
.product-photo-v2-2 { background-position: center center; }
.product-photo-v2-3 { background-position: right center; }

.product-badge {
  box-shadow: 0 3px 8px rgba(68, 44, 11, .12);
}

.add-button {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34);
}

[data-theme="light"] .add-button { background: rgba(252,249,242,.84); }
[data-theme="dark"] .add-button { background: rgba(0,39,32,.72); }

.home-collection--cheap { padding-top: 23px; }
.app-shell[data-view="catalog"] .home-collection,
.app-shell[data-view="catalog"] .home-benefits { display: none; }


.bottom-nav {
  box-shadow: 0 -10px 28px rgba(9, 36, 29, .1);
}

@media (max-width: 350px) {
  .category-card { height: 92px; }
  .category-card .mini-device { height: 58px; width: 39px; }
  .home-benefits span { font-size: 5px; }
}

/* Navigation, uploaded photos, service drawer and profile. */
.bottom-nav { grid-template-columns: repeat(5, 1fr); }
.bottom-nav button { font-weight: 500; }
.bottom-nav svg { stroke-width: 1.65; }

.product-uploaded-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 17px 14px 10px;
  display: block;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 9px 8px rgba(0,0,0,.2));
}
.cart-thumb { overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; padding: 4px; display: block; object-fit: contain; object-position: center; }

.product-card.out-of-stock { opacity: .72; }
.product-card.out-of-stock .product-visual { filter: saturate(.65); }
.stock-note { display: block; min-height: 11px; margin: -4px 0 5px; color: var(--muted); font-size: 6.5px; }
.stock-note.low { color: #a76d22; }
[data-theme="dark"] .stock-note.low { color: var(--gold-soft); }
.add-button:disabled { opacity: .48; cursor: not-allowed; }

.app-shell:not([data-view="home"]) .home-collection,
.app-shell:not([data-view="home"]) .home-benefits { display: none; }
.app-shell[data-view="favorites"] .catalog-section { display: none; }
.app-shell[data-view="favorites"] .products-section { padding-top: 14px; }
.app-shell[data-view="favorites"] .quick-sort { display: none; }
.app-shell[data-view="favorites"] .product-heading { display: flex; }
.app-shell[data-view="profile"] .search-section,
.app-shell[data-view="profile"] .catalog-section,
.app-shell[data-view="profile"] .products-section { display: none; }

.side-menu {
  position: fixed;
  z-index: 31;
  top: 0;
  bottom: 0;
  left: max(0px, calc(50% - 220px));
  width: min(88vw, 360px);
  padding: calc(22px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  color: #fff7e8;
  background:
    linear-gradient(rgba(0,39,32,.75), rgba(0,27,22,.88)),
    url("assets/marble-dark-v1.png") center / auto 100%;
  box-shadow: 20px 0 60px rgba(0,17,13,.36);
  transform: translateX(-105%);
  transition: transform .28s ease;
}
.side-menu.open { transform: translateX(0); }
.side-menu > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid rgba(229,189,112,.26); }
.side-menu > header span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.side-menu > header h2 { margin: 2px 0 0; font: 600 23px/1 "Cormorant Garamond", Georgia, serif; }
.side-menu .sheet-close { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(228,190,115,.24); border-radius: 11px; color: #e8d6af; background: rgba(0,20,16,.24); }
.side-menu-lead { margin: 20px 0 14px; color: #a9bdb5; font-size: 10px; line-height: 1.65; }
.side-menu nav { display: grid; }
.side-menu nav button { min-height: 64px; padding: 9px 3px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid rgba(228,190,115,.16); color: inherit; background: transparent; text-align: left; }
.side-menu nav svg { width: 22px; color: var(--gold); }
.side-menu nav span { display: grid; gap: 3px; }
.side-menu nav b { font-size: 10px; }
.side-menu nav small { color: #9eb3ab; font-size: 7.5px; }
.side-menu nav i { color: var(--gold); font-size: 17px; font-style: normal; }
.side-menu > footer { margin-top: auto; padding: 13px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(228,190,115,.18); border-radius: 12px; color: #96aaa2; background: rgba(0,22,18,.25); font-size: 7.5px; line-height: 1.45; }
.side-menu > footer b { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 10px; color: var(--gold); font: 600 12px "Cormorant Garamond", Georgia, serif; }

.profile-view { padding: 8px 1px 0; }
.profile-title > span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.profile-title h1 { margin: 2px 0 14px; font-size: 21px; }
.profile-card { position: relative; min-height: 105px; padding: 17px; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; overflow: hidden; border: 1px solid var(--card-line); border-radius: 15px; }
[data-theme="light"] .profile-card { background: linear-gradient(145deg,rgba(255,255,255,.86),rgba(248,243,234,.7)),url("assets/marble-light-v1.png") center / 430px auto; }
[data-theme="dark"] .profile-card { background: linear-gradient(145deg,rgba(0,50,41,.8),rgba(0,27,22,.88)),url("assets/marble-dark-v1.png") center / 430px auto; }
.profile-card::after { content: ""; position: absolute; width: 95px; height: 95px; right: -24px; bottom: -46px; border: 1px solid var(--gold); transform: rotate(30deg); opacity: .13; }
.profile-avatar { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); background: rgba(9,91,69,.09); }
.profile-avatar svg { width: 29px; height: 29px; }
.profile-card > div:nth-child(2) { min-width: 0; }
.profile-card > div:nth-child(2) > span { color: var(--gold); font-size: 7px; font-weight: 700; text-transform: uppercase; }
.profile-card h2 { overflow: hidden; margin: 3px 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.profile-card p { overflow: hidden; margin: 0; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.profile-card > b { align-self: start; padding: 4px 7px; border: 1px solid var(--gold); border-radius: 7px; color: var(--gold); font-size: 7px; }
.profile-stats { margin-top: 11px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.profile-stats article { min-height: 67px; padding: 9px 4px; display: grid; place-items: center; align-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.profile-stats strong { color: var(--gold); font: 600 21px/1 "Cormorant Garamond", Georgia, serif; }
.profile-stats span { color: var(--muted); font-size: 7px; }
.profile-menu { margin-top: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.profile-menu button { width: 100%; min-height: 62px; padding: 8px 12px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: transparent; text-align: left; }
.profile-menu button:last-child { border-bottom: 0; }
.profile-menu svg { width: 21px; color: var(--gold); }
.profile-menu span { display: grid; gap: 3px; }
.profile-menu b { font-size: 10px; }
.profile-menu small { color: var(--muted); font-size: 7.5px; }
.profile-menu i { color: var(--gold); font-size: 17px; font-style: normal; }

@media (min-width: 720px) {
  .side-menu { top: 28px; bottom: 28px; border: 1px solid rgba(228,190,115,.35); border-radius: 28px 0 0 28px; }
}

/* Final optical alignment: centered title, larger actions and centered artwork. */
.brand strong {
  color: var(--text);
  font: 600 17px/.9 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .015em;
  white-space: nowrap;
}
.brand strong b {
  color: var(--gold);
  font: inherit;
  font-weight: 600;
  letter-spacing: .13em;
}
.brand > div > span {
  margin-top: 5px;
  color: var(--gold);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.theme-switch,
.header-cart { width: 40px; height: 40px; }
.theme-switch svg {
  top: 50%;
  left: 50% !important;
  right: auto !important;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
}
.header-cart svg { width: 24px; height: 24px; }

/* The source sprite objects have asymmetric transparent margins.
   These offsets center the visible object, not merely its PNG canvas. */
.product-photo-1 { transform: translate(-20.3%, 0); }
.product-photo-2 { transform: translate(0, -3.2%); }
.product-photo-3 { transform: translate(19%, -5.5%); }
.product-photo-v2-1 { transform: translate(-6.35%, 1%); }
.product-photo-v2-2 { transform: translate(0, 2%); }
.product-photo-v2-3 { transform: translate(5.9%, 1.5%); }

.category-card:nth-child(1) .mini-device { transform: translateX(-20.3%); }
.category-card:nth-child(2) .mini-device { transform: translateY(-3.2%); }
.category-card:nth-child(3) .mini-device { transform: translate(19%, -5.5%); }
.category-card:nth-child(4) .mini-device { transform: translate(-6.35%, 1%); }
.category-card:nth-child(5) .mini-device { transform: translate(5.9%, 1.5%); }

/* Product copy, favorites and numeric cart controls. */
.product-card > h3 { padding-inline: 4px; }
.product-card > .product-flavor {
  margin-left: 4px;
  margin-right: 4px;
}
.product-card > .stock-note {
  margin-left: 4px;
  margin-right: 4px;
}
.product-card > .product-footer { padding-inline: 4px; }
.add-button.added b { font-size: 14px; line-height: 1; }

.favorite.active {
  border-radius: 50%;
  background: rgba(215, 48, 70, .1);
}
.favorite.active svg {
  color: #d73046;
  fill: #d73046;
  stroke: #d73046;
  filter: drop-shadow(0 2px 4px rgba(155, 20, 40, .2));
}
[data-theme="dark"] .favorite.active { background: rgba(255, 92, 111, .12); }
[data-theme="dark"] .favorite.active svg {
  color: #ff5c6f;
  fill: #ff5c6f;
  stroke: #ff5c6f;
}

.cart-row { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 12px 0; }
.cart-info { min-width: 0; }
.cart-info h3,
.cart-info p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qty-control {
  gap: 5px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}
.qty-control button {
  width: 30px;
  height: 30px;
  border-color: transparent;
  background: var(--surface-solid);
}
.qty-control svg { width: 15px; height: 15px; }
.qty-control span { min-width: 22px; font-size: 14px; }

/* Readable production typography and full-page cart. */
:root { --muted: #536862; }
[data-theme="dark"] { --muted: #c9d4cf; }
body {
  font-weight: 500;
  text-rendering: optimizeLegibility;
}
.section-heading h2 { font-size: 15px; font-weight: 700; letter-spacing: .015em; }
.section-heading button { font-size: 10px; font-weight: 500; }
.category-card b { font-size: 7.5px; font-weight: 600; line-height: 1.18; }
.app-shell[data-view="home"] .product-card h3 { font-size: 11px; font-weight: 600; }
.app-shell[data-view="home"] .product-flavor { font-size: 9px; font-weight: 500; line-height: 1.4; }
.product-card h3 { font-weight: 600; }
.product-flavor { font-size: 9.5px; font-weight: 500; }
.product-price { font-weight: 700; letter-spacing: .01em; }
.bottom-nav button { position: relative; font-size: 8.5px; font-weight: 600; }
.side-menu-lead { font-size: 10.5px; }
.side-menu nav b { font-size: 11px; font-weight: 600; }
.side-menu nav small { font-size: 8.5px; line-height: 1.45; }
.profile-card h2 { font-size: 15px; font-weight: 600; }
.profile-card p,
.profile-menu small { font-size: 8.5px; }
.profile-menu b { font-size: 11px; font-weight: 600; }

#cartBottomBadge {
  position: absolute;
  top: 2px;
  left: calc(50% + 7px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  display: none;
  place-items: center;
  border: 2px solid var(--glass);
  border-radius: 8px;
  color: #fff;
  background: #c53046;
  font-size: 7px;
  line-height: 1;
}
#cartBottomBadge.show { display: grid; }

.app-shell[data-view="cart"] .search-section,
.app-shell[data-view="cart"] .catalog-section,
.app-shell[data-view="cart"] .products-section,
.app-shell[data-view="cart"] .home-collection,
.app-shell[data-view="cart"] .home-benefits { display: none; }

.cart-view { padding: 8px 1px 0; }
.cart-page-title > span {
  color: var(--gold);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cart-page-title h1 { margin: 2px 0 14px; font-size: 23px; line-height: 1.1; }
.cart-page-card {
  min-height: calc(100dvh - 230px);
  padding: 3px 13px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 55, 45, .08);
}
.cart-view .cart-items { max-height: none; overflow: visible; }
.cart-view .cart-row { grid-template-columns: 58px minmax(0, 1fr) auto; min-height: 88px; }
.cart-view .cart-thumb { position: relative; width: 58px; height: 68px; overflow: hidden; }
.cart-view .cart-thumb .product-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92px;
  height: 138px;
  flex: 0 0 auto;
  translate: -50% -50%;
  scale: .46;
}
.cart-view .cart-info h3 { font-size: 11.5px; font-weight: 600; }
.cart-view .cart-info p { font-size: 9px; font-weight: 500; }
.cart-view .cart-empty {
  flex: 1;
  min-height: 310px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
}
.cart-view .cart-empty[hidden] { display: none !important; }
.cart-view .cart-empty svg { width: 42px; height: 42px; color: var(--gold); }
.cart-view .cart-empty h2 { margin: 4px 0 0; color: var(--text); font-size: 15px; }
.cart-view .cart-empty p { margin: 0; font-size: 10px; }
.cart-view .cart-total { margin-top: auto; padding: 16px 2px 5px; font-size: 14px; }
.cart-view .cart-total strong { font-size: 17px; }
.checkout-button { width: 100%; margin-top: 12px; }
.checkout-button:disabled { opacity: .42; cursor: not-allowed; }

.checkout-dialog {
  width: min(420px, calc(100% - 22px));
  max-height: min(720px, calc(100dvh - 24px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: 22px;
  color: var(--text);
  background:
    linear-gradient(color-mix(in srgb, var(--surface-solid), transparent 5%), color-mix(in srgb, var(--surface-solid), transparent 5%)),
    url("assets/marble-light-v1.png") center / 560px auto;
  box-shadow: 0 24px 70px rgba(0, 23, 18, .34);
}
[data-theme="dark"] .checkout-dialog {
  background:
    linear-gradient(rgba(1, 45, 36, .95), rgba(0, 31, 25, .97)),
    url("assets/marble-dark-v1.png") center / 560px auto;
}
.checkout-dialog::backdrop { background: rgba(0, 20, 16, .68); backdrop-filter: blur(5px); }
.checkout-form { max-height: min(720px, calc(100dvh - 24px)); padding: 19px 18px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; }
.checkout-form > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.checkout-form > header span { color: var(--gold); font-size: 7.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.checkout-form > header h2 { margin: 3px 0 0; font-size: 23px; line-height: 1.1; }
.checkout-close { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); }
.checkout-close svg { width: 18px; height: 18px; }
.checkout-summary { min-height: 55px; margin: 17px 0 15px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.checkout-summary span { color: var(--muted); font-size: 10px; }
.checkout-summary strong { color: var(--gold); font-family: "Cormorant Garamond", Georgia, serif; font-size: 22px; font-weight: 600; }
.checkout-field { margin-top: 13px; display: grid; gap: 7px; }
.checkout-field > span { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; }
.checkout-field > span svg { width: 17px; height: 17px; color: var(--gold); }
.checkout-field textarea,
.checkout-field input { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--text); background: var(--surface); font: 500 12px/1.45 Manrope, Arial, sans-serif; transition: border-color .18s, box-shadow .18s; }
.checkout-field textarea { min-height: 82px; padding: 12px; resize: vertical; }
.checkout-field input { height: 50px; padding: 0 12px; }
.checkout-field textarea::placeholder,
.checkout-field input::placeholder { color: var(--muted); opacity: .72; }
.checkout-field textarea:focus,
.checkout-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold), transparent 84%); }
.checkout-field small { color: var(--muted); font-size: 7.5px; line-height: 1.4; }
.checkout-error { min-height: 17px; margin: 10px 1px 2px; color: #c44753; font-size: 9px; line-height: 1.4; }
[data-theme="dark"] .checkout-error { color: #ff9ca5; }
.checkout-confirm { width: 100%; min-height: 54px; padding: 9px 14px; display: grid; place-items: center; align-content: center; gap: 2px; border: 1px solid #0a523f; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #16775b, #0b5a45); }
[data-theme="dark"] .checkout-confirm { color: #2e220f; border-color: #b68132; background: linear-gradient(135deg, #f0d18e, #d6a84f); }
.checkout-confirm span { font-size: 11px; font-weight: 700; }
.checkout-confirm small { color: currentColor; font-size: 7px; opacity: .72; }
.checkout-confirm:disabled { opacity: .58; cursor: wait; }

@media (max-width: 430px) {
  .checkout-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 20px; }
  .checkout-form { max-height: calc(100dvh - 16px); padding: 17px 15px calc(16px + env(safe-area-inset-bottom)); }
}

/* Independent price boundaries. */
.price-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.price-fields label {
  height: 54px;
  padding: 7px 11px 6px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.price-fields label:focus-within { border-color: var(--gold); }
.price-fields span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.price-fields input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  appearance: textfield;
}
.price-fields input::-webkit-inner-spin-button,
.price-fields input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.price-fields input::placeholder { color: var(--muted); opacity: .65; font-weight: 500; }
.dual-range {
  position: relative;
  height: 27px;
  margin: 13px 3px 0;
}
.dual-range-track {
  position: absolute;
  top: 12px;
  right: 0;
  left: 0;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-2);
}
.dual-range-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: inherit;
  background: linear-gradient(90deg,var(--emerald),var(--gold));
}
.dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 27px;
  margin: 0;
  appearance: none;
  pointer-events: none;
  background: transparent;
}
.dual-range #priceFromRange { z-index: 3; }
.dual-range input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.dual-range input[type="range"]::-moz-range-track { height: 4px; background: transparent; }
.dual-range input[type="range"]::-webkit-slider-thumb {
  width: 21px;
  height: 21px;
  margin-top: -8px;
  appearance: none;
  border: 3px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 2px 7px rgba(0,0,0,.24);
  pointer-events: auto;
  cursor: grab;
}
.dual-range input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 2px 7px rgba(0,0,0,.24);
  pointer-events: auto;
  cursor: grab;
}
.dual-range input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; scale: 1.06; }
.dual-range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; font-weight: 600; }

/* Direct quantity control on every product card. */
.product-card { cursor: pointer; }
.product-footer.has-quantity { gap: 3px; }
.card-qty-control {
  width: 62px;
  height: 31px;
  flex: 0 0 62px;
  display: grid;
  grid-template-columns: 21px 20px 21px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-solid), var(--emerald) 7%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.card-qty-control button {
  width: 100%;
  height: 100%;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--emerald-deep);
}
.card-qty-control button:active { background: color-mix(in srgb, var(--emerald), transparent 84%); }
.card-qty-control svg { width: 12px; height: 12px; stroke-width: 2.2; }
.card-qty-control span {
  min-width: 20px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
[data-theme="dark"] .card-qty-control {
  border-color: rgba(233,194,119,.9);
  background: rgba(2,39,32,.92);
}
[data-theme="dark"] .card-qty-control button { color: var(--gold); }
.app-shell[data-view="home"] .product-footer.has-quantity { padding-inline: 1px; }
.app-shell[data-view="home"] .product-footer.has-quantity .product-price { font-size: 12px; letter-spacing: -.02em; }
.app-shell[data-view="home"] .card-qty-control {
  width: 58px;
  flex-basis: 58px;
  grid-template-columns: 20px 18px 20px;
  height: 29px;
  border-radius: 8px;
}

/* Full product page, designed as a natural continuation of the catalogue. */
.app-shell[data-view="detail"] .search-section,
.app-shell[data-view="detail"] .catalog-section,
.app-shell[data-view="detail"] .products-section,
.app-shell[data-view="detail"] .home-collection,
.app-shell[data-view="detail"] .home-benefits { display: none; }

.product-detail-view {
  margin: -12px -14px 0;
  padding-bottom: 14px;
  animation: detail-enter .28s cubic-bezier(.2,.75,.25,1) both;
}
.detail-toolbar {
  height: 51px;
  padding: 5px 14px 4px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
}
.detail-toolbar > span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 16px;
  font-weight: 650;
  text-align: center;
  letter-spacing: .02em;
}
.detail-toolbar button {
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: transparent;
}
.detail-toolbar button:last-child { justify-self: end; }
.detail-toolbar svg { width: 22px; height: 22px; }
.detail-favorite.active {
  color: #d73046;
  background: rgba(215,48,70,.1);
}
.detail-favorite.active svg { fill: currentColor; }
[data-theme="dark"] .detail-favorite.active { color: #ff5c6f; }

.detail-hero {
  position: relative;
  height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 76%, rgba(22,113,84,.28), transparent 37%),
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(242,235,223,.66)),
    url("assets/marble-light-v1.png") center / 470px auto;
}
[data-theme="dark"] .detail-hero {
  background:
    radial-gradient(ellipse at 50% 78%, rgba(45,169,126,.3), transparent 37%),
    linear-gradient(145deg, rgba(0,51,42,.75), rgba(0,25,21,.86)),
    url("assets/marble-dark-v1.png") center / 470px auto;
}
.detail-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 150px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,.22);
  filter: blur(10px);
  transform: translateX(-50%);
}
.detail-hit {
  position: absolute;
  top: 15px;
  left: 16px;
  z-index: 4;
  padding: 6px 9px;
  border: 1px solid rgba(128,83,23,.18);
  border-radius: 7px;
  color: #513814;
  background: linear-gradient(135deg,#f7dda0,#eabe67);
  box-shadow: 0 5px 14px rgba(62,38,8,.12);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.detail-orbit {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--gold), transparent 66%);
  border-radius: 50%;
  pointer-events: none;
}
.detail-orbit-one { width: 225px; height: 225px; transform: rotate(-22deg); }
.detail-orbit-two { width: 184px; height: 270px; transform: rotate(33deg); opacity: .48; }
.detail-art {
  position: relative;
  z-index: 2;
  width: 230px;
  height: 272px;
  display: grid;
  place-items: center;
}
.detail-art .product-photo { width: 174px; height: 261px; }
.detail-art .product-device { scale: 1.72; }
.detail-art .product-uploaded-photo { padding: 20px 24px 10px; }
.detail-dots {
  position: absolute;
  z-index: 4;
  bottom: 14px;
  left: 50%;
  display: flex;
  gap: 5px;
  transform: translateX(-50%);
}
.detail-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .42; }
.detail-dots i:first-child { width: 12px; border-radius: 5px; background: var(--gold); opacity: 1; }

.detail-content { padding: 18px 16px 8px; }
.detail-eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
}
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-title-row h1 {
  margin: 0;
  font: 650 31px/.95 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.02em;
}
.detail-flavor { margin: 6px 0 0; color: var(--muted); font-size: 11px; font-weight: 600; }
.detail-stock {
  flex: 0 0 auto;
  margin-top: 5px;
  color: #27805e;
  font-size: 8px;
  font-weight: 700;
}
.detail-stock::before { content: ""; width: 6px; height: 6px; margin-right: 5px; display: inline-block; border-radius: 50%; background: currentColor; }
.detail-stock.sold-out { color: #bd4c55; }
[data-theme="dark"] .detail-stock { color: #6cd2a7; }
.detail-description {
  margin: 15px 0 14px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.55;
}
.detail-features {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 5px;
}
.detail-features article {
  min-height: 70px;
  padding: 8px 3px 7px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  text-align: center;
}
.detail-features svg { width: 18px; height: 18px; color: var(--gold); }
.detail-features span { color: var(--muted); font-size: 7px; }
.detail-features b { max-width: 100%; overflow: hidden; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.detail-purchase {
  margin-top: 15px;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}
.detail-price { display: grid; gap: 2px; }
.detail-price span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.detail-price strong { font: 650 27px/1 "Cormorant Garamond", Georgia, serif; }
.detail-stepper {
  height: 42px;
  display: grid;
  grid-template-columns: 40px 38px 40px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: var(--surface);
}
.detail-stepper button { width: 100%; height: 100%; padding: 0; display: grid; place-items: center; border: 0; background: transparent; color: var(--emerald-deep); }
.detail-stepper button:disabled { opacity: .32; }
.detail-stepper svg { width: 15px; height: 15px; stroke-width: 2.2; }
.detail-stepper output { font-size: 14px; font-weight: 800; text-align: center; }
.detail-cart-button {
  width: 100%;
  min-height: 49px;
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #0b4a3a;
  border-radius: 12px;
  color: #fffaf0;
  background: linear-gradient(135deg,#14775a,#084635);
  box-shadow: 0 10px 22px rgba(5,69,52,.22);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .015em;
}
.detail-cart-button.in-cart { color: #34250e; border-color: #ad7a2d; background: linear-gradient(135deg,#f0d18e,#d7a951); }
.detail-cart-button:disabled { opacity: .45; cursor: not-allowed; }
.detail-cart-button svg { width: 19px; height: 19px; }
[data-theme="dark"] .detail-stepper button { color: var(--gold); }

@keyframes detail-enter {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 350px) {
  .app-shell[data-view="home"] .product-footer.has-quantity .product-price { font-size: 10.5px; }
  .app-shell[data-view="home"] .card-qty-control { width: 54px; flex-basis: 54px; grid-template-columns: 18px 18px 18px; }
  .detail-hero { height: 276px; }
}

/* Swipeable product gallery: the first uploaded photo is always the cover. */
.detail-slides {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.detail-slides::-webkit-scrollbar { display: none; }
.detail-slide {
  min-width: 100%;
  height: 100%;
  flex: 0 0 100%;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.detail-slide .detail-art { pointer-events: none; user-select: none; }
.detail-slide img { -webkit-user-drag: none; user-select: none; }
.detail-art.gallery-detail { scale: 1.12; }
.detail-art.gallery-angle { rotate: -6deg; scale: .95; }
.detail-thumbnails {
  position: absolute;
  z-index: 6;
  top: 62px;
  left: 12px;
  display: grid;
  gap: 6px;
}
.detail-thumbnails button {
  width: 39px;
  height: 45px;
  padding: 2px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: color-mix(in srgb,var(--surface-solid),transparent 10%);
  box-shadow: 0 4px 12px rgba(8,44,35,.08);
}
.detail-thumbnails button.active { color: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 1px color-mix(in srgb,var(--gold),transparent 65%); }
.detail-thumbnails img { width: 100%; height: 100%; display: block; object-fit: contain; }
.detail-thumbnails span { font: 650 12px "Cormorant Garamond",Georgia,serif; }
.gallery-arrow {
  position: absolute;
  z-index: 7;
  top: 50%;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: color-mix(in srgb,var(--surface-solid),transparent 12%);
  box-shadow: 0 5px 15px rgba(5,35,28,.12);
  transform: translateY(-50%);
}
.gallery-arrow:disabled { opacity: .24; cursor: default; }
.gallery-arrow svg { width: 16px; height: 16px; }
.gallery-previous { left: 58px; }
.gallery-next { right: 12px; }
.gallery-next svg { transform: rotate(180deg); }
.detail-gallery-status {
  position: absolute;
  z-index: 7;
  right: 14px;
  bottom: 12px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.detail-gallery-status .detail-dots {
  position: static;
  display: flex;
  gap: 5px;
  transform: none;
  pointer-events: auto;
}
.detail-gallery-status .detail-dots button {
  width: 5px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: var(--muted);
  opacity: .4;
  transition: width .2s,opacity .2s,background .2s;
}
.detail-gallery-status .detail-dots button.active { width: 15px; background: var(--gold); opacity: 1; }
.detail-gallery-status > span {
  position: absolute;
  right: 0;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: color-mix(in srgb,var(--surface-solid),transparent 12%);
  font-size: 7px;
  font-weight: 700;
}
