/* Premium Peptides — storefront (light theme) */
:root {
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --line: #e4e9f0;
  --line-soft: #edf1f6;
  --text: #0e1a2b;
  --muted: #5c6b80;
  --ink: #101828;
  --accent: #0e7f72;        /* teal — brand */
  --accent-strong: #0b675d;
  --accent-soft: #e6f7f4;
  --accent-2: #2563eb;
  --danger: #d92d20;
  --warn: #b45309;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 28px -8px rgba(16, 24, 40, .14);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .18);
  --max: 1240px;
}

* { 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; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.022em; color: var(--ink); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

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

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

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

.topbar-note {
  text-align: center; font-size: 12.5px;
  padding: 8px 16px;
  background: var(--ink);
  color: #cbd5e1;
}
.topbar-note strong { color: #5eead4; font-weight: 600; }

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

.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: -.03em; }
.brand-logo { height: 52px; width: auto; display: block; }
.footer-brand .brand-logo { height: 64px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  color: #fff; font-weight: 800; font-size: 14px;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand-text { color: var(--ink); font-weight: 500; }
.brand-text strong { color: var(--accent); font-weight: 700; }

.main-nav { display: flex; gap: 4px; font-size: 14.5px; font-weight: 500; }
.main-nav a {
  color: var(--muted); padding: 8px 12px; border-radius: 8px;
  transition: color .15s, background .15s; white-space: nowrap;
}
.main-nav a:hover { color: var(--ink); background: var(--surface-2); }
.main-nav a.active { color: var(--accent-strong); background: var(--accent-soft); }

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

.search { position: relative; display: flex; }
.search input {
  width: 220px; padding: 9px 38px 9px 15px;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: 999px; color: var(--text); font-size: 14px; outline: none;
  transition: border-color .15s, background .15s, width .2s;
}
.search input::placeholder { color: #8a97a8; }
.search input:focus { background: #fff; border-color: var(--accent); width: 260px; }
.search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px;
}

.cart-btn {
  position: relative; background: #fff; border: 1px solid var(--line);
  color: var(--ink); width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cart-btn:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid #fff;
}

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

/* --------------------------------------------------------------- main */
main { flex: 1; padding: 36px 20px 80px; }

.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 38px); }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a:hover { color: var(--accent); }

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

.hero-banner {
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: box-shadow .18s, transform .18s;
}
.hero-banner:hover { box-shadow: var(--shadow-md); }
.hero-banner a { display: block; }
.hero-banner img { width: 100%; display: block; }

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

.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-soft); border-radius: 22px;
  padding: clamp(34px, 5vw, 64px);
  background:
    radial-gradient(640px 320px at 90% -10%, rgba(20, 184, 166, .12), transparent 65%),
    radial-gradient(520px 300px at 4% 110%, rgba(37, 99, 235, .07), transparent 60%),
    linear-gradient(180deg, #fbfdfe, #f4f9f9);
  margin-bottom: 48px;
}
.hero h1 { font-size: clamp(32px, 5vw, 54px); max-width: 17ch; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); max-width: 56ch; font-size: 17px; margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.badges { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }
.badge {
  display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted);
  background: #fff; border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 12px 16px; box-shadow: var(--shadow-sm); flex: 1 1 210px; min-width: 200px;
}
.badge b { color: var(--ink); font-weight: 600; display: block; font-size: 14px; margin-bottom: 1px; }
.badge-icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: var(--accent-soft); display: grid; place-items: center; font-size: 17px;
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 11px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: transform .1s, background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------ category tiles */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 52px 0 22px; }
.section-head h2 { font-size: clamp(21px, 2.6vw, 28px); margin: 0; }
.section-head a { font-size: 14px; font-weight: 600; color: var(--accent); }
.section-head a:hover { color: var(--accent-strong); }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.cat-tile {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  background: #fff; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-tile b { display: block; font-size: 15px; margin-bottom: 3px; color: var(--ink); }
.cat-tile span { font-size: 12.5px; color: var(--muted); }

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

.sidebar {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: 16px; position: sticky; top: 118px;
}
.sidebar h4 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin: 4px 8px 12px;
}
.sidebar a {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--muted);
  transition: background .13s, color .13s;
}
.sidebar a:hover { background: var(--surface-2); color: var(--ink); }
.sidebar a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.sidebar a span { font-size: 11.5px; opacity: .75; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar select {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  padding: 9px 13px; border-radius: 9px; font-size: 14px; font-family: inherit; cursor: pointer;
}

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

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: #c9d4e0; transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card-media { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .3s; }
.card:hover .card-media img { transform: scale(1.045); }

.tag-row { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pill {
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.pill-sale { background: var(--danger); color: #fff; }
.pill-new { background: #eff6ff; color: #1d4ed8; border: 1px solid #d5e4fd; }
.pill-best { background: #fffaeb; color: #b45309; border: 1px solid #fbe6bd; }
.pill-out { background: #64748b; color: #fff; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; gap: 7px; }
.card-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.card-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; margin: 0; color: var(--ink); }
.card-title:hover { color: var(--accent-strong); }
.card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 10px; }

.price { display: flex; flex-direction: column; line-height: 1.25; }
.price .now { font-size: 17.5px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.price .was { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.price .ask { font-size: 13.5px; color: var(--warn); font-weight: 600; }

.add-btn {
  background: var(--accent-soft); border: 1px solid #bfe8e1;
  color: var(--accent-strong); border-radius: 9px; padding: 8px 13px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .14s, color .14s, border-color .14s;
}
.add-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.add-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------------------------------ product page */
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.product-gallery {
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  overflow: hidden; position: sticky; top: 118px; box-shadow: var(--shadow-sm);
}
.product-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 30px; }

.product-info h1 { font-size: clamp(24px, 3vw, 34px); }
.product-brand {
  font-size: 12px; text-transform: uppercase; letter-spacing: .11em;
  color: var(--accent-strong); font-weight: 700; margin-bottom: 9px;
}
.product-lead { color: var(--muted); font-size: 15.5px; }

.price-box {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 22px 0; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-2);
}
.price-box .now { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.price-box .was { font-size: 16px; }
.save-pill { background: #fee4e2; color: #b42318; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.vat-note { font-size: 12.5px; color: var(--muted); width: 100%; }

.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: 11px; background: #fff; overflow: hidden; }
.qty button { width: 42px; background: none; border: 0; color: var(--muted); font-size: 19px; cursor: pointer; transition: color .12s; }
.qty button:hover { color: var(--accent-strong); }
.qty input { width: 46px; text-align: center; background: none; border: 0; color: var(--ink); font-size: 15px; font-weight: 600; font-family: inherit; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stock-line { display: flex; align-items: center; gap: 9px; font-size: 13.5px; margin: 16px 0; color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 4px rgba(18, 183, 106, .16); }
.dot.off { background: #98a2b3; box-shadow: 0 0 0 4px rgba(152, 162, 179, .16); }

.usp-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.usp-list li { display: flex; gap: 10px; align-items: flex-start; }
.usp-list svg { color: var(--accent); flex: none; margin-top: 3px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.tag { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid transparent; padding: 4px 11px; border-radius: 999px; }

.product-desc { margin-top: 56px; border-top: 1px solid var(--line-soft); padding-top: 36px; max-width: 860px; }
.product-desc h2 { font-size: 21px; margin-top: 34px; }
.product-desc h3 { font-size: 17px; margin-top: 26px; }
.product-desc p, .product-desc li { color: #3d4d63; font-size: 15px; }
.product-desc a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.product-desc a:hover { color: var(--accent); }
.product-desc ul, .product-desc ol { padding-left: 20px; }
.product-desc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.product-desc th, .product-desc td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.product-desc th { background: var(--bg-2); }
.product-desc img { border-radius: 10px; margin: 14px 0; }

/* --------------------------------------------------------------- cart */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 90; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100%);
  background: #fff; z-index: 100;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: slide-in .22s ease;
}
@keyframes slide-in { from { transform: translateX(100%); } }
.cart-drawer header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.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: 9px;
}
.cart-drawer header button:hover { background: var(--surface-2); }
.cart-drawer header button:hover { color: var(--ink); }
#cart-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.cart-items { flex: 1; overflow-y: auto; padding: 14px 22px; 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-soft); align-items: center; }
.cart-item img { width: 58px; height: 58px; object-fit: contain; background: #fff; border: 1px solid var(--line-soft); border-radius: 9px; padding: 4px; }
.cart-item-name { font-size: 13.5px; line-height: 1.4; margin-bottom: 5px; font-weight: 500; color: var(--ink); }
.cart-item-name:hover { color: var(--accent-strong); }
.cart-qty { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.cart-qty button {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; line-height: 1; font-size: 14px;
}
.cart-qty button:hover { border-color: var(--accent); color: var(--accent-strong); }
.cart-line-total { font-weight: 700; font-size: 14px; white-space: nowrap; color: var(--ink); }
.cart-remove { display: block; background: none; border: 0; color: var(--muted); font-size: 11.5px; cursor: pointer; padding: 4px 0 0; }
.cart-remove:hover { color: var(--danger); }

.cart-foot {
  border-top: 1px solid var(--line-soft);
  padding: 18px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-2);
}
.sum-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; color: var(--muted); }
.sum-row.total { font-size: 18px; font-weight: 700; color: var(--ink); margin: 12px 0 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ship-hint { font-size: 12.5px; color: var(--accent-strong); font-weight: 600; margin-bottom: 12px; }

.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty-state svg { color: #cbd5e1; margin-bottom: 14px; }

/* ----------------------------------------------------------- checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 390px; gap: 32px; align-items: start; }
.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: 26px; box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 20px; }
.panel h3 { font-size: 16px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.panel h3 i {
  width: 25px; height: 25px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-strong); display: grid; place-items: center;
  font-size: 12.5px; font-style: normal; font-weight: 700;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--ink); font-weight: 500; }
.field input, .field textarea {
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 13px; color: var(--text); font-size: 14.5px; font-family: inherit; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 127, 114, .12); }
.field textarea { resize: vertical; min-height: 80px; }
.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: 14px 16px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer;
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.pay-option:hover { border-color: var(--accent); }
.pay-option input { margin-top: 3px; accent-color: var(--accent); }
.pay-option.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pay-option b { display: block; font-size: 14.5px; margin-bottom: 2px; color: var(--ink); }
.pay-option span { font-size: 12.5px; color: var(--muted); }

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

.summary { position: sticky; top: 118px; }
.summary-items { max-height: 320px; overflow-y: auto; margin-bottom: 16px; }
.summary-item { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.summary-item span { color: var(--muted); }
.summary-item b { color: var(--ink); }

.alert { padding: 13px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }
.alert-info { background: #eff8ff; border: 1px solid #b2ddff; color: #175cd3; }

/* -------------------------------------------------- order confirmation */
.confirm { max-width: 660px; margin: 0 auto; text-align: center; padding: 30px 0; }
.confirm-icon {
  width: 76px; height: 76px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-strong); display: grid; place-items: center; margin: 0 auto 22px;
}
.order-no { font-size: 26px; font-weight: 700; color: var(--accent-strong); letter-spacing: .03em; margin: 6px 0 16px; }
.confirm-panel { text-align: left; margin-top: 28px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv b { font-weight: 600; color: var(--ink); }

.status-badge { display: inline-block; padding: 5px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.st-pending { background: #fffaeb; color: #b45309; border: 1px solid #fbe6bd; }
.st-paid, .st-processing { background: #eff6ff; color: #1d4ed8; border: 1px solid #d5e4fd; }
.st-shipped { background: #e6f7f4; color: #0b675d; border: 1px solid #bfe8e1; }
.st-completed { background: #ecfdf3; color: #15803d; border: 1px solid #c9efd8; }
.st-cancelled, .st-refunded { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }

/* -------------------------------------------------------- static pages */
.prose { max-width: 760px; }
.prose h2 { margin-top: 32px; font-size: 20px; }
.prose p, .prose li { color: #3d4d63; }

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

.toast-stack { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  color: var(--ink); padding: 13px 17px; border-radius: 11px; font-size: 14px;
  box-shadow: var(--shadow-md); animation: toast-in .2s ease; max-width: 330px;
}
.toast.err { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* -------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 50px 0 28px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer-grid h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.footer-grid p { font-size: 14px; }
.footer-grid a { display: block; font-size: 14px; color: var(--muted); padding: 4px 0; }
.footer-grid a:hover { color: var(--accent-strong); }
.footer-brand { margin-bottom: 12px; }
.disclaimer {
  margin-top: 36px; padding: 16px 20px; border: 1px solid #fbe6bd;
  background: #fffaf0; border-radius: 11px;
  font-size: 12.5px; color: #6b5b3e; line-height: 1.65;
}
.disclaimer strong { color: #b45309; }
.copy { margin-top: 22px; font-size: 12.5px; text-align: center; }

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

  /* Categories collapse into one horizontally scrollable row of chips. */
  .sidebar {
    position: static; display: flex; overflow-x: auto; gap: 8px;
    border: 0; background: none; border-radius: 0; padding: 2px 20px 10px;
    margin: 0 -20px 6px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar h4 { display: none; }
  .sidebar a {
    flex: none; background: #fff; border: 1px solid var(--line);
    border-radius: 999px; padding: 9px 15px; font-size: 13.5px; white-space: nowrap;
  }
  .sidebar a.active { border-color: var(--accent); }

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

@media (max-width: 760px) {
  .topbar-note { font-size: 12px; padding: 7px 12px; }
  .tn-extra { display: none; }
  .header-inner { height: 60px; gap: 14px; }

  .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 20px 14px;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 4px; border-radius: 0; border-bottom: 1px solid var(--line-soft); }
  .burger { display: block; }

  /* 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; }

  .hero { border-radius: 16px; }
  .hero-banner { border-radius: 14px; margin-bottom: 14px; }
  .badges { gap: 10px; margin-top: 28px; }
  .home-badges { margin-top: 0; }
  .badge { min-width: 100%; }
  .section-head { margin-top: 40px; }

  .form-grid { grid-template-columns: 1fr; }
  .checkout-layout { gap: 20px; }
  .panel { padding: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }

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

@media (max-width: 560px) {
  /* Header becomes: compact logo · full-width search · cart · menu */
  .brand-logo { height: 40px; }
  .header-actions { flex: 1; }
  .search { flex: 1; }
  .search input, .search input:focus { width: 100%; }
}

@media (max-width: 480px) {
  .card-body { padding: 12px 12px 14px; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 9px; }
  .price { flex-direction: row; align-items: baseline; gap: 8px; }
  .price .now { font-size: 16.5px; }
  .add-btn { width: 100%; padding: 10px; font-size: 13.5px; }

  .price-box { padding: 15px 16px; gap: 10px; }
  .price-box .now { font-size: 26px; }
  .buy-row { flex-direction: column; }
  .qty { width: 100%; justify-content: space-between; height: 48px; }
  .buy-row .btn { width: 100%; min-width: 0; padding: 14px; }
  .product-gallery img { padding: 18px; }

  .cart-item { grid-template-columns: 50px 1fr auto; gap: 10px; }
  .cart-item img { width: 50px; height: 50px; }
}
