/* =========================================================================
   Premium Peptides — verkkokauppa
   Design language: "clinical editorial".

   The previous stylesheet was a conventional card-and-shadow webshop. This one
   is built on a different set of rules:
     - hairlines instead of shadows; elevation only on hover
     - genuinely neutral greys (no blue tint in the surfaces) so the one accent
       blue reads as deliberate wherever it appears
     - near-black navy as the dominant "dark", used for the topbar, primary
       buttons and the footer
     - large, tightly tracked headings against small wide-tracked eyebrows
     - a monospace face for technical values (categories, dosages, order
       numbers, IBAN) - this is a laboratory product, and the numbers should
       look measured
   ========================================================================= */

:root {
  /* Surfaces - warm-neutral, deliberately not blue */
  --paper: #ffffff;
  --paper-2: #f6f7f9;
  --paper-3: #eceef2;

  /* Ink */
  --ink: #0b1220;
  --ink-2: #1d2637;
  --muted: #5f6875;
  --muted-2: #8d95a2;

  /* Hairlines */
  --line: #e4e7ec;
  --line-2: #f0f2f5;

  /* Accent - one precise blue, used sparingly */
  --accent: #1552f0;
  --accent-ink: #0f3fc4;
  --accent-wash: #eff4ff;
  --accent-line: #cfdeff;

  --danger: #dc2626;
  --danger-wash: #fef2f2;
  --warn: #b45309;
  --warn-wash: #fffbeb;
  --ok: #16a34a;

  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --pill: 999px;

  --shadow: 0 1px 2px rgba(11, 18, 32, .04);
  --shadow-lift: 0 18px 44px -22px rgba(11, 18, 32, .38);
  --ring: 0 0 0 3px rgba(21, 82, 240, .18);

  --max: 1320px;
  --gut: 24px;
}

* { box-sizing: border-box; }

/* The hidden attribute must always win, even over rules that set display
   (e.g. .cart-drawer { display: flex }) - without this the cart drawer,
   its backdrop and the cart badge render permanently. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 15.5px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.032em;
  line-height: 1.12;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--muted); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Small wide-tracked label used above section titles and on technical data. */
.eyebrow, .card-cat, .blog-date, .product-brand, .sidebar h4, .footer-grid h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}

.topbar-note {
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px; letter-spacing: .04em;
  padding: 9px 16px;
  background: var(--ink);
  color: rgba(255, 255, 255, .66);
}
.topbar-note strong { color: #fff; font-weight: 500; }

.header-inner { display: flex; align-items: center; gap: 28px; height: 76px; }

.brand { display: flex; align-items: center; flex: none; }
.brand-logo { height: 46px; width: auto; display: block; }

.main-nav { display: flex; gap: 2px; font-size: 14.5px; }
.main-nav a {
  position: relative;
  color: var(--muted); padding: 10px 2px; margin: 0 12px;
  white-space: nowrap; transition: color .15s;
}
/* Underline indicator instead of a filled pill - lighter, more editorial. */
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.active { color: var(--ink); font-weight: 600; }
.main-nav a.active::after { background: var(--accent); transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.search { position: relative; display: flex; }
.search input {
  width: 210px; padding: 9px 36px 9px 14px;
  background: var(--paper-2); border: 1px solid transparent; border-radius: var(--pill);
  color: var(--ink); font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .16s, background .16s, width .22s;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus { background: #fff; border-color: var(--ink); width: 250px; }
.search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px;
}
.search button:hover { color: var(--ink); }

.cart-btn {
  position: relative; background: none; border: 1px solid var(--line);
  color: var(--ink); width: 42px; height: 42px; border-radius: var(--pill);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cart-btn:hover { border-color: var(--ink); background: var(--paper-2); }
.cart-count {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--accent); color: #fff; border-radius: var(--pill);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  display: grid; place-items: center; border: 2px solid #fff;
}

.burger { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; }
.burger span { display: block; height: 1.5px; background: var(--ink); margin: 5px 9px; border-radius: 2px; }

/* -------------------------------------------------------------------- main */
main { flex: 1; padding: 40px var(--gut) 100px; }

.page-head { margin-bottom: 36px; max-width: 900px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 52px); margin-bottom: .3em; }
.page-head p { font-size: 16.5px; color: var(--muted); }

.breadcrumbs {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 18px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

/* -------------------------------------------------------------------- hero */
.hero-banner {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  transition: border-color .2s;
}
.hero-banner:hover { border-color: var(--ink); }
.hero-banner a { display: block; }
/* The banner is a wide artwork: let it scale to the container width and keep
   its own ratio, so the reserved height from the img width/height attributes
   stays correct at every viewport. */
.hero-banner img { width: 100%; height: auto; display: block; }

/* Trust strip: one hairline-bordered row, columns divided by rules. Replaces
   the old row of filled badge cards. */
.badges {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r);
  margin: 28px 0 0; overflow: hidden; background: var(--paper);
}
.home-badges { margin-top: 24px; }
.badge {
  display: flex; gap: 12px; align-items: center;
  padding: 20px 22px; font-size: 12.8px; color: var(--muted);
  border-left: 1px solid var(--line); line-height: 1.45;
}
.badge:first-child { border-left: 0; }
.badge b {
  display: block; color: var(--ink); font-weight: 600;
  font-size: 13.5px; margin-bottom: 2px; letter-spacing: -.01em;
}
.badge-icon { font-size: 19px; flex: none; opacity: .9; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; letter-spacing: -.01em;
  cursor: pointer; font-family: inherit;
  transition: background .16s, border-color .16s, color .16s, transform .1s;
}
.btn:active { transform: translateY(1px); }
/* Primary is ink, not accent: the blue stays reserved for meaning (links,
   prices, active state), which makes it read louder where it does appear. */
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ----------------------------------------------------------- section heads */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  margin: 84px 0 26px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: clamp(23px, 3vw, 34px); margin: 0; }
.section-head a {
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  white-space: nowrap; flex: none; transition: color .15s;
}
.section-head a:hover { color: var(--accent); }

/* -------------------------------------------------------------- shop grids */
.shop-layout { display: grid; grid-template-columns: 216px 1fr; gap: 56px; align-items: start; }

.sidebar { position: sticky; top: 108px; }
.sidebar h4 { color: var(--muted-2); margin: 0 0 14px; }
.sidebar a {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 9px 0 9px 14px; font-size: 14px; color: var(--muted);
  border-left: 2px solid var(--line-2);
  transition: color .14s, border-color .14s;
}
.sidebar a:hover { color: var(--ink); border-left-color: var(--muted-2); }
.sidebar a.active { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.sidebar a span { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar .muted { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.toolbar select {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  padding: 9px 14px; border-radius: var(--r-sm); font-size: 13.5px;
  font-family: inherit; cursor: pointer;
}
.toolbar select:hover { border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 26px 22px; }

/* ------------------------------------------------------------ product card */
.card {
  display: flex; flex-direction: column;
  background: none; position: relative;
}
.card-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .2s, box-shadow .25s;
}
.card-media img {
  width: 100%; height: 100%; object-fit: contain; padding: 26px;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.card:hover .card-media { border-color: var(--ink); box-shadow: var(--shadow-lift); }
.card:hover .card-media img { transform: scale(1.05); }

.tag-row { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 2; }
.pill {
  font-family: var(--mono);
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 9px; border-radius: var(--r-sm); background: #fff; color: var(--ink);
  border: 1px solid var(--line);
}
.pill-sale { background: var(--danger); color: #fff; border-color: var(--danger); }
.pill-new { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill-best { background: #fff; color: var(--ink); border-color: var(--ink); }
.pill-out { background: var(--paper-3); color: var(--muted); }

.card-body { padding: 16px 2px 0; display: flex; flex-direction: column; flex: 1; gap: 7px; }
.card-cat { color: var(--muted-2); }
.card-title {
  font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink);
  letter-spacing: -.015em; transition: color .14s;
}
.card-title:hover { color: var(--accent); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price .now { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price .was { font-size: 12.5px; color: var(--muted-2); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.price .ask { font-size: 13px; color: var(--warn); font-weight: 600; }

.add-btn {
  background: none; border: 1px solid var(--line);
  color: var(--ink); border-radius: var(--r-sm); padding: 9px 15px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.add-btn:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: #fff; }
.add-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ----------------------------------------------------------- product page */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.product-gallery {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--paper-2); overflow: hidden; position: sticky; top: 108px;
}
.product-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 56px; }

.product-info h1 { font-size: clamp(27px, 3.4vw, 42px); margin-bottom: .35em; }
.product-brand { color: var(--accent); margin-bottom: 14px; }
.product-lead { color: var(--muted); font-size: 16.5px; line-height: 1.6; margin: 0 0 28px; }

/* Price sits on a plain rule, not in a tinted box - quieter and more precise. */
.price-box {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin: 0 0 24px; padding: 24px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.price-box .now { font-size: 38px; font-weight: 700; color: var(--ink); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price-box .was { font-size: 17px; }
.save-pill {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--danger-wash); color: var(--danger); padding: 6px 11px; border-radius: var(--r-sm);
}
.vat-note { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); width: 100%; letter-spacing: .02em; }

.stock-line { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 0 0 24px; color: var(--ink); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(22, 163, 74, .14); flex: none; }
.dot.off { background: var(--muted-2); box-shadow: 0 0 0 4px rgba(141, 149, 162, .16); }

.buy-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.qty button { width: 44px; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; transition: color .12s, background .12s; }
.qty button:hover { color: var(--ink); background: var(--paper-2); }
.qty input { width: 46px; text-align: center; background: none; border: 0; color: var(--ink); font-size: 15px; font-weight: 600; font-family: var(--mono); }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.usp-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; font-size: 14px; color: var(--muted); }
.usp-list li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line-2); }
.usp-list li:last-child { border-bottom: 1px solid var(--line-2); }
.usp-list svg { color: var(--accent); flex: none; margin-top: 3px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 28px; }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--paper-2); padding: 6px 11px; border-radius: var(--r-sm);
}

/* -------------------------------------------------- long-form product copy */
.product-desc { margin-top: 80px; border-top: 1px solid var(--line); padding-top: 48px; max-width: 74ch; }
.product-desc h2 { font-size: 24px; margin-top: 48px; }
.product-desc h2:first-child { margin-top: 0; }
.product-desc h3 { font-size: 17px; margin-top: 32px; }
.product-desc p, .product-desc li { color: var(--ink-2); font-size: 15.5px; }
.product-desc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.product-desc a:hover { color: var(--accent-ink); }
.product-desc ul, .product-desc ol { padding-left: 20px; }
.product-desc li { margin-bottom: 6px; }
.product-desc table {
  width: 100%; border-collapse: collapse; margin: 22px 0;
  font-family: var(--mono); font-size: 12.5px;
}
.product-desc th, .product-desc td { border-bottom: 1px solid var(--line); padding: 11px 14px; text-align: left; }
.product-desc th {
  background: none; color: var(--muted-2); font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; font-size: 10.5px;
  border-bottom-color: var(--ink);
}
.product-desc img { border-radius: var(--r); margin: 16px 0; }
.product-desc em { color: var(--muted); }

/* -------------------------------------------------------------------- cart */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(11, 18, 32, .45); backdrop-filter: blur(2px); z-index: 90; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: #fff; z-index: 100;
  display: flex; flex-direction: column;
  animation: slide-in .26s cubic-bezier(.3, .9, .3, 1);
}
@keyframes slide-in { from { transform: translateX(100%); } }
.cart-drawer header { display: flex; align-items: center; justify-content: space-between; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.cart-drawer header h3 { margin: 0; font-size: 17px; }
.cart-drawer header button {
  background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1;
  cursor: pointer; width: 40px; height: 40px; margin: -8px -10px -8px 0; border-radius: var(--r-sm);
}
.cart-drawer header button:hover { background: var(--paper-2); color: var(--ink); }
#cart-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.cart-items { flex: 1; overflow-y: auto; padding: 8px 26px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cart-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.cart-item img { width: 60px; height: 60px; object-fit: contain; background: var(--paper-2); border-radius: var(--r-sm); padding: 6px; }
.cart-item-name { font-size: 13.5px; line-height: 1.4; margin-bottom: 6px; font-weight: 600; color: var(--ink); display: block; }
.cart-item-name:hover { color: var(--accent); }
.cart-qty { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.cart-qty button {
  width: 26px; height: 26px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: none; color: var(--ink); cursor: pointer; line-height: 1; font-size: 13px;
}
.cart-qty button:hover { border-color: var(--ink); background: var(--paper-2); }
.cart-line-total { font-weight: 700; font-size: 14px; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.cart-remove { display: block; background: none; border: 0; color: var(--muted-2); font-size: 11.5px; cursor: pointer; padding: 5px 0 0; }
.cart-remove:hover { color: var(--danger); }

.cart-foot { border-top: 1px solid var(--line); padding: 22px 26px calc(26px + env(safe-area-inset-bottom, 0px)); }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sum-row.total { font-size: 19px; font-weight: 700; color: var(--ink); margin: 14px 0 18px; padding-top: 14px; border-top: 1px solid var(--line); letter-spacing: -.02em; }
.ship-hint {
  font-family: var(--mono); font-size: 11.5px; color: var(--accent); letter-spacing: .04em;
  margin-bottom: 14px; padding: 10px 12px; background: var(--accent-wash); border-radius: var(--r-sm);
}

.empty-state { text-align: center; padding: 80px 24px; color: var(--muted); }
.empty-state svg { color: var(--paper-3); margin-bottom: 18px; }
.empty-state h1 { margin-bottom: .4em; }
.empty-state p { margin-bottom: 24px; }

/* ---------------------------------------------------------------- checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 30px; }
.panel + .panel { margin-top: 20px; }
.panel h3 { font-size: 16px; margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
/* Step markers: thin outlined circles, mono numeral. */
.panel h3 i {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--ink); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-style: normal; font-weight: 600;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; color: var(--ink); font-weight: 600; letter-spacing: -.005em; }
.field label .muted { font-weight: 400; }
.field input, .field textarea {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; color: var(--ink); font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.field textarea { resize: vertical; min-height: 92px; }
.field .err { font-size: 12px; color: var(--danger); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }

.pay-options { display: grid; gap: 12px; }
.pay-option {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pay-option:hover { border-color: var(--muted-2); }
.pay-option input { margin-top: 3px; accent-color: var(--accent); }
.pay-option.selected { border-color: var(--ink); background: var(--paper-2); }
.pay-option b { display: block; font-size: 14.5px; margin-bottom: 3px; color: var(--ink); }
.pay-option span { font-size: 12.8px; color: var(--muted); line-height: 1.5; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.55; }
.consent input { margin-top: 3px; accent-color: var(--accent); }
.consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.summary { position: sticky; top: 108px; }
.summary-items { max-height: 340px; overflow-y: auto; margin-bottom: 18px; }
.summary-item { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.summary-item span { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.summary-item b { color: var(--ink); font-variant-numeric: tabular-nums; }

.alert { padding: 14px 16px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 20px; }
.alert-error { background: var(--danger-wash); border: 1px solid #fecaca; color: #991b1b; }

/* ------------------------------------------------------ order confirmation */
.confirm { max-width: 680px; margin: 0 auto; text-align: center; padding: 24px 0; }
.confirm h1 { font-size: clamp(27px, 3.6vw, 40px); }
.confirm-icon {
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; margin: 0 auto 26px;
}
.order-no {
  font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--ink);
  letter-spacing: .06em; margin: 10px 0 18px;
}
.confirm-panel { text-align: left; margin-top: 26px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.status-badge {
  display: inline-block; padding: 7px 14px; border-radius: var(--pill);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; border: 1px solid;
}
.st-pending { background: var(--warn-wash); color: var(--warn); border-color: #fde68a; }
.st-paid, .st-processing { background: var(--accent-wash); color: var(--accent-ink); border-color: var(--accent-line); }
.st-shipped { background: var(--accent-wash); color: var(--accent-ink); border-color: var(--accent-line); }
.st-completed { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.st-cancelled, .st-refunded { background: var(--danger-wash); color: #991b1b; border-color: #fecaca; }

/* -------------------------------------------------------------------- blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 40px 28px; }

.blog-card { display: flex; flex-direction: column; }
.blog-cover {
  display: block; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .2s, box-shadow .25s;
}
.blog-cover img { width: 100%; height: 100%; object-fit: contain; padding: 26px; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.blog-card:hover .blog-cover { border-color: var(--ink); box-shadow: var(--shadow-lift); }
.blog-card:hover .blog-cover img { transform: scale(1.04); }

.blog-card-body { padding: 18px 2px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-date { color: var(--muted-2); }
.blog-title { font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ink); letter-spacing: -.025em; }
.blog-title:hover { color: var(--accent); }
.blog-excerpt { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
.blog-more { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.blog-more:hover { color: var(--accent); }

.post { max-width: 74ch; margin: 0 auto; }
.post-title { font-size: clamp(30px, 4.4vw, 50px); margin: 10px 0 .3em; }
.post-meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 32px; }
.post-cover { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); margin-bottom: 36px; }
.post-cover img { width: 100%; max-height: 400px; object-fit: contain; padding: 30px; }
.post-body { margin-top: 0; border-top: 0; padding-top: 0; max-width: none; }
.post-body h2 { font-size: 26px; }

/* ---------------------------------------------------------- static content */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 48px; font-size: 24px; }
.prose h3 { margin-top: 30px; font-size: 16.5px; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose .panel { margin-top: 26px; }

/* -------------------------------------------------------------------- misc */
.spinner {
  width: 26px; height: 26px; border: 2px solid var(--line);
  border-top-color: var(--ink); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 90px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-stack { position: fixed; bottom: 26px; right: 26px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink); color: #fff;
  padding: 15px 19px; border-radius: var(--r-sm); font-size: 14px;
  box-shadow: var(--shadow-lift); animation: toast-in .22s ease; max-width: 340px;
}
.toast.err { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .62); padding: 80px 0 32px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 48px; }
.footer-grid h4 { color: rgba(255, 255, 255, .42); margin-bottom: 18px; }
.footer-grid p { font-size: 13.5px; line-height: 1.7; }
.footer-grid a { display: block; font-size: 13.5px; color: rgba(255, 255, 255, .62); padding: 6px 0; transition: color .14s; }
.footer-grid a:hover { color: #fff; }
.site-footer .muted { color: rgba(255, 255, 255, .5); }
/* The logo is a light-background raster, so it gets its own white chip rather
   than sitting awkwardly on the dark panel. */
.footer-brand {
  display: inline-flex; background: #fff; padding: 10px 16px;
  border-radius: var(--r-sm); margin-bottom: 20px;
}
.footer-brand .brand-logo { height: 44px; }

.disclaimer {
  margin-top: 56px; padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r);
  font-size: 12.5px; color: rgba(255, 255, 255, .58); line-height: 1.7;
}
.disclaimer strong { color: #fcd34d; font-weight: 600; }
.copy { margin-top: 24px; font-size: 11.5px; text-align: center; font-family: var(--mono); letter-spacing: .04em; color: rgba(255, 255, 255, .38); }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .shop-layout, .checkout-layout, .product-layout { grid-template-columns: 1fr; gap: 40px; }
  .summary, .product-gallery, .sidebar { position: static; }
  .product-gallery img { padding: 40px; }

  /* Categories collapse into one horizontally scrollable row of chips. */
  .sidebar {
    display: flex; overflow-x: auto; gap: 8px;
    padding: 2px var(--gut) 12px; margin: 0 calc(var(--gut) * -1) 8px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar h4 { display: none; }
  .sidebar a {
    flex: none; border: 1px solid var(--line); border-left-width: 1px;
    border-radius: var(--pill); padding: 9px 16px; font-size: 13.5px; white-space: nowrap;
  }
  .sidebar a.active { border-color: var(--ink); }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

/* The six-item nav is ~550px wide; below this it pushes the search field and
   cart button off the right edge, so it collapses into the burger menu well
   before phone widths. */
@media (max-width: 980px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 8px var(--gut) 16px;
    box-shadow: var(--shadow-lift);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 15px 0; margin: 0; border-bottom: 1px solid var(--line-2); }
  .main-nav a::after { display: none; }
  .burger { display: block; }
}

@media (max-width: 860px) {
  .badges { grid-template-columns: 1fr 1fr; }
  .badge:nth-child(3) { border-left: 0; }
  .badge:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --gut: 18px; }
  .topbar-note { font-size: 10.5px; padding: 8px 12px; }
  .tn-extra { display: none; }
  .header-inner { height: 64px; gap: 14px; }
  .brand-logo { height: 38px; }

  /* 16px inputs stop iOS Safari from zooming the page on focus.
     Selectors mirror the base rules so specificity wins everywhere. */
  input, select, textarea,
  .field input, .field textarea, .search input,
  .toolbar select, .qty input { font-size: 16px; }

  main { padding-top: 26px; padding-bottom: 64px; }
  .page-head { margin-bottom: 26px; }
  .hero-banner { border-radius: var(--r); }
  .section-head { margin-top: 56px; }
  .product-desc { margin-top: 52px; padding-top: 34px; }
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 22px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 20px 14px; }
  .blog-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding-top: 56px; }

  .toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }

  /* Touch targets. Anything tappable gets to ~44px on a phone, either by
     growing the box or by padding the hit area out around inline text. */
  .add-btn { min-height: 44px; padding: 12px 16px; }
  .btn { padding: 15px 24px; }
  .search button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; right: 2px; }
  .section-head a { padding: 11px 0; }
  .blog-more { padding-top: 12px; padding-bottom: 6px; }
  .footer-grid a { padding: 11px 0; }
  .cart-qty button { width: 34px; height: 34px; font-size: 15px; }
  .cart-remove { padding: 8px 0 0; }
  .card-title { padding: 2px 0; }
  .brand { padding: 4px 0; }
  .qty button { width: 48px; height: 48px; }
  .breadcrumbs { margin-bottom: 14px; }
  .breadcrumbs a { display: inline-block; padding: 6px 0; }
}

@media (max-width: 560px) {
  .header-actions { flex: 1; }
  .search { flex: 1; }
  .search input, .search input:focus { width: 100%; }
  .badges { grid-template-columns: 1fr; }
  .badge { border-left: 0; }
  .badge:nth-child(n+2) { border-top: 1px solid var(--line); }
  .card-media img { padding: 16px; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .add-btn { width: 100%; }
  .price-box .now { font-size: 32px; }
}

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