/* =============================================================================
   SR Worlds Shop — public storefront design system
   Operated by SR World Solutions
   -----------------------------------------------------------------------------
   Structure:
     1. Design tokens
     2. Base / reset
     3. Layout primitives
     4. Buttons, badges, forms (shared)
     5. Header + mobile menu
     6. Footer
     7. Homepage (hero, trust, products, categories, features, bulk, author)
     8. Product detail (gallery, buy box, specs, modal)
     9. Cart
    10. Checkout + order states
    11. Policy / content pages
    12. Legacy + admin compatibility classes (do not remove)
    13. Responsive + reduced motion
   ========================================================================== */

/* 1. DESIGN TOKENS ---------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Brand palette */
  --navy: #102a43;
  --navy-800: #16324f;
  --navy-700: #1d3f63;
  --teal: #0f766e;
  --teal-700: #115e59;
  --gold: #c89b3c;
  --gold-700: #a97f27;
  --gold-soft: #f6edd6;

  /* Neutrals */
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f2f6fb;
  --ink: #172033;
  --muted: #667085;
  --line: #e2e8f0;
  --line-strong: #d4dde8;

  /* Status */
  --success: #15803d;
  --success-soft: #e7f5ec;
  --danger: #b42318;
  --danger-soft: #fdecea;

  /* Legacy aliases (kept for admin templates) */
  --panel: var(--surface);
  --brand: var(--teal);
  --brand-dark: var(--teal-700);
  --accent: var(--gold-700);

  /* Typography */
  --font-sans: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-serif: "Fraunces", "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Spacing (8px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 42, 67, .06), 0 1px 3px rgba(16, 42, 67, .05);
  --shadow-md: 0 6px 20px rgba(16, 42, 67, .08);
  --shadow-lg: 0 18px 44px rgba(16, 42, 67, .14);
  --maxw: 1200px;
  --header-h: 72px;
}

/* 2. BASE / RESET ----------------------------------------------------------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* Icon system: <svg><use href="#ic-*"></svg>. fill/stroke inherit into the
   <use> shadow tree from the containing <svg>, so style icons here. */
.sw-header svg,
.sw-footer svg,
.sw-main svg,
.sw-modal svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0 0 var(--sp-3); }

p { margin: 0 0 var(--sp-4); }

:focus-visible {
  outline: 3px solid #7cc4bd;
  outline-offset: 2px;
  border-radius: 4px;
}

.sw-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.sw-skip:focus { left: 0; }

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

/* 3. LAYOUT PRIMITIVES ------------------------------------------------------ */
.sw-container {
  width: min(var(--maxw), calc(100% - 40px));
  margin-inline: auto;
}

.sw-main { display: block; }

.sw-section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.sw-section--tight { padding: clamp(1.75rem, 3vw, 2.75rem) 0; }
.sw-section--tint { background: var(--surface-2); }
.sw-section--navy { background: var(--navy); color: #fff; }

.sw-section__head { max-width: 60ch; margin: 0 0 var(--sp-6); }
.sw-section__head--center { margin-inline: auto; text-align: center; }
.sw-section__head p { color: var(--muted); margin: 0; }

.sw-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: var(--sp-2);
}
.sw-section--navy .sw-eyebrow { color: var(--gold); }

.sw-h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.sw-serif { font-family: var(--font-serif); font-weight: 700; letter-spacing: -.01em; }

.sw-muted { color: var(--muted); }

/* 4. BUTTONS / BADGES / FORMS (shared) -------------------------------------- */
.sw-btn,
.button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 46px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--teal);
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease, color .18s ease;
  text-decoration: none;
}
.sw-btn:hover,
.button:hover,
button:hover,
input[type="submit"]:hover { background: var(--teal-700); border-color: var(--teal-700); text-decoration: none; }
.sw-btn:active { transform: translateY(1px); }

.sw-btn--primary { background: var(--navy); border-color: var(--navy); }
.sw-btn--primary:hover { background: var(--navy-700); border-color: var(--navy-700); }

.sw-btn--gold { background: var(--gold); border-color: var(--gold); color: #3a2c07; }
.sw-btn--gold:hover { background: var(--gold-700); border-color: var(--gold-700); color: #fff; }

.sw-btn--ghost,
.button.secondary,
button.secondary {
  background: var(--surface);
  color: var(--teal-700);
  border-color: var(--line-strong);
}
.sw-btn--ghost:hover,
.button.secondary:hover,
button.secondary:hover { background: var(--surface-2); border-color: var(--teal); color: var(--teal-700); }

.sw-btn--onnavy { background: #fff; color: var(--navy); border-color: #fff; }
.sw-btn--onnavy:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--navy); }

.sw-btn--danger,
.button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }

.sw-btn--block { width: 100%; }
.sw-btn--sm { min-height: 38px; padding: 8px 14px; font-size: .92rem; }

button:disabled,
.sw-btn:disabled { opacity: .6; cursor: not-allowed; }

.sw-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--surface-2);
  color: var(--navy);
  border: 1px solid var(--line);
}
.sw-badge--gold { background: var(--gold-soft); color: var(--gold-700); border-color: #ecdcb4; }
.sw-badge--teal { background: #e6f3f1; color: var(--teal-700); border-color: #cbe6e2; }
.sw-badge--ok { background: var(--success-soft); color: var(--success); border-color: #cbe9d4; }
.sw-badge--warn { background: var(--danger-soft); color: var(--danger); border-color: #f4cfc9; }

/* Forms */
.sw-field { display: grid; gap: 6px; margin-bottom: var(--sp-4); }
.sw-field > label { font-weight: 700; font-size: .9rem; color: var(--navy); }
.sw-field .sw-req { color: var(--danger); }
.sw-field .sw-hint { font-size: .82rem; color: var(--muted); }

.sw-input,
.sw-form input[type="text"],
.sw-form input[type="email"],
.sw-form input[type="tel"],
.sw-form input[type="number"],
.sw-form input:not([type]),
.sw-form textarea,
.sw-form select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sw-form textarea { min-height: 110px; resize: vertical; }
.sw-form input:focus,
.sw-form textarea:focus,
.sw-form select:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
}
.sw-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}
.sw-field--full { grid-column: 1 / -1; }

.sw-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.sw-notice {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.sw-notice--error { border-left: 4px solid var(--danger); background: var(--danger-soft); color: #7a1a12; }
.sw-error { color: var(--danger); }

/* 5. HEADER + MOBILE MENU --------------------------------------------------- */
.sw-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.sw-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.sw-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--header-h);
  padding: var(--sp-2) 0;
}

.sw-brand { display: inline-flex; align-items: center; gap: var(--sp-3); color: var(--ink); }
.sw-brand:hover { text-decoration: none; }
.sw-brand__mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), var(--teal-700));
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.1rem;
  flex: none;
}
.sw-brand__name { display: block; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; color: var(--navy); }
.sw-brand__sub { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }

.sw-nav { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.sw-nav__link {
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.sw-nav__link:hover { background: var(--surface-2); text-decoration: none; color: var(--teal-700); }
.sw-nav__link[aria-current="page"] { color: var(--teal-700); }

.sw-header__actions { display: flex; align-items: center; gap: var(--sp-2); }

.sw-iconbtn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--navy);
  cursor: pointer;
  position: relative;
}
.sw-iconbtn:hover { background: var(--surface-2); }
.sw-iconbtn svg { width: 22px; height: 22px; }

.sw-cart__badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #3a2c07;
  font-size: .68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.sw-menu-toggle { display: none; }

.sw-mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: var(--sp-3) 0 var(--sp-5);
}
.sw-mobile-nav.is-open { display: block; }
.sw-mobile-nav a {
  display: block;
  padding: 12px 4px;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

/* 6. FOOTER ----------------------------------------------------------------- */
.sw-footer { background: var(--navy); color: #cdd8e6; margin-top: var(--sp-8); }
.sw-footer a { color: #dbe4ef; }
.sw-footer a:hover { color: #fff; }
.sw-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  padding: var(--sp-8) 0 var(--sp-6);
}
.sw-footer__col h4 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.sw-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sw-footer__brandname { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.sw-footer__brandname .sw-brand__mark { width: 36px; height: 36px; }
.sw-footer__desc { color: #a9b8ca; font-size: .92rem; max-width: 34ch; }
.sw-footer__contact { margin-top: var(--sp-4); font-size: .9rem; color: #a9b8ca; display: grid; gap: 6px; }
.sw-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: var(--sp-4) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  justify-content: space-between;
  font-size: .84rem;
  color: #98a8bb;
}
.sw-footer__admin { color: #98a8bb; font-size: .8rem; }
.sw-footer__admin a { color: #98a8bb; }

/* 7. HOMEPAGE --------------------------------------------------------------- */
/* Hero */
.sw-hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(15,118,110,.10), transparent 60%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.sw-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.sw-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: var(--sp-3) 0 var(--sp-4);
}
.sw-hero__lede { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.12rem); max-width: 54ch; }
.sw-hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-5) 0 var(--sp-5); }
.sw-hero__trust { display: flex; flex-wrap: wrap; gap: var(--sp-4); padding: 0; margin: 0; list-style: none; }
.sw-hero__trust li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--navy); font-weight: 600; }
.sw-hero__trust svg { width: 18px; height: 18px; color: var(--teal); flex: none; }

/* Hero book visual */
.sw-hero__visual { position: relative; display: grid; place-items: center; min-height: 320px; }
.sw-bookcard {
  position: relative;
  width: min(300px, 78%);
  aspect-ratio: 3 / 4;
  border-radius: 10px 14px 14px 10px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 60%, var(--teal-700) 130%);
  box-shadow: var(--shadow-lg), inset 6px 0 0 rgba(255,255,255,.08), inset 10px 0 14px rgba(0,0,0,.25);
  transform: rotate(-4deg);
  color: #fff;
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sw-bookcard::after {
  content: "";
  position: absolute; inset: 0 0 0 auto;
  width: 14px;
  background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.06));
}
.sw-bookcard--img { padding: 0; background: #fff; transform: rotate(-4deg); }
.sw-bookcard--img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.sw-bookcard__kicker { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.sw-bookcard__title { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.15; margin: var(--sp-3) 0; color: #fff; }
.sw-bookcard__foot { margin-top: auto; font-size: .85rem; color: #cdd8e6; }
.sw-hero__floatbadge {
  position: absolute;
  top: 6%; right: 4%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--teal-700);
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.sw-hero__floatcard {
  position: absolute;
  bottom: 4%; left: 2%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.sw-hero__floatcard svg { width: 26px; height: 26px; color: var(--teal); }
.sw-hero__floatcard b { display: block; font-size: .9rem; color: var(--navy); }
.sw-hero__floatcard span { font-size: .78rem; color: var(--muted); }

/* Trust strip */
.sw-trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.sw-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
}
.sw-trust__item { display: flex; align-items: center; gap: var(--sp-3); }
.sw-trust__icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; flex: none;
  border-radius: 10px;
  background: #e6f3f1;
  color: var(--teal-700);
}
.sw-trust__icon svg { width: 22px; height: 22px; }
.sw-trust__item b { display: block; font-size: .95rem; color: var(--navy); }
.sw-trust__item span { font-size: .82rem; color: var(--muted); }

/* Product grid + cards */
.sw-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-5);
}
.sw-pcard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sw-pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.sw-pcard:focus-within { box-shadow: var(--shadow-md); }
.sw-pcard__media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--surface-2), #e8eef6);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.sw-pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.sw-pcard__ph { color: var(--navy-700); opacity: .5; }
.sw-pcard__ph svg { width: 54px; height: 54px; }
.sw-pcard__flag {
  position: absolute; top: 10px; left: 10px;
}
.sw-pcard__body { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-4); flex: 1; }
.sw-pcard__title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; margin: 0; }
.sw-pcard__title a { color: var(--navy); }
.sw-pcard__author { font-size: .86rem; color: var(--muted); margin: 0; }
.sw-pcard__meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.sw-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: var(--sp-2); }
.sw-price__now { font-size: 1.28rem; font-weight: 800; color: var(--navy); }
.sw-price__mrp { font-size: .95rem; color: var(--muted); text-decoration: line-through; }
.sw-price__save { font-size: .78rem; font-weight: 700; color: var(--success); }
.sw-pcard__actions { display: flex; gap: 8px; padding: 0 var(--sp-4) var(--sp-4); }
.sw-pcard__actions .sw-btn { flex: 1; }

/* Categories */
.sw-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.sw-cat {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
a.sw-cat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.sw-cat__icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--gold-700);
  margin-bottom: var(--sp-3);
}
.sw-cat__icon svg { width: 24px; height: 24px; }
.sw-cat h3 { font-size: 1.02rem; margin: 0 0 4px; }
.sw-cat p { font-size: .85rem; color: var(--muted); margin: 0; }

/* Features / why buy */
.sw-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.sw-feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
}
.sw-feature__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #e6f3f1; color: var(--teal-700); margin-bottom: var(--sp-3); }
.sw-feature__icon svg { width: 22px; height: 22px; }
.sw-feature h3 { font-size: 1.05rem; margin: 0 0 6px; }
.sw-feature p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Bulk order band */
.sw-bulk {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-700) 130%);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-6);
  align-items: center;
}
.sw-bulk h2 { color: #fff; font-family: var(--font-serif); font-size: clamp(1.4rem, 2.6vw, 2rem); }
.sw-bulk p { color: #d6e2ee; margin: 0; }
.sw-bulk__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: flex-end; }

/* Author section */
.sw-author {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-6);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}
.sw-author__media {
  width: 150px; height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--teal-700));
  display: grid; place-items: center;
  color: #fff;
  overflow: hidden;
  flex: none;
}
.sw-author__media img { width: 100%; height: 100%; object-fit: cover; }
.sw-author__media svg { width: 64px; height: 64px; opacity: .85; }
.sw-author h2 { font-family: var(--font-serif); margin-bottom: 4px; }
.sw-author__role { color: var(--teal-700); font-weight: 700; font-size: .95rem; margin-bottom: var(--sp-3); }
.sw-author p { color: var(--ink); }

/* Support CTA */
.sw-supportcta {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}
.sw-supportcta .sw-hero__cta { justify-content: center; }

/* 8. PRODUCT DETAIL --------------------------------------------------------- */
.sw-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); padding: var(--sp-5) 0 0; margin: 0; list-style: none; }
.sw-breadcrumb li { display: flex; align-items: center; gap: 8px; }
.sw-breadcrumb li:not(:last-child)::after { content: "/"; color: var(--line-strong); }

.sw-pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; padding-top: var(--sp-5); }

.sw-gallery { position: sticky; top: calc(var(--header-h) + 16px); }
.sw-gallery__main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 3 / 4;
  display: grid; place-items: center;
  overflow: hidden;
  cursor: zoom-in;
}
.sw-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.sw-gallery__ph { color: var(--navy-700); opacity: .4; text-align: center; }
.sw-gallery__ph svg { width: 72px; height: 72px; }
.sw-gallery__thumbs { display: flex; gap: 10px; margin-top: var(--sp-3); flex-wrap: wrap; }
.sw-thumb {
  width: 64px; height: 80px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.sw-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sw-thumb[aria-current="true"] { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(15,118,110,.2); }

.sw-pd__title { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.3rem); margin: var(--sp-2) 0; }
.sw-pd__author { color: var(--muted); font-size: 1rem; margin: 0 0 var(--sp-4); }
.sw-pd__author b { color: var(--navy); }
.sw-pd__flags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-3); }

.sw-buybox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  margin: var(--sp-4) 0;
}
.sw-buybox__price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.sw-buybox__now { font-size: 2rem; font-weight: 800; color: var(--navy); }
.sw-buybox__mrp { font-size: 1.05rem; color: var(--muted); text-decoration: line-through; }
.sw-buybox__save { color: var(--success); font-weight: 700; font-size: .9rem; }
.sw-buybox__stock { font-size: .9rem; font-weight: 600; margin-bottom: var(--sp-4); }
.sw-buybox__stock--in { color: var(--success); }
.sw-buybox__stock--out { color: var(--danger); }
.sw-buybox__form { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-end; }
.sw-qty { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.sw-qty label { font-weight: 700; font-size: .82rem; padding: 0 10px; color: var(--muted); }
.sw-qty input { width: 64px; border: 0; border-left: 1.5px solid var(--line); text-align: center; min-height: 44px; }
.sw-qty input:focus { box-shadow: none; }
.sw-buybox__actions { display: flex; flex-direction: column; gap: 10px; margin-top: var(--sp-4); }
.sw-buybox__note { font-size: .82rem; color: var(--muted); margin: var(--sp-3) 0 0; display: flex; align-items: center; gap: 8px; }
.sw-buybox__note svg { width: 16px; height: 16px; color: var(--teal); flex: none; }

.sw-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.sw-panel h2 { font-family: var(--font-serif); font-size: 1.3rem; }
.sw-prose { color: var(--ink); line-height: 1.75; }
.sw-prose p { margin: 0 0 var(--sp-3); }

.sw-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }

.sw-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sw-checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.sw-checklist svg { width: 18px; height: 18px; color: var(--teal); flex: none; margin-top: 3px; }

.sw-spec { width: 100%; border-collapse: collapse; }
.sw-spec th, .sw-spec td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sw-spec th { width: 40%; color: var(--muted); font-weight: 600; font-size: .9rem; }
.sw-spec tr:last-child th, .sw-spec tr:last-child td { border-bottom: 0; }

.sw-disclaimer { font-size: .88rem; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: var(--sp-4); }

/* Image modal */
.sw-modal {
  position: fixed; inset: 0;
  background: rgba(16, 42, 67, .8);
  display: none;
  place-items: center;
  z-index: 300;
  padding: var(--sp-5);
}
.sw-modal.is-open { display: grid; }
.sw-modal img { max-width: min(92vw, 720px); max-height: 90vh; border-radius: var(--radius); background: #fff; }
.sw-modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff; color: var(--navy);
  border: 0; min-height: 0;
}

/* 9. CART ------------------------------------------------------------------- */
.sw-cartwrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--sp-6); align-items: start; }
.sw-cartlist { display: grid; gap: var(--sp-4); }
.sw-cartrow {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  align-items: center;
}
.sw-cartrow__media { width: 88px; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.sw-cartrow__media img { width: 100%; height: 100%; object-fit: cover; }
.sw-cartrow__media svg { width: 30px; height: 30px; color: var(--navy-700); opacity: .4; }
.sw-cartrow__title { font-family: var(--font-serif); font-weight: 700; color: var(--navy); margin: 0 0 2px; }
.sw-cartrow__sku { font-size: .8rem; color: var(--muted); margin: 0 0 8px; }
.sw-cartrow__controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sw-cartrow__controls form { display: flex; gap: 6px; align-items: center; }
.sw-cartrow__controls input[type="number"] { width: 68px; min-height: 40px; text-align: center; }
.sw-cartrow__price { text-align: right; font-weight: 800; color: var(--navy); white-space: nowrap; }
.sw-cartrow__unit { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; }
.sw-linkbtn { background: none; border: 0; color: var(--danger); font-weight: 600; padding: 0; min-height: 0; cursor: pointer; text-decoration: underline; }
.sw-linkbtn:hover { background: none; color: #8a1810; }

.sw-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); box-shadow: var(--shadow-sm); }
.sw-summary h2 { font-size: 1.15rem; }
.sw-summary__row { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.sw-summary__row:last-of-type { border-bottom: 0; }
.sw-summary__row span { color: var(--muted); }
.sw-summary__row strong { color: var(--navy); }
.sw-summary__total { font-size: 1.2rem; }
.sw-summary__total span, .sw-summary__total strong { color: var(--navy); font-weight: 800; }
.sw-summary .sw-btn { margin-top: var(--sp-4); }
.sw-summary__note { font-size: .82rem; color: var(--muted); margin-top: var(--sp-3); display: flex; gap: 8px; align-items: flex-start; }
.sw-summary__note svg { width: 16px; height: 16px; color: var(--teal); flex: none; margin-top: 2px; }
.sw-continue { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--sp-4); font-weight: 600; }

.sw-empty { text-align: center; max-width: 460px; margin: var(--sp-6) auto; padding: var(--sp-7) var(--sp-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.sw-empty__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); color: var(--navy-700); margin: 0 auto var(--sp-4); }
.sw-empty__icon svg { width: 34px; height: 34px; }

/* 10. CHECKOUT + STATES ----------------------------------------------------- */
.sw-steps { display: flex; align-items: center; gap: 10px; margin: var(--sp-5) 0; flex-wrap: wrap; }
.sw-step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.sw-step__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); font-size: .8rem; }
.sw-step.is-active { color: var(--navy); }
.sw-step.is-active .sw-step__num { background: var(--teal); border-color: var(--teal); color: #fff; }
.sw-step.is-done .sw-step__num { background: var(--success); border-color: var(--success); color: #fff; }
.sw-step__sep { flex: 1; min-width: 20px; height: 2px; background: var(--line); border-radius: 2px; }

.sw-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-6); align-items: start; }
.sw-checkout__aside { position: sticky; top: calc(var(--header-h) + 16px); }
.sw-fieldset { border: 0; margin: 0 0 var(--sp-5); padding: 0; }
.sw-fieldset legend { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; color: var(--navy); padding: 0; margin-bottom: var(--sp-4); }

.sw-state { max-width: 620px; margin: var(--sp-7) auto; text-align: center; }
.sw-state__icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; margin: 0 auto var(--sp-4); }
.sw-state--success .sw-state__icon { background: var(--success-soft); color: var(--success); }
.sw-state--error .sw-state__icon { background: var(--danger-soft); color: var(--danger); }
.sw-state--info .sw-state__icon { background: #e6f0fb; color: var(--navy); }
.sw-state__icon svg { width: 42px; height: 42px; }
.sw-state h1 { font-family: var(--font-serif); }
.sw-state__card { text-align: left; margin-top: var(--sp-5); }
.sw-state__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-5); }

/* 11. POLICY / CONTENT ------------------------------------------------------ */
.sw-pagehead { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sw-pagehead__inner { padding: clamp(2rem, 4vw, 3rem) 0; }
.sw-pagehead h1 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 8px; }
.sw-content { max-width: 760px; }
.sw-content h2 { font-family: var(--font-serif); margin-top: var(--sp-5); }
.sw-content p { color: var(--ink); }

/* 12. LEGACY + ADMIN COMPATIBILITY (do not remove) -------------------------- */
.site-header, .site-footer { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 48px; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.brand { font-weight: 800; color: var(--ink); }
.nav-links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.admin-nav { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 14px 0; }
.admin-box, .panel, .summary, .notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.admin-box, .panel, .summary, .notice { padding: 20px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 28px; align-items: center; padding: 40px 0 24px; }
.hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; margin: 0 0 12px; }
.lede { color: var(--muted); font-size: 1.04rem; max-width: 720px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.product-card-body { padding: 16px; }
.product-card h2, .product-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.price { font-size: 1.35rem; font-weight: 800; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: .78rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: .9rem; }
.admin-box input, .admin-box textarea, .admin-box select,
.field input, .field textarea, .field select,
.nav input, .table input, .table textarea, .table select {
  width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 10px; font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 110px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.cart-row, .summary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.summary-row:last-child, .cart-row:last-child { border-bottom: 0; }
.total { font-size: 1.25rem; font-weight: 800; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .85rem; color: var(--muted); }
.error { color: var(--danger); }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; }

/* 13. RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .sw-footer__grid { grid-template-columns: 1fr 1fr; }
  .sw-features { grid-template-columns: 1fr; }
  .sw-cats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .sw-nav { display: none; }
  .sw-menu-toggle { display: inline-grid; }
  .sw-hero__inner { grid-template-columns: 1fr; }
  .sw-hero__visual { order: 2; min-height: 300px; }
  .sw-pd { grid-template-columns: 1fr; }
  .sw-gallery { position: static; }
  .sw-cartwrap { grid-template-columns: 1fr; }
  .sw-checkout { grid-template-columns: 1fr; }
  .sw-checkout__aside { position: static; order: -1; }
  .sw-bulk { grid-template-columns: 1fr; }
  .sw-bulk__cta { justify-content: flex-start; }
  .sw-trust__grid { grid-template-columns: 1fr 1fr; }
  .sw-author { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

@media (max-width: 560px) {
  .sw-container { width: calc(100% - 32px); }
  .sw-form-grid { grid-template-columns: 1fr; }
  .sw-trust__grid { grid-template-columns: 1fr; }
  .sw-cats { grid-template-columns: 1fr; }
  .sw-two { grid-template-columns: 1fr; }
  .sw-cartrow { grid-template-columns: 64px 1fr; }
  .sw-cartrow__media { width: 64px; }
  .sw-cartrow__price { grid-column: 2; text-align: left; }
  .sw-hero__cta .sw-btn { width: 100%; }
  .sw-brand__sub { display: none; }
  .sw-footer__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .sw-products { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-4); }
}

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

/* Entrance animation (hero) */
@keyframes sw-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.sw-animate { animation: sw-fade-up .6s ease both; }
.sw-animate--2 { animation-delay: .08s; }
.sw-animate--3 { animation-delay: .16s; }

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 12px 0 18px;
}

.checklist-grid,
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.check-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.check-item span {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.check-item.ok {
  border-color: #86efac;
  background: #f0fdf4;
}

.check-item.missing {
  border-color: #fecaca;
  background: #fef2f2;
}

.ok-badge {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.warn-badge {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}

.danger-badge {
  border-color: #fecaca;
  color: var(--danger);
  background: #fef2f2;
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-thumb {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.admin-thumb.tiny {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.image-card {
  display: grid;
  gap: 8px;
}

.image-meta-form {
  margin-top: 18px;
}

.product-table {
  min-width: 920px;
}

.filters {
  margin-bottom: 18px;
}

.product-media img,
.product-card img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 760px) {
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .check-row {
    display: grid;
    gap: 10px;
  }

  .actions {
    align-items: stretch;
  }

  .actions > * {
    width: 100%;
  }
}