:root {
  --bg: oklch(100% 0 89.9);
  --surface: oklch(97% 0 89.9);
  --fg: oklch(23.5% 0.002 286.3);
  --muted: oklch(47.1% 0.003 264.5);
  --border: oklch(88.7% 0.008 286.2);
  --accent-brand: oklch(64% 0.194 327.5);
  --service: oklch(77.6% 0.112 188.5);
  --warn: oklch(76.9% 0.173 64.4);
  --danger: oklch(67.2% 0.187 19.2);
  --font-display: 'Bodoni 72', 'Didot', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lato', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page, var(--bg)); color: var(--ink, var(--fg)); }
body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 8%, color-mix(in oklch, var(--accent) 10%, transparent), transparent 28rem),
    linear-gradient(180deg, var(--page, var(--bg)), var(--soft, var(--surface)));
  color: var(--ink, var(--fg));
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.theme-boutique {
  --page: oklch(100% 0 89.9);
  --soft: oklch(97% 0 89.9);
  --panel: oklch(100% 0 89.9);
  --ink: oklch(22% 0.006 285);
  --subtle: oklch(50% 0.008 285);
  --line: oklch(88.7% 0.008 286.2);
  --primary: oklch(23.5% 0.002 286.3);
  --accent: oklch(64% 0.194 327.5);
  --secondary: oklch(77.6% 0.112 188.5);
  --radius: 10px;
  --display: var(--font-display);
}
.theme-carelab {
  --page: oklch(99% 0.006 190);
  --soft: oklch(95% 0.018 190);
  --panel: oklch(100% 0 89.9);
  --ink: oklch(22% 0.02 210);
  --subtle: oklch(48% 0.022 210);
  --line: oklch(89% 0.016 190);
  --primary: oklch(45% 0.108 188.5);
  --accent: oklch(64% 0.194 327.5);
  --secondary: oklch(77.6% 0.112 188.5);
  --radius: 18px;
  --display: 'Söhne', 'Avenir Next', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.theme-pop {
  --page: oklch(99% 0.006 330);
  --soft: oklch(96% 0.018 330);
  --panel: oklch(100% 0 89.9);
  --ink: oklch(19% 0.016 285);
  --subtle: oklch(47% 0.025 285);
  --line: oklch(88% 0.018 330);
  --primary: oklch(64% 0.194 327.5);
  --accent: oklch(76.9% 0.173 64.4);
  --secondary: oklch(77.6% 0.112 188.5);
  --radius: 22px;
  --display: 'Avenir Next', 'Söhne', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid color-mix(in oklch, var(--line) 72%, transparent);
  background: color-mix(in oklch, var(--page) 88%, transparent);
  backdrop-filter: blur(18px);
}
.brand-logo { width: 154px; height: auto; }
.nav { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--subtle);
  font-size: 14px;
}
.nav a.active, .nav a:hover { background: color-mix(in oklch, var(--primary) 8%, transparent); color: var(--ink); }
.actions { display: flex; align-items: center; gap: 10px; }
.pill, .btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 0 16px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover, .icon-btn:hover, .pill:hover { transform: translateY(-1px); border-color: color-mix(in oklch, var(--primary) 35%, var(--line)); }
.btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn.accent { background: var(--accent); color: white; border-color: var(--accent); }
.btn.secondary { background: color-mix(in oklch, var(--secondary) 20%, white); border-color: color-mix(in oklch, var(--secondary) 40%, var(--line)); }
.icon-btn { width: 44px; padding: 0; font-weight: 800; }
.cart-dot { min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: white; font-size: 12px; margin-left: -7px; }

.wrap { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, .96fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(54px, 8vw, 104px) 0 42px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 104px);
  line-height: .92;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 {
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 64px);
  line-height: .98;
  text-wrap: balance;
}
h3 { font-size: 22px; line-height: 1.15; }
p { color: var(--subtle); line-height: 1.65; }
.lead { font-size: clamp(18px, 2vw, 22px); max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 16px);
  background: var(--panel);
  padding: clamp(18px, 3vw, 32px);
  overflow: hidden;
  min-height: 520px;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  background: linear-gradient(140deg, color-mix(in oklch, var(--secondary) 22%, transparent), color-mix(in oklch, var(--accent) 13%, transparent));
}
.hero-product {
  position: relative;
  width: min(420px, 90%);
  margin: 30px auto 0;
  filter: drop-shadow(0 28px 44px color-mix(in oklch, var(--ink) 18%, transparent));
}
.hero-badge {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 2;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  line-height: 1.1;
}

.trust { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; margin: 22px 0 54px; }
.trust div { padding: 18px; border-right: 1px solid var(--line); }
.trust div:last-child { border-right: 0; }
.trust strong { display: block; margin-bottom: 4px; }
.trust span { color: var(--subtle); font-size: 14px; }

.section { padding: 54px 0; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.section-head p { max-width: 560px; margin: 0; }
.grid { display: grid; gap: 18px; }
.grid.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .product-card, .summary-card, .admin-card, .table-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.product-card { overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-height: 100%; }
.product-image { background: color-mix(in oklch, var(--soft) 78%, white); aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 24px; }
.product-image img { max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-info { padding: 18px; display: grid; gap: 12px; }
.product-info h3 { font-size: 17px; min-height: 40px; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.price { font-size: 20px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; width: fit-content; border-radius: 999px; padding: 6px 10px; background: color-mix(in oklch, var(--secondary) 22%, white); color: color-mix(in oklch, var(--primary) 80%, black); font-size: 12px; font-weight: 800; }

.routine { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; align-items: stretch; }
.quiz { padding: 24px; }
.quiz-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.quiz-options button.active { background: var(--primary); color: white; border-color: var(--primary); }
.routine-result { padding: 24px; display: grid; gap: 14px; background: linear-gradient(145deg, color-mix(in oklch, var(--secondary) 18%, white), var(--panel)); }
.micro-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.micro-list li { display: flex; align-items: center; gap: 10px; color: var(--subtle); }
.micro-list li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }

.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 32px 0 64px; }
.filters { position: sticky; top: 96px; align-self: start; padding: 20px; display: grid; gap: 14px; }
.filter-group { display: grid; gap: 8px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; min-height: 38px; padding: 0 12px; cursor: pointer; }
.chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.catalog-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.sort-select, .field {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  background: white;
  color: var(--ink);
  padding: 0 14px;
}

.product-detail { display: grid; grid-template-columns: minmax(320px, .92fr) minmax(320px, 1.08fr); gap: clamp(26px, 5vw, 70px); padding: 54px 0; }
.gallery { border: 1px solid var(--line); border-radius: calc(var(--radius) + 12px); background: var(--panel); padding: 26px; }
.gallery-main { aspect-ratio: 1 / 1; display: grid; place-items: center; background: color-mix(in oklch, var(--soft) 82%, white); border-radius: var(--radius); padding: 32px; }
.detail-copy { display: grid; align-content: start; gap: 18px; }
.selector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.selector-grid button { min-height: 50px; border-radius: calc(var(--radius) - 2px); border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.selector-grid button.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.purchase-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qty { display: inline-grid; grid-template-columns: 44px 52px 44px; min-height: 48px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--panel); }
.qty button { border: 0; background: transparent; cursor: pointer; }
.qty output { display: grid; place-items: center; font-weight: 900; font-variant-numeric: tabular-nums; }

.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding: 42px 0 70px; }
.cart-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 100px; aspect-ratio: 1 / 1; object-fit: contain; background: var(--soft); border-radius: calc(var(--radius) - 4px); padding: 10px; }
.summary-card { padding: 22px; position: sticky; top: 96px; align-self: start; }
.summary-line { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--subtle); }
.summary-line.total { color: var(--ink); font-weight: 900; font-size: 20px; border-bottom: 0; }
.coupon { display: flex; gap: 8px; margin: 18px 0; }
.coupon input { flex: 1; min-width: 0; }
.checkout-form { padding: 24px; display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: var(--subtle); font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; }
textarea.field { min-height: 96px; padding-top: 12px; resize: vertical; }
.error-text { color: var(--danger); min-height: 20px; font-size: 13px; }

.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--soft); }
.admin-side { padding: 24px; border-right: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; height: 100vh; }
.admin-side img { width: 150px; margin-bottom: 28px; }
.admin-tabs { display: grid; gap: 8px; }
.admin-tabs button { justify-content: flex-start; width: 100%; }
.admin-tabs button.active { background: var(--primary); color: white; border-color: var(--primary); }
.admin-main { padding: 30px clamp(18px, 4vw, 46px); }
.admin-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 24px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.admin-card { padding: 18px; }
.admin-card span { color: var(--subtle); font-size: 13px; }
.admin-card strong { display: block; margin-top: 8px; font-size: 28px; font-variant-numeric: tabular-nums; }
.table-panel { overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--subtle); background: color-mix(in oklch, var(--soft) 70%, white); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.status { display: inline-flex; min-height: 28px; align-items: center; border-radius: 999px; padding: 0 9px; font-weight: 800; font-size: 12px; }
.status.ok { background: color-mix(in oklch, var(--secondary) 22%, white); color: color-mix(in oklch, var(--primary) 84%, black); }
.status.warn { background: color-mix(in oklch, var(--warn) 18%, white); color: color-mix(in oklch, var(--warn) 60%, black); }
.status.hot { background: color-mix(in oklch, var(--accent) 18%, white); color: color-mix(in oklch, var(--accent) 55%, black); }
.tab-panel[hidden] { display: none; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 12px 16px;
  transform: translateY(90px);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.mobile-cta { display: none; }

@media (max-width: 1024px) {
  .topbar { grid-template-columns: 160px 1fr; }
  .actions { justify-content: end; }
  .nav { grid-column: 1 / -1; justify-content: start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .hero, .product-detail, .cart-layout, .checkout-layout, .routine { grid-template-columns: 1fr; }
  .grid.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .summary-card { position: static; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { grid-template-columns: 1fr auto; padding: 12px 16px; }
  .brand-logo { width: 126px; }
  .nav { display: none; }
  .actions .pill { display: none; }
  .wrap { width: min(100% - 28px, 1180px); }
  .hero { padding-top: 36px; }
  h1 { font-size: clamp(44px, 18vw, 72px); }
  .hero-card { min-height: 410px; }
  .hero-badge { width: 96px; height: 96px; font-size: 12px; }
  .trust { grid-template-columns: 1fr; }
  .trust div { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid.products, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .section-head, .catalog-toolbar, .admin-head { display: grid; align-items: start; }
  .cart-item { grid-template-columns: 86px 1fr; }
  .cart-item > .price { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .selector-grid { grid-template-columns: 1fr; }
  .admin-tabs { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .table-panel { overflow-x: auto; }
  .mobile-cta { display: flex; position: sticky; bottom: 0; z-index: 30; padding: 12px 14px; background: color-mix(in oklch, var(--page) 88%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .mobile-cta .btn { width: 100%; }
}
