/* =========================================================================
   Premium Peptides — Storefront
   Dark "lab" theme. Mobile-first: base rules target phones, media queries
   scale up. Product photography is white-background, so every image sits on
   its own light panel inside the dark surface.
   ========================================================================= */
:root {
  /* canvas */
  --bg: #060b16;
  --bg-2: #0a1120;
  --surface: #101a2e;
  --surface-2: #16233c;
  --surface-3: #1d2c49;

  /* light panels that carry white-background product photos */
  --panel: #f4f7fd;
  --panel-2: #e8eefa;

  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);

  --text: #e9eefb;
  --text-dim: #a9b6d0;
  --muted: #7f8ead;
  --ink: #ffffff;

  /* brand */
  --accent: #3d7dff;
  --accent-hi: #6aa0ff;
  --accent-deep: #1e4fd0;
  --accent-2: #22d3ee;
  --accent-soft: rgba(61, 125, 255, .14);
  --accent-line: rgba(61, 125, 255, .34);

  --danger: #ff6b6b;
  --warn: #fbbf24;
  --ok: #34d399;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --ring: 0 0 0 3px rgba(61, 125, 255, .28);
  --glow: 0 0 0 1px rgba(61, 125, 255, .35), 0 12px 34px -12px rgba(61, 125, 255, .55);
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --sh: 0 18px 40px -20px rgba(0, 0, 0, .9);
  --sh-lg: 0 32px 70px -28px rgba(0, 0, 0, .95);

  --max: 1280px;
}

* { box-sizing: border-box; }

/* The hidden attribute must always win over rules that set display. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 16px/1.65 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(61, 125, 255, .20), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(34, 211, 238, .12), transparent 60%),
    var(--bg);
}

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

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

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

:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -70px; z-index: 200;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 0 0 12px 12px; transition: top .16s;
}
.skip-link:focus { top: 0; }

button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

::selection { background: rgba(61, 125, 255, .4); color: #fff; }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(8, 14, 27, .78);
  backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}

.topbar-note {
  text-align: center; font-size: 11.5px; letter-spacing: .02em;
  padding: 7px 14px;
  color: var(--text-dim);
  background: linear-gradient(90deg, rgba(30, 79, 208, .5), rgba(34, 211, 238, .22));
  border-bottom: 1px solid var(--line);
}
.topbar-note strong { color: #fff; font-weight: 600; }
.tn-extra { display: none; }

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

/* The logo artwork is blue-on-white, so on the dark bar it gets its own chip. */
.brand { display: flex; align-items: center; flex: none; }
.brand-logo {
  height: 34px; width: auto;
  background: #fff; padding: 5px 9px; border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.footer-brand .brand-logo { height: 44px; padding: 7px 12px; border-radius: 11px; }

/* Mobile: full-screen overlay menu. */
.main-nav {
  position: fixed; inset: 0; z-index: 55;
  display: none; flex-direction: column; gap: 2px;
  padding: 96px 20px 40px;
  background: rgba(6, 11, 22, .97);
  backdrop-filter: blur(20px);
  font-size: 19px; font-weight: 600;
  overflow-y: auto;
}
.main-nav.open { display: flex; }
.main-nav a {
  color: var(--text); padding: 15px 16px; border-radius: 14px;
  border: 1px solid transparent;
}
.main-nav a:active { background: var(--surface-2); }
.main-nav a.active {
  color: #fff; background: var(--accent-soft); border-color: var(--accent-line);
}

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

.search { position: relative; display: flex; flex: 1; min-width: 0; }
.search input {
  width: 100%; padding: 10px 40px 10px 15px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; color: var(--text); font-size: 16px; outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { background: var(--surface-3); border-color: var(--accent); box-shadow: var(--ring); }
.search button {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0;
  border-radius: 999px;
}
.search button:hover { color: var(--accent-hi); }

.cart-btn {
  position: relative; flex: none;
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}
.cart-btn:hover { border-color: var(--accent-line); color: var(--accent-hi); background: var(--surface-3); }
.cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #04121f; border-radius: 999px;
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid #0a1120;
}

.burger {
  flex: none; width: 42px; height: 42px; border-radius: 13px; z-index: 100;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer;
  display: grid; place-content: center; gap: 5px; padding: 0;
}
.burger span {
  display: block; width: 17px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------- main */
main { flex: 1; padding: 22px 16px 72px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(27px, 7vw, 44px); }
.page-head .muted { font-size: 14.5px; }
.breadcrumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.breadcrumbs a:hover { color: var(--accent-hi); }

/* ------------------------------------------------------------------- hero */
.hero-banner {
  position: relative;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  box-shadow: var(--sh);
  margin-bottom: 26px;
}
.hero-banner a { display: block; }
/* height:auto is required — otherwise the img height="" attribute is used as
   the literal height and the banner renders stretched. */
.hero-banner img { width: 100%; height: auto; display: block; }

/* Phones: the banner's message is baked into the artwork and unreadable below
   ~700px, so crop to the product shot and set the copy as real text. */
.hero-banner img { aspect-ratio: 16 / 11; object-fit: cover; object-position: 26% center; }
.hero-copy { padding: 18px 18px 22px; border-top: 1px solid var(--line); }
.hero-kicker {
  margin: 0 0 8px; font-size: 11px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent-hi), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { margin: 0 0 16px; font-size: 15px; color: var(--text-dim); }

.home-badges { margin: 0 0 8px; }

/* Trust badges: scroll-snap rail on phones, grid from tablet up. */
.badges {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%;
  gap: 10px; margin: 26px 0 0;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; margin-inline: -16px; padding-inline: 16px;
  scrollbar-width: none;
}
.badges::-webkit-scrollbar { display: none; }
.badge {
  scroll-snap-align: start;
  display: flex; gap: 12px; align-items: center;
  font-size: 12.5px; color: var(--text-dim);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(16, 26, 46, .5) 100%);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; min-width: 0;
}
.badge b { display: block; color: #fff; font-weight: 650; font-size: 13.5px; margin-bottom: 2px; }
.badge-icon {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 17px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 650; font-family: inherit; cursor: pointer;
  transition: transform .12s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-hi) 0%, var(--accent) 55%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(61, 125, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-primary:hover { box-shadow: 0 14px 34px -12px rgba(61, 125, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .34); }
.btn-ghost {
  background: var(--surface-2); border-color: var(--line-2); color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-line); color: #fff; background: var(--surface-3); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ----------------------------------------------------------- section head */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin: 44px 0 18px;
}
.section-head h2 {
  margin: 0; font-size: clamp(21px, 5.4vw, 30px); position: relative;
  padding-bottom: 10px;
}
.section-head h2::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}
.section-head a {
  flex: none; font-size: 13.5px; font-weight: 650; color: var(--accent-hi);
  white-space: nowrap; padding: 6px 0; margin: -6px 0;
}
.section-head a:hover { color: #fff; }

/* ---------------------------------------------------------- category tiles */
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; transition: border-color .16s, transform .16s, background .16s;
}
.cat-tile:hover { border-color: var(--accent-line); transform: translateY(-2px); background: var(--surface-2); }
.cat-tile b { display: block; font-size: 15px; margin-bottom: 3px; color: #fff; }
.cat-tile span { font-size: 12.5px; color: var(--muted); }

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

/* Phones: categories become a horizontal chip rail. */
.sidebar {
  display: flex; gap: 8px; overflow-x: auto;
  margin-inline: -16px; padding: 2px 16px 10px;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar h4 { display: none; }
.sidebar a {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px; white-space: nowrap;
  font-size: 13.5px; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--line);
  transition: color .14s, background .14s, border-color .14s;
}
.sidebar a:hover { color: #fff; border-color: var(--line-2); }
.sidebar a.active {
  color: #fff; font-weight: 650;
  background: var(--accent-soft); border-color: var(--accent-line);
}
.sidebar a span { font-size: 11.5px; opacity: .7; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.toolbar .muted { font-size: 13px; }
.toolbar select {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 10px 14px; border-radius: 999px; font-size: 16px; font-family: inherit;
  cursor: pointer; outline: none;
}
.toolbar select:focus { border-color: var(--accent); box-shadow: var(--ring); }

/* -------------------------------------------------------------- product card */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card:hover {
  border-color: var(--accent-line); transform: translateY(-3px);
  box-shadow: var(--sh);
}

/* Product photos are white-background: they need a light panel to sit on. */
.card-media {
  position: relative; aspect-ratio: 1; overflow: hidden;
  margin: 8px 8px 0; border-radius: calc(var(--r-lg) - 9px);
  background: linear-gradient(170deg, #ffffff 0%, var(--panel) 60%, var(--panel-2) 100%);
}
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .35s; }
.card:hover .card-media img { transform: scale(1.05); }

.tag-row {
  position: absolute; top: 9px; left: 9px; right: 9px;
  display: flex; flex-wrap: wrap; gap: 5px;
}
.pill {
  font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; line-height: 1.4;
}
.pill-sale { background: #e11d48; color: #fff; }
.pill-new { background: #0b3fb8; color: #fff; }
.pill-best { background: #b45309; color: #fff; }
.pill-out { background: #334155; color: #e2e8f0; }

.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.card-cat {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-hi);
}
.card-title {
  font-size: 13.5px; font-weight: 600; line-height: 1.4; color: #fff;
  min-height: 24px; display: block;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title:hover { color: var(--accent-hi); }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 9px; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.2; }
.price .now { font-size: 17px; font-weight: 750; color: #fff; letter-spacing: -.02em; }
.price .was { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.price .ask { font-size: 13px; color: var(--warn); font-weight: 650; }

.add-btn {
  width: 100%; min-height: 40px; padding: 9px 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 999px; font-size: 13px; font-weight: 650; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: background .16s, color .16s, border-color .16s;
}
.add-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  border-color: transparent; color: #fff;
}
.add-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ------------------------------------------------------------- product page */
.product-layout { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
.product-gallery {
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(170deg, #ffffff 0%, var(--panel) 62%, var(--panel-2) 100%);
  border: 1px solid var(--line);
}
.product-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 22px; }

.product-info h1 { font-size: clamp(23px, 6.4vw, 36px); }
.product-brand {
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-hi); margin-bottom: 9px;
}
.product-lead { color: var(--text-dim); font-size: 15px; margin: 0; }

.price-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 20px 0; padding: 18px;
  border: 1px solid var(--accent-line); border-radius: var(--r);
  background: linear-gradient(135deg, rgba(61, 125, 255, .16), rgba(34, 211, 238, .06) 70%, transparent);
}
.price-box .now { font-size: clamp(26px, 7vw, 34px); font-weight: 750; color: #fff; letter-spacing: -.03em; }
.price-box .was { font-size: 15px; }
.save-pill {
  background: #e11d48; color: #fff; font-size: 12px; font-weight: 750;
  padding: 5px 11px; border-radius: 999px;
}
.vat-note { font-size: 12.5px; color: var(--muted); width: 100%; }
.vat-note a { color: var(--accent-hi); }

.stock-line { display: flex; align-items: center; gap: 9px; font-size: 13.5px; margin: 16px 0; color: var(--text-dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
.dot.off { background: var(--muted); box-shadow: 0 0 0 4px rgba(127, 142, 173, .16); }

.buy-row { display: flex; flex-direction: column; gap: 10px; }
.qty {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; width: 100%;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2);
  overflow: hidden;
}
.qty button {
  width: 52px; height: 100%; background: none; border: 0; color: var(--text-dim);
  font-size: 21px; cursor: pointer; transition: color .14s;
}
.qty button:hover { color: var(--accent-hi); }
.qty input {
  flex: 1; min-width: 0; text-align: center; background: none; border: 0;
  color: #fff; font-size: 16px; font-weight: 650; font-family: inherit; outline: none;
}
.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: 22px 0 0; display: grid; gap: 11px; font-size: 14px; color: var(--text-dim); }
.usp-list li { display: flex; gap: 11px; align-items: flex-start; }
.usp-list svg { color: var(--accent-2); flex: none; margin-top: 3px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.tag {
  font-size: 11.5px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px;
}

/* Long-form supplier copy. */
.product-desc {
  margin-top: 44px; padding-top: 30px;
  border-top: 1px solid var(--line);
  max-width: 74ch;
}
.product-desc h2 { font-size: clamp(19px, 5vw, 24px); margin-top: 34px; }
.product-desc h3 { font-size: 16.5px; margin-top: 24px; color: var(--text); }
.product-desc p, .product-desc li { color: var(--text-dim); font-size: 15px; overflow-wrap: break-word; }
.product-desc a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.product-desc a:hover { color: var(--accent-2); }
.product-desc ul, .product-desc ol { padding-left: 20px; }
.product-desc strong { color: var(--text); }
.product-desc table {
  width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13.5px;
  display: block; overflow-x: auto;
}
.product-desc th, .product-desc td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.product-desc th { background: var(--surface-2); color: #fff; font-weight: 650; }
.product-desc img { border-radius: 12px; margin: 14px 0; }

/* -------------------------------------------------------------- cart drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(3, 7, 15, .72); backdrop-filter: blur(3px); z-index: 90; }
.cart-drawer {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  animation: slide-up .24s cubic-bezier(.22, .9, .3, 1);
}
@keyframes slide-up { from { transform: translateY(4%); opacity: .6; } }
.cart-drawer > header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  padding-top: max(16px, env(safe-area-inset-top));
}
.cart-drawer > header h3 { margin: 0; font-size: 17px; }
.cart-drawer > header button {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer;
  width: 40px; height: 40px; border-radius: 12px;
}
.cart-drawer > header button:hover { color: #fff; border-color: var(--line-2); }
#cart-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.cart-items { flex: 1; overflow-y: auto; padding: 8px 18px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cart-item {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center;
}
.cart-item img {
  width: 58px; height: 58px; object-fit: contain; padding: 5px;
  background: var(--panel); border-radius: 12px;
}
.cart-item-name { font-size: 13px; line-height: 1.4; margin-bottom: 6px; font-weight: 550; color: #fff; }
.cart-item-name:hover { color: var(--accent-hi); }
.cart-qty { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.cart-qty button {
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  cursor: pointer; line-height: 1; font-size: 15px;
}
.cart-qty button:hover { border-color: var(--accent-line); color: var(--accent-hi); }
.cart-line-total { font-weight: 700; font-size: 14px; white-space: nowrap; color: #fff; }
.cart-remove {
  display: block; background: none; border: 0; color: var(--muted);
  font-size: 11.5px; cursor: pointer; padding: 8px 0 4px; min-height: 26px;
}
.cart-remove:hover { color: var(--danger); }

.cart-foot {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
}
.sum-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; color: var(--text-dim); }
.sum-row.total {
  font-size: 18px; font-weight: 750; color: #fff;
  margin: 12px 0 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.ship-hint {
  font-size: 12.5px; font-weight: 650; color: var(--accent-2);
  margin-bottom: 12px;
}

.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state h1 { font-size: clamp(22px, 6vw, 30px); }
.empty-state svg { color: var(--surface-3); margin-bottom: 14px; }
.empty-state .btn { margin-top: 16px; }

/* ---------------------------------------------------------------- checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px;
}
.panel + .panel { margin-top: 16px; }
.panel h3 { font-size: 16px; margin-bottom: 18px; display: flex; align-items: center; gap: 11px; }
.panel h3 i {
  width: 27px; height: 27px; border-radius: 999px; flex: none;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  color: #fff; display: grid; place-items: center;
  font-size: 12.5px; font-style: normal; font-weight: 800;
}

.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--text); font-weight: 550; }
.field input, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 13px;
  padding: 13px 14px; color: var(--text); font-size: 16px; font-family: inherit;
  outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: var(--ring); background: var(--surface-2); }
.field textarea { resize: vertical; min-height: 88px; }
.field .err { font-size: 12px; color: var(--danger); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }

.pay-options { display: grid; gap: 10px; }
.pay-option {
  display: flex; gap: 12px; align-items: flex-start; padding: 15px;
  border: 1px solid var(--line-2); border-radius: 15px; cursor: pointer;
  background: var(--bg-2);
  transition: border-color .16s, background .16s;
}
.pay-option:hover { border-color: var(--accent-line); }
.pay-option input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.pay-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.pay-option b { display: block; font-size: 14.5px; margin-bottom: 3px; color: #fff; }
.pay-option span { font-size: 12.5px; color: var(--text-dim); }

.consent { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.consent input { margin-top: 3px; accent-color: var(--accent); flex: none; width: 18px; height: 18px; }
.consent a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }

.summary-items { max-height: 300px; overflow-y: auto; margin-bottom: 16px; }
.summary-item {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.summary-item span { color: var(--muted); }
.summary-item b { color: #fff; }

.alert { padding: 13px 16px; border-radius: 13px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: rgba(225, 29, 72, .14); border: 1px solid rgba(255, 107, 107, .4); color: #ffb4b4; }
.alert-info { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-hi); }

/* ------------------------------------------------------- order confirmation */
.confirm { max-width: 680px; margin: 0 auto; text-align: center; padding: 16px 0; }
.confirm h1 { font-size: clamp(24px, 6.4vw, 34px); }
.confirm-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  box-shadow: 0 0 0 8px rgba(61, 125, 255, .14);
}
.order-no { overflow-wrap: anywhere;
  font-size: clamp(20px, 5.6vw, 26px); font-weight: 750; letter-spacing: .05em;
  margin: 6px 0 14px;
  background: linear-gradient(90deg, var(--accent-hi), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.confirm-panel { text-align: left; margin-top: 22px; }
.kv {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--text-dim);
}
.kv b { font-weight: 650; color: #fff; text-align: right; overflow-wrap: anywhere; }

.status-badge {
  display: inline-block; padding: 6px 15px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
}
.st-pending { background: rgba(251, 191, 36, .16); color: #fcd34d; border: 1px solid rgba(251, 191, 36, .35); }
.st-paid { background: rgba(34, 211, 238, .16); color: #67e8f9; border: 1px solid rgba(34, 211, 238, .35); }
.st-processing { background: var(--accent-soft); color: var(--accent-hi); border: 1px solid var(--accent-line); }
.st-shipped { background: rgba(129, 140, 248, .16); color: #a5b4fc; border: 1px solid rgba(129, 140, 248, .35); }
.st-completed { background: rgba(52, 211, 153, .16); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, .35); }
.st-cancelled, .st-refunded { background: rgba(225, 29, 72, .16); color: #fda4af; border: 1px solid rgba(225, 29, 72, .35); }

/* -------------------------------------------------------------------- blog */
.blog-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.blog-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.blog-card:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--sh); }
.blog-cover {
  display: block; aspect-ratio: 16 / 9; overflow: hidden;
  margin: 8px 8px 0; border-radius: calc(var(--r-lg) - 9px);
  background: linear-gradient(170deg, #ffffff 0%, var(--panel) 100%);
}
.blog-cover img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .35s; }
.blog-card:hover .blog-cover img { transform: scale(1.04); }
.blog-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-date {
  font-size: 11px; color: var(--accent-hi); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
}
.blog-title { font-size: 16px; font-weight: 700; line-height: 1.35; color: #fff; letter-spacing: -.02em; }
.blog-title:hover { color: var(--accent-hi); }
.blog-excerpt { font-size: 13.5px; color: var(--text-dim); margin: 0; line-height: 1.55; }
.blog-more { margin-top: auto; padding-top: 10px; padding-bottom: 2px; font-size: 13.5px; font-weight: 650; color: var(--accent-2); }
.blog-more:hover { color: #fff; }

.post { max-width: 74ch; margin: 0 auto; }
.post-title { font-size: clamp(26px, 7vw, 42px); margin-top: 8px; }
.post-meta { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.post-cover {
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 26px;
  background: linear-gradient(170deg, #ffffff 0%, var(--panel) 100%);
  border: 1px solid var(--line);
}
.post-cover img { width: 100%; max-height: 340px; object-fit: contain; padding: 18px; }
.post-body { margin-top: 0; border-top: 0; padding-top: 0; }
.post-body h2 { font-size: clamp(20px, 5.4vw, 26px); }

/* ------------------------------------------------------------ static pages */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 34px; font-size: clamp(19px, 5vw, 23px); }
.prose h3 { margin-top: 24px; font-size: 16.5px; color: var(--text); }
.prose p, .prose li { color: var(--text-dim); font-size: 15px; overflow-wrap: break-word; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.prose .panel { margin-top: 18px; }

/* SEO copy block on the home page. */
.home-intro {
  max-width: none; margin: 44px 0 0; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(34, 211, 238, .10), transparent 65%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
}
.home-intro h2 { margin-top: 0; font-size: clamp(19px, 5vw, 25px); }
.home-intro p { max-width: 78ch; margin-bottom: 0; }
.home-intro p + p { margin-top: 12px; }
.home-intro a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------------------- misc */
.spinner {
  width: 30px; height: 30px; margin: 64px auto;
  border: 2.5px solid var(--surface-3); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-stack {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 200; display: flex; flex-direction: column; gap: 9px;
}
.toast {
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  color: var(--text); padding: 13px 16px; border-radius: 13px; font-size: 14px;
  box-shadow: var(--sh-lg); animation: toast-in .22s ease;
}
.toast.err { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------------ footer */
.site-footer {
  position: relative; margin-top: auto;
  padding: 40px 0 24px;
  background: linear-gradient(180deg, var(--bg-2) 0%, #040810 100%);
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.footer-grid h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .13em;
  color: var(--accent-hi); margin-bottom: 10px;
}
.footer-grid p { font-size: 14px; color: var(--muted); }
.footer-grid a {
  display: block; font-size: 14px; color: var(--text-dim); padding: 6px 0;
  transition: color .14s, transform .14s;
}
.footer-grid a:hover { color: #fff; transform: translateX(3px); }
.footer-brand { margin-bottom: 12px; }

.disclaimer {
  margin-top: 30px; padding: 15px 17px;
  border: 1px solid rgba(251, 191, 36, .3); border-radius: 14px;
  background: rgba(251, 191, 36, .07);
  font-size: 12.5px; color: #d9c79a; line-height: 1.65;
}
.disclaimer strong { color: var(--warn); }

.copy { margin-top: 20px; font-size: 12px; text-align: center; color: var(--muted); }

/* =========================================================================
   Tablet and up
   ========================================================================= */
@media (min-width: 700px) {
  .wrap { padding: 0 24px; }
  .tn-extra { display: inline; }
  main { padding: 32px 24px 88px; }

  /* Desktop banner: show the full artwork, drop the text fallback. */
  .hero-banner img { aspect-ratio: auto; object-fit: fill; object-position: center; }
  .hero-copy { display: none; }

  .badges {
    grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-auto-columns: auto;
    overflow: visible; margin-inline: 0; padding-inline: 0;
  }

  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .card-title { font-size: 14.5px; }
  .card-foot { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .add-btn { width: auto; }

  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }

  .buy-row { flex-direction: row; align-items: stretch; }
  .qty { width: auto; }
  .buy-row .btn { flex: 1; }

  .panel { padding: 26px; }

  /* Cart becomes a right-hand drawer. */
  .cart-drawer {
    inset: 0 0 0 auto; width: min(440px, 100%);
    animation: slide-in .24s cubic-bezier(.22, .9, .3, 1);
    border-left: 1px solid var(--line);
  }
  @keyframes slide-in { from { transform: translateX(100%); } }

  .toast-stack { left: auto; right: 22px; bottom: 22px; max-width: 340px; }
}

/* =========================================================================
   Desktop
   ========================================================================= */
@media (min-width: 1000px) {
  body { background-attachment: fixed; }
  .header-inner { height: 74px; gap: 24px; }
  .brand-logo { height: 40px; }

  /* Nav returns to an inline pill row. */
  .main-nav {
    position: static; inset: auto; display: flex; flex-direction: row;
    gap: 4px; padding: 0; background: none; backdrop-filter: none;
    font-size: 14.5px; font-weight: 550; overflow: visible;
  }
  .main-nav a {
    color: var(--text-dim); padding: 9px 14px; border-radius: 999px;
    white-space: nowrap; transition: color .15s, background .15s;
  }
  .main-nav a:hover { color: #fff; background: var(--surface-2); }
  .main-nav a.active { color: #fff; background: var(--accent-soft); border-color: var(--accent-line); }
  .burger { display: none; }

  .search { flex: none; }
  .toolbar select { font-size: 14px; }
  .search input { width: 210px; font-size: 14px; transition: width .22s, border-color .16s, box-shadow .16s, background .16s; }
  .search input:focus { width: 268px; }

  .shop-layout { grid-template-columns: 244px 1fr; gap: 30px; }
  .sidebar {
    position: sticky; top: 104px;
    display: block; overflow: visible; margin: 0; padding: 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  }
  .sidebar h4 {
    display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
    color: var(--muted); margin: 4px 10px 12px;
  }
  .sidebar a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 13px; border-radius: 11px; border-color: transparent; background: none;
    font-size: 14px;
  }
  .sidebar a:hover { background: var(--surface-2); }
  .sidebar a.active { background: var(--accent-soft); border-color: var(--accent-line); }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

  .product-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 46px; }
  .product-gallery { position: sticky; top: 104px; }

  .checkout-layout { grid-template-columns: 1fr 390px; gap: 28px; }
  .summary { position: sticky; top: 104px; }

  .footer-grid { grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 36px; }
  .badges { grid-template-columns: repeat(4, 1fr); }
  .home-intro { padding: 34px; }
}

@media (min-width: 1240px) {
  .grid { gap: 20px; }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .card:hover, .blog-card:hover, .cat-tile:hover { transform: none; }
}
