/* ==========================================================
   SNEAKERS HUB - css/style.css
   One shared stylesheet for ALL pages.

   TABLE OF CONTENTS
   1.  Design tokens (fonts, sizes)
   2.  COLOR THEMES (black, white, red, blue, green)
   3.  Reset & base styles
   4.  Buttons & forms
   5.  Header & navigation
   6.  Hero
   7.  Sections, categories, brand strip
   8.  Product cards
   9.  Theme showcase, benefits, promo, testimonials, newsletter
   10. Footer & toasts
   11. Page header, shop page (filters)
   12. Product details page
   13. Cart & checkout
   14. Login & register
   15. About & contact
   16. Animations
   17. Responsive (tablet & mobile)
   ========================================================== */


/* ==========================================================
   1. DESIGN TOKENS
   ========================================================== */
:root {
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;

  --container: 1200px;
  --header-h: 72px;

  --transition: 0.3s ease;
  --theme-transition: 0.45s ease;

  --star: #fbbf24;
  --heart: #ff4d6d;
}


/* ==========================================================
   2. COLOR THEMES
   The theme name lives on the <html> tag: <html data-theme="red">.
   theme.js only changes that one attribute. Every color below
   is a CSS variable, so the WHOLE website changes at once.
   ========================================================== */

/* ---- BLACK (default) : black & dark gray ---- */
:root,
[data-theme="black"] {
  color-scheme: dark;
  --bg: #0b0b0c;
  --bg-alt: #121214;
  --surface: #1a1a1d;
  --surface-2: #242428;
  --text: #f5f5f5;
  --text-muted: #a3a3ab;
  --border: #2d2d32;
  --primary: #f5f5f5;
  --primary-hover: #d4d4d8;
  --on-primary: #0b0b0c;
  --accent: #d4d4d8;
  --header-bg: rgba(11, 11, 12, 0.85);
  --footer-bg: #060607;
  --footer-text: #f5f5f5;
  --footer-muted: #9a9aa3;
  --glow: rgba(255, 255, 255, 0.12);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --danger: #ff6b6b;
  --success: #4ade80;
  --warning: #fbbf24;
}

/* ---- WHITE : white & light gray ---- */
[data-theme="white"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #ececef;
  --text: #111113;
  --text-muted: #5b5d66;
  --border: #e2e2e7;
  --primary: #111113;
  --primary-hover: #3f3f46;
  --on-primary: #ffffff;
  --accent: #3f3f46;
  --header-bg: rgba(255, 255, 255, 0.88);
  --footer-bg: #ececef;
  --footer-text: #111113;
  --footer-muted: #5b5d66;
  --glow: rgba(0, 0, 0, 0.08);
  --shadow: 0 12px 30px rgba(17, 17, 19, 0.12);
  --danger: #c81e1e;
  --success: #15803d;
  --warning: #b45309;
}

/* ---- RED : red & dark red ---- */
[data-theme="red"] {
  color-scheme: dark;
  --bg: #1a0508;
  --bg-alt: #240a0e;
  --surface: #2e1015;
  --surface-2: #3b171d;
  --text: #fff3f4;
  --text-muted: #e2b3b8;
  --border: #522028;
  --primary: #e11d2e;
  --primary-hover: #be1626;
  --on-primary: #ffffff;
  --accent: #ff6b78;
  --header-bg: rgba(26, 5, 8, 0.88);
  --footer-bg: #110306;
  --footer-text: #fff3f4;
  --footer-muted: #d49aa1;
  --glow: rgba(225, 29, 46, 0.35);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --danger: #ff8a93;
  --success: #4ade80;
  --warning: #fbbf24;
}

/* ---- BLUE : blue & navy ---- */
[data-theme="blue"] {
  color-scheme: dark;
  --bg: #050c1f;
  --bg-alt: #091630;
  --surface: #0e1c3b;
  --surface-2: #15274f;
  --text: #f0f5ff;
  --text-muted: #a8b9dd;
  --border: #203768;
  --primary: #2f6bff;
  --primary-hover: #1f55d6;
  --on-primary: #ffffff;
  --accent: #7aa7ff;
  --header-bg: rgba(5, 12, 31, 0.88);
  --footer-bg: #030816;
  --footer-text: #f0f5ff;
  --footer-muted: #8fa3cc;
  --glow: rgba(47, 107, 255, 0.35);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --danger: #ff8a93;
  --success: #4ade80;
  --warning: #fbbf24;
}

/* ---- GREEN : green & dark green ---- */
[data-theme="green"] {
  color-scheme: dark;
  --bg: #04140c;
  --bg-alt: #082015;
  --surface: #0d2b1b;
  --surface-2: #143a26;
  --text: #effaf3;
  --text-muted: #a5cdb3;
  --border: #1d4d33;
  --primary: #15803d;
  --primary-hover: #166534;
  --on-primary: #ffffff;
  --accent: #4ade80;
  --header-bg: rgba(4, 20, 12, 0.88);
  --footer-bg: #020c07;
  --footer-text: #effaf3;
  --footer-muted: #86b398;
  --glow: rgba(34, 197, 94, 0.3);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --danger: #ff8a93;
  --success: #4ade80;
  --warning: #fbbf24;
}


/* ==========================================================
   3. RESET & BASE
   ========================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--theme-transition), color var(--theme-transition);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

[hidden] {
  display: none !important;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 10px);
}

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  z-index: 500;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}
.skip-link:focus {
  top: 1rem;
}

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

.accent {
  color: var(--accent);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}


/* ==========================================================
   4. BUTTONS & FORMS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition),
              color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 22px var(--glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: var(--bg);
}

.btn-small {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.link-arrow {
  font-weight: 600;
  color: var(--accent);
  transition: transform var(--transition);
}
.link-arrow:hover {
  text-decoration: underline;
}

/* ---- Forms ---- */
input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background-color var(--theme-transition), box-shadow var(--transition);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
textarea {
  min-height: 140px;
  resize: vertical;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--primary);
  background: transparent;
  border: 0;
  box-shadow: none;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--primary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}
.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.input-error {
  border-color: var(--danger);
}
.form-error {
  min-height: 1em;
  font-size: 0.82rem;
  color: var(--danger);
}
.form-message {
  min-height: 1.5rem;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}
.form-message.success {
  color: var(--success);
}
.form-message.error {
  color: var(--danger);
}
.form-card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.form-card h2 {
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
}

.alert {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  border: 1px solid;
  border-radius: var(--radius-sm);
}
.alert-error {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}
.alert-success {
  color: var(--success);
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}
.alert-info {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface-2);
}


/* ==========================================================
   5. HEADER & NAVIGATION
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

/* ---- Logo ---- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 10px;
  transition: background-color var(--theme-transition), color var(--theme-transition);
}
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}
.logo-text strong {
  margin-left: 0.2rem;
  font-weight: 800;
  color: var(--accent);
}

/* ---- Main navigation ---- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
}
.nav-link {
  padding: 0.5rem 0.95rem;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--transition), background-color var(--transition);
}
.nav-link:hover {
  color: var(--text);
}
.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

/* ---- Right side of header ---- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.header-search {
  position: relative;
}
.header-search input {
  width: 190px;
  padding: 0.55rem 2.5rem 0.55rem 1rem;
  font-size: 0.88rem;
  border-radius: 999px;
  transition: width var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.header-search input:focus {
  width: 240px;
}
.header-search button {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}
.header-search button:hover {
  color: var(--text);
}

/* ---- Theme color picker (small dots in header) ---- */
.theme-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.theme-swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.55);
  transition: transform var(--transition), outline-color var(--transition);
}
.theme-swatch:hover {
  transform: scale(1.15);
}
.theme-swatch.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transform: scale(1.1);
}
.theme-swatch[data-theme-option="black"] { background: #151517; }
.theme-swatch[data-theme-option="white"] { background: #ffffff; }
.theme-swatch[data-theme-option="red"]   { background: #e11d2e; }
.theme-swatch[data-theme-option="blue"]  { background: #2f6bff; }
.theme-swatch[data-theme-option="green"] { background: #16a34a; }

/* ---- Cart & wishlist icons ---- */
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--text);
  border-radius: 50%;
  transition: background-color var(--transition);
}
.icon-btn:hover {
  background: var(--surface-2);
}
.badge {
  position: absolute;
  top: 1px;
  right: -1px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 999px;
}

/* ---- Hamburger button (mobile only) ---- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.site-header.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.site-header.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ==========================================================
   6. HERO
   ========================================================== */
.hero {
  padding: 4rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 85% 25%, var(--glow), transparent 70%),
    var(--bg);
  transition: background-color var(--theme-transition);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3rem;
}
.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.9rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero-text > p {
  max-width: 520px;
  margin-top: 1.3rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  margin-top: 2.8rem;
}
.hero-stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.7rem;
}
.hero-stats span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-circle {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(145deg, var(--primary), var(--surface-2));
  border-radius: 50%;
  opacity: 0.92;
  transition: background var(--theme-transition);
}
.hero-img {
  position: relative;
  width: 74%;
  aspect-ratio: 1 / 1.1;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(-5deg);
  animation: float 6s ease-in-out infinite;
}
.hero-badge {
  position: absolute;
  left: 0;
  bottom: 10%;
  display: flex;
  flex-direction: column;
  padding: 0.8rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite reverse;
}
.hero-badge strong {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--accent);
}
.hero-badge span {
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* ==========================================================
   7. SECTIONS, BRAND STRIP, CATEGORIES
   ========================================================== */
.section {
  padding: 5rem 0;
  transition: background-color var(--theme-transition);
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  margin-bottom: 2.5rem;
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
}
.section-head p {
  margin-top: 0.8rem;
  color: var(--text-muted);
}
.section-head.center {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-strip {
  padding: 1.5rem 0;
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
  transition: background-color var(--theme-transition);
}
.brand-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}
.brand-strip-inner span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  opacity: 0.8;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.category-card {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.category-card:hover img {
  transform: scale(1.08);
}
.category-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3rem 1.2rem 1.2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}
.category-label h3 {
  font-size: 1.4rem;
  color: #ffffff;
}
.category-label span {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
}


/* ==========================================================
   8. PRODUCT CARDS
   (ui.js builds these cards from the product data)
   ========================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeUp 0.6s ease both;
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition), background-color var(--theme-transition);
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2);
}
.product-media a {
  display: block;
  height: 100%;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}
.product-card:hover .product-img {
  transform: scale(1.06);
}
.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 999px;
}
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition), color var(--transition);
}
.wishlist-btn:hover {
  transform: scale(1.12);
}
.wishlist-btn.active {
  color: var(--heart);
}
.wishlist-btn.active svg {
  fill: currentColor;
}

.product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.1rem 1.2rem;
}
.product-brand {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.product-name {
  font-size: 1.1rem;
  font-weight: 700;
}
.product-name a:hover {
  color: var(--accent);
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.stars {
  color: var(--star);
  letter-spacing: 1px;
}
.rating-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.product-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}
.color-swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.55);
  transition: transform var(--transition);
}
.color-swatch:hover {
  transform: scale(1.15);
}
.color-swatch.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.color-swatch.large {
  width: 32px;
  height: 32px;
}
.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.7rem;
}
.product-price {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}
.product-old-price {
  margin-left: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-state h3 {
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
  color: var(--text);
}
.empty-state .btn {
  margin-top: 1.2rem;
}


/* ==========================================================
   9. THEME SHOWCASE, BENEFITS, PROMO, TESTIMONIALS, NEWSLETTER
   ========================================================== */
.theme-showcase {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.6rem 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition),
              box-shadow var(--transition), background-color var(--theme-transition);
}
.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.theme-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}
.theme-card small {
  color: var(--text-muted);
}
.theme-card-dot {
  width: 58px;
  height: 58px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.55), 0 8px 18px rgba(0, 0, 0, 0.25);
}
.theme-card-dot[data-dot="black"] { background: linear-gradient(145deg, #3a3a3f, #0b0b0c); }
.theme-card-dot[data-dot="white"] { background: linear-gradient(145deg, #ffffff, #d4d4d9); }
.theme-card-dot[data-dot="red"]   { background: linear-gradient(145deg, #ff4d5c, #7f0d18); }
.theme-card-dot[data-dot="blue"]  { background: linear-gradient(145deg, #5b8cff, #0a1d5c); }
.theme-card-dot[data-dot="green"] { background: linear-gradient(145deg, #34d27b, #064d24); }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.benefit {
  padding: 1.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.benefit-icon {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 2rem;
}
.benefit h3 {
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}
.benefit p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.promo-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: clamp(1.8rem, 4vw, 3.2rem);
  overflow: hidden;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: var(--radius-lg);
  transition: background-color var(--theme-transition), color var(--theme-transition);
}
.promo-banner::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 280px;
  height: 280px;
  background: rgba(128, 128, 128, 0.18);
  border-radius: 50%;
  pointer-events: none;
}
.promo-banner > * {
  position: relative;
  z-index: 1;
}
.promo-banner h2 {
  max-width: 560px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.promo-banner p {
  margin-top: 0.5rem;
  opacity: 0.85;
}
.promo-banner .eyebrow {
  color: inherit;
  opacity: 0.8;
}
.promo-banner .btn-primary {
  color: var(--primary);
  background: var(--on-primary);
}
.promo-banner .btn-primary:hover {
  background: var(--on-primary);
  opacity: 0.9;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.testimonial {
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.testimonial blockquote {
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
}
.testimonial figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.testimonial figcaption span {
  color: var(--star);
}

.newsletter {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.newsletter h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.newsletter > p {
  margin-top: 0.6rem;
  color: var(--text-muted);
}
.newsletter-form {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.newsletter-form input {
  flex: 1;
  border-radius: 999px;
}


/* ==========================================================
   10. FOOTER & TOASTS
   ========================================================== */
.site-footer {
  padding-top: 4rem;
  color: var(--footer-text);
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  transition: background-color var(--theme-transition), color var(--theme-transition);
}
.site-footer .logo {
  color: var(--footer-text);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
}
.footer-brand p {
  max-width: 320px;
  margin-top: 1rem;
  font-size: 0.93rem;
  color: var(--footer-muted);
}
.footer-col h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}
.footer-col a {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.92rem;
  color: var(--footer-muted);
  transition: color var(--transition), transform var(--transition);
}
.footer-col a:hover {
  color: var(--footer-text);
  transform: translateX(4px);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 3rem;
  padding-block: 1.5rem;
  font-size: 0.85rem;
  color: var(--footer-muted);
  border-top: 1px solid var(--border);
}

.toast-container {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.toast {
  max-width: 320px;
  padding: 0.85rem 1.1rem;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.error {
  border-left-color: var(--danger);
}
.toast.hide {
  opacity: 0;
  transform: translateX(24px);
}


/* ==========================================================
   11. PAGE HEADER & SHOP PAGE (products.html)
   ========================================================== */
.page-header {
  padding: 3rem 0 2.2rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--theme-transition);
}
.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
}
.page-header p {
  margin-top: 0.6rem;
  color: var(--text-muted);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
}

.shop-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  align-items: start;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}
.filter-panel {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.filter-group {
  margin-bottom: 1.5rem;
}
.filter-title {
  margin-bottom: 0.7rem;
  font-size: 1rem;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip {
  padding: 0.4rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.chip:hover {
  border-color: var(--accent);
}
.chip.active {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
}
.price-values {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.shop-search {
  flex: 1;
  min-width: 200px;
}
.shop-sort {
  width: auto;
  min-width: 190px;
}
.results-count {
  font-size: 0.92rem;
  color: var(--text-muted);
}
.filter-toggle {
  display: none;
}


/* ==========================================================
   12. PRODUCT DETAILS PAGE
   ========================================================== */
.details-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  padding: 2.5rem 0 4rem;
}
.gallery-main {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}
.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
}
.thumb {
  width: 78px;
  height: 78px;
  padding: 0;
  overflow: hidden;
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb.active,
.thumb:hover {
  border-color: var(--accent);
}

.details-info h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
}
.details-brand {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.details-price {
  margin: 0.8rem 0;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}
.details-desc {
  margin-bottom: 1.4rem;
  color: var(--text-muted);
}
.option-block {
  margin-bottom: 1.4rem;
}
.option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.option-label span {
  font-weight: 400;
  color: var(--text-muted);
}
.size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.size-btn {
  min-width: 56px;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.size-btn:hover {
  border-color: var(--accent);
}
.size-btn.active {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
}
.size-btn:disabled {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed;
}
.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.stock-status::before {
  content: "";
  width: 9px;
  height: 9px;
  background: currentColor;
  border-radius: 50%;
}
.in-stock { color: var(--success); }
.low-stock { color: var(--warning); }
.out-of-stock { color: var(--danger); }

.qty-control {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: 999px;
}
.qty-btn {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color var(--transition);
}
.qty-btn:hover {
  background: var(--surface-2);
}
.qty-value {
  min-width: 38px;
  font-weight: 600;
  text-align: center;
}
.details-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.6rem;
}
.details-meta {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}


/* ==========================================================
   13. CART & CHECKOUT
   ========================================================== */
.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  align-items: start;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}
.cart-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeUp 0.4s ease both;
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.cart-item-img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.cart-item-info h3 {
  margin-bottom: 0.2rem;
  font-size: 1.1rem;
}
.cart-item-meta {
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.cart-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
}
.cart-item-price {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}
.remove-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--danger);
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}
.order-summary {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.order-summary h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  color: var(--text-muted);
}
.summary-total {
  margin-top: 0.6rem;
  padding-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
}
.order-summary .btn {
  margin-top: 1.2rem;
}
.order-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.order-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.order-item-info {
  flex: 1;
}
.order-item-info small {
  color: var(--text-muted);
}
.success-box {
  max-width: 560px;
  margin: 4rem auto;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.success-box .success-icon {
  display: block;
  margin-bottom: 1rem;
  font-size: 3.2rem;
}
.success-box p {
  margin: 0.8rem 0 1.5rem;
  color: var(--text-muted);
}


/* ==========================================================
   14. LOGIN & REGISTER
   ========================================================== */
.auth-section {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: 3rem 0;
  background: radial-gradient(50% 60% at 50% 0%, var(--glow), transparent 70%), var(--bg);
  transition: background-color var(--theme-transition);
}
.auth-card {
  width: min(100% - 2rem, 460px);
  padding: 2.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: fadeUp 0.6s ease both;
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.auth-title {
  font-size: 1.8rem;
  font-weight: 800;
}
.auth-subtitle {
  margin: 0.4rem 0 1.5rem;
  color: var(--text-muted);
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 3.2rem;
}
.toggle-password {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  padding: 0.35rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  transform: translateY(-50%);
  cursor: pointer;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.3rem;
  font-size: 0.9rem;
}
.auth-links a {
  color: var(--accent);
  font-weight: 600;
}
.auth-links a:hover {
  text-decoration: underline;
}
.auth-note {
  margin-top: 1.4rem;
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}


/* ==========================================================
   15. ABOUT & CONTACT
   ========================================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}
.two-col img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
}
.two-col h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}
.two-col p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.stat {
  padding: 1.6rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.3rem;
  color: var(--accent);
}
.stat span {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: start;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}
.info-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.info-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  background: var(--surface-2);
  border-radius: 50%;
}
.info-item h3 {
  font-size: 1rem;
}
.info-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
}


/* ==========================================================
   16. ANIMATIONS
   ========================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-14px) rotate(-3deg); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hero-text > * {
  animation: fadeUp 0.7s ease both;
}
.hero-text > *:nth-child(2) { animation-delay: 0.1s; }
.hero-text > *:nth-child(3) { animation-delay: 0.2s; }
.hero-text > *:nth-child(4) { animation-delay: 0.3s; }
.hero-text > *:nth-child(5) { animation-delay: 0.4s; }

/* The hero badge uses its own float (no rotation) */
.hero-badge {
  animation-name: floatBadge;
}
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================
   17. RESPONSIVE
   ========================================================== */

/* ---------- Small laptops ---------- */
@media (max-width: 1100px) {
  .header-search input { width: 140px; }
  .header-search input:focus { width: 170px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-showcase { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Tablets ---------- */
@media (max-width: 900px) {

  /* Mobile header: logo + icons on row 1, menu items below when open */
  .header-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-block: 0.6rem;
  }
  .header-actions { display: contents; }

  .logo { order: 1; }
  .header-actions > a:nth-of-type(1) { order: 2; margin-left: auto; }  /* wishlist */
  .header-actions > a:nth-of-type(2) { order: 3; }                   /* cart */
  .menu-toggle { display: flex; order: 4; }

  .main-nav,
  .header-search,
  .theme-picker,
  #authLink { display: none; }

  .main-nav { order: 5; width: 100%; margin: 0.4rem 0 0; flex-direction: column; align-items: stretch; }
  .header-search { order: 6; width: 100%; }
  .header-search input,
  .header-search input:focus { width: 100%; }
  .theme-picker { order: 7; width: 100%; justify-content: center; gap: 14px; padding: 10px; }
  #authLink { order: 8; }
  .theme-swatch { width: 28px; height: 28px; }

  .nav-link { padding: 0.8rem 1rem; border-radius: var(--radius-sm); }

  .site-header.menu-open .main-nav { display: flex; }
  .site-header.menu-open .header-search { display: block; }
  .site-header.menu-open .theme-picker { display: flex; }
  .site-header.menu-open #authLink { display: inline-flex; width: 100%; }

  /* Login button stays visible in the top row on tablets */
  #authLink { display: inline-flex; order: 3; }
  .site-header.menu-open #authLink { order: 8; }

  /* Layouts become single column */
  .hero { padding: 2.5rem 0 3.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { max-width: 460px; margin-inline: auto; }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .filter-panel { display: none; position: static; }
  .filter-panel.open { display: block; }
  .details-layout { grid-template-columns: 1fr; gap: 2rem; }
  .cart-layout,
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .contact-layout { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .brand-strip-inner { justify-content: center; }
  .brand-strip-inner span { font-size: 0.9rem; letter-spacing: 0.2em; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .product-info { padding: 0.8rem 0.8rem 1rem; }
  .product-name { font-size: 0.98rem; }
  .product-price { font-size: 1.1rem; }
  .product-bottom { flex-wrap: wrap; }

  .theme-showcase { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .newsletter-form { flex-direction: column; }
  .promo-banner { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  .cart-item { grid-template-columns: 84px 1fr; }
  .cart-item-img { width: 84px; height: 84px; }
  .cart-item-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-stats { gap: 1.4rem; }
  .toast-container { right: 0.8rem; left: 0.8rem; bottom: 0.8rem; }
  .toast { max-width: none; }
}

/* ---------- Very small phones ---------- */
@media (max-width: 560px) {
  #authLink { display: none; }
  .site-header.menu-open #authLink { display: inline-flex; }
}

@media (max-width: 400px) {
  .category-grid { grid-template-columns: 1fr; }
  .logo-text { font-size: 0.95rem; }
}