:root {
  --bg: #f5f7fb;
  --bg-elevated: #ffffff;
  --bg-soft: #eef1f7;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --accent: #e53935; /* DriveCentrics red */
  --accent-soft: rgba(229, 57, 53, 0.12);
  --accent-strong: #c62828;
  --accent-green: #7cb342; /* leaf green from logo */
  --text-main: #111827;
  --text-muted: #6b7280;
  --danger: #b91c1c;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-full: 999px;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-subtle: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 14px 40px rgba(229, 57, 53, 0.4);
  --shadow-accent-lg: 0 20px 50px rgba(229, 57, 53, 0.38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 0% -20%, rgba(229, 57, 53, 0.06), transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(124, 179, 66, 0.05), transparent 45%),
    radial-gradient(circle at top left, #ffffff 0%, #f0f4fa 55%, #eef2f8 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  overflow-x: clip;
}

button,
input,
select {
  font-family: inherit;
}

/* Mobile: tap highlight, touch targets, prevent iOS input zoom */
@media (hover: none) and (pointer: coarse) {
  a,
  button {
    -webkit-tap-highlight-color: rgba(229, 57, 53, 0.12);
  }
  button,
  .nav-link,
  .home-brand-tile,
  .shop-segment-btn,
  .btn-primary,
  .btn-secondary,
  .chip,
  .category-card {
    touch-action: manipulation;
  }
  .nav-link,
  .btn-primary,
  .btn-secondary,
  .chip,
  .category-card {
    min-height: 44px;
    min-width: 44px;
  }
  .shop-segment-btn {
    min-height: 44px;
    padding: 10px 16px;
  }
  .home-brand-tile {
    min-height: 44px;
  }
}


.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease,
    border-color 0.22s ease, background 0.22s ease;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--accent);
}

.logo-with-image {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 64px;
  width: auto;
  display: block;
}

.topbar-hidden {
  transform: translateY(-100%);
  box-shadow: none;
  border-color: transparent;
}

.search-wrapper {
  flex: 1;
  position: relative;
}

.search-wrapper input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease;
}

.search-wrapper input::placeholder {
  color: rgba(107, 114, 128, 0.7);
}

.search-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(229, 57, 53, 0.25);
  background: #ffffff;
}

.nav-link:focus-visible,
.hero-btn-primary:focus-visible,
.hero-btn-outline:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.home-brand-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-btn-primary:hover,
  .hero-btn-outline:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .nav-link-ghost:hover,
  .nav-link-primary:hover,
  .home-brand-tile:hover,
  .home-feature-card:hover,
  .product-card:hover {
    transform: none;
  }
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  padding: 8px 10px 10px;
  font-size: 0.85rem;
  z-index: 25;
  display: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.search-suggestion-item {
  display: inline-flex;
  flex-direction: column;
  width: 230px;
  min-width: 230px;
  margin-right: 8px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #f9fafb);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 8px;
  cursor: pointer;
  text-align: left;
  white-space: normal;
}

.search-suggestion-item:hover {
  background: radial-gradient(
      circle at top left,
      rgba(229, 57, 53, 0.06),
      transparent 60%
    ),
    #ffffff;
  border-color: rgba(229, 57, 53, 0.55);
}

.search-suggestion-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-suggestion-title {
  font-weight: 500;
  font-size: 0.86rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.search-suggestion-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.search-suggestion-price {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--accent);
}

.search-suggestion-extra {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 4px;
  font-size: 0.75rem;
}

.search-suggestion-badge {
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(229, 57, 53, 0.08);
  color: var(--accent-strong);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s;
}

.nav-link-ghost {
  border-color: rgba(15, 23, 42, 0.04);
}

.nav-link-ghost:hover {
  background: rgba(15, 23, 42, 0.04);
  transform: translateY(-1px);
}

.nav-link-primary {
  background: linear-gradient(135deg, var(--accent), #ef5350);
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-accent);
}

.nav-link-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.cart-count {
  background: #ffffff;
  color: var(--accent);
  padding: 0 7px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
}

.cart-icon {
  font-size: 0.95rem;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 18px;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(20px + env(safe-area-inset-left, 0px));
  padding-right: calc(20px + env(safe-area-inset-right, 0px));
}

/* ===================== HERO — dark premium ===================== */
.hero {
  position: relative;
  margin-top: 18px;
  border-radius: 24px;
  overflow: hidden;
  background: #0a0f1a;
  padding: 40px 40px 36px;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 24px 64px rgba(10, 15, 26, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(229, 57, 53, 0.15), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.1), transparent 50%);
  pointer-events: none;
}

.hero-main {
  position: relative;
  z-index: 1;
  display: grid;
  /* Copy keeps a readable measure; right column grows to fill remaining hero width */
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.92fr);
  gap: 28px 36px;
  /* Top-align so stat pills sit in the top-right of the hero (not vertically centred). */
  align-items: start;
  min-width: 0;
}

.hero-inner {
  position: relative;
  max-width: min(640px, 100%);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}

.hero-inner h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #ffffff;
}

.hero-sub {
  margin: 0 0 32px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  max-width: min(56ch, 100%);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 28px;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 36px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  background: #ffffff;
  color: #0a0f1a;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.18);
}

.hero-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hero-btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-delivery {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.hero-delivery svg {
  color: #facc15;
  flex-shrink: 0;
}

.hero-delivery strong {
  color: #ffffff;
  font-weight: 700;
}

.hero-right-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
  pointer-events: none;
}

.hero-stats {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  align-items: stretch;
  flex-shrink: 0;
  width: 100%;
}

.hero-stat-pill {
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 1.8vw, 18px) clamp(18px, 2.2vw, 26px);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex: 1 1 140px;
  min-width: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-stat-number {
  font-size: clamp(1.1rem, 1.1rem + 0.35vw, 1.35rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: clamp(0.7rem, 0.65rem + 0.2vw, 0.8rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.btn-primary,
.btn-secondary {
  border-radius: var(--radius-full);
  padding: 13px 28px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ef5350);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(229, 57, 53, 0.45);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent-lg);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #f3f4f6;
}

/* old hero delivery / badge CSS removed */

/* ===================== TRUST BAR ===================== */
.home-trust-bar {
  margin-top: 20px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.home-trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding: 18px 22px;
}

.home-trust-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.home-trust-bar-icon {
  flex-shrink: 0;
  color: #16a34a;
}

/* Homepage hero: Klarna / Clearpay info under stat pills (display only, not interactive) */
.hero-bnpl-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.hero-bnpl-card {
  padding: clamp(10px, 1.2vw, 14px) clamp(12px, 1.8vw, 18px);
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.12);
}

.hero-bnpl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.hero-bnpl-badge {
  display: block;
  height: clamp(14px, 1.1vw, 17px);
  width: auto;
  flex-shrink: 0;
}

.hero-bnpl-badge--cp {
  height: clamp(15px, 1.15vw, 18px);
}

.hero-bnpl-title {
  font-weight: 700;
  font-size: clamp(0.74rem, 0.65rem + 0.35vw, 0.88rem);
  color: #0f172a;
  letter-spacing: -0.02em;
}

.hero-bnpl-desc {
  margin: 0;
  font-size: clamp(0.68rem, 0.6rem + 0.35vw, 0.8rem);
  line-height: 1.4;
  color: #64748b;
}

.hero-bnpl-desc strong {
  color: #334155;
  font-weight: 700;
}

/* Homepage hero: Trustpilot-style summary (scores from /trustpilot-stats.json) */
.hero-trustpilot-card {
  pointer-events: auto;
  width: 100%;
  padding: clamp(12px, 1.4vw, 16px) clamp(14px, 2vw, 20px);
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.12);
  box-sizing: border-box;
}

.hero-tp-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  transition: box-shadow 0.18s ease, transform 0.15s ease;
  border-radius: 8px;
  outline: none;
}

.hero-tp-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.hero-tp-banner:focus-visible {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #00b67a;
}

.hero-tp-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero-tp-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00b67a;
}

.hero-tp-logo-star {
  width: 28px;
  height: 28px;
  display: block;
}

.hero-tp-wordmark {
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.hero-tp-stars {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
  width: 100%;
  max-width: 280px;
  margin-top: 2px;
}

.hero-tp-star-cell {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  border-radius: 3px;
  background: #00b67a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-tp-star-cell svg {
  width: 62%;
  height: 62%;
  display: block;
}

.hero-tp-meta {
  margin: 4px 0 0;
  font-size: clamp(0.82rem, 0.75rem + 0.25vw, 0.92rem);
  font-weight: 500;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.hero-tp-brand {
  margin: 0;
  font-size: clamp(0.68rem, 0.62rem + 0.2vw, 0.76rem);
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}

@media (max-width: 380px) {
  .hero-bnpl-desc {
    font-size: 0.62rem;
  }
}

/* ===================== SHARED SECTION HEADING ===================== */
.home-section-title {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  position: relative;
  padding-bottom: 14px;
}

.home-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(229, 57, 53, 0.25));
}

.home-deals-header .home-section-title {
  margin-bottom: 0;
  padding-bottom: 0;
}

.home-deals-header .home-section-title::after {
  display: none;
}

/* ===================== SHOP BY BRAND ===================== */
.home-brands {
  margin-top: 40px;
}

/* Placed directly under hero so it’s visible on first paint */
.home-brands--first {
  margin-top: 14px;
  scroll-margin-top: 96px;
}

.home-brands--first .home-section-title {
  margin-bottom: 14px;
  font-size: 1.35rem;
  padding-bottom: 10px;
}

.home-brands--first .home-section-title::after {
  width: 40px;
  height: 2px;
}

.home-brands--first .home-brand-tile-img {
  height: 200px;
  padding: 5px 6px;
  box-sizing: border-box;
}

.home-brands--first .home-brand-tile-img img.home-brand-tile-brandmark,
.home-brands--first .home-brand-tile-img svg.home-brand-tile-brandmark {
  max-height: 190px;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.home-brand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-brand-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-brand-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 57, 53, 0.2);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.12);
}

.home-brand-tile-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 6px 8px;
  box-sizing: border-box;
}

/* “Shop by brand” tiles: gradient panels + vector marks in /images/brands/ */
.home-brand-tile-img.home-brand-tile-img--apple {
  background: linear-gradient(155deg, #2c2c2e, #0a0a0c);
}
.home-brand-tile-img.home-brand-tile-img--samsung {
  background: linear-gradient(155deg, #ffffff, #f1f5f9);
}
.home-brand-tile-img.home-brand-tile-img--google {
  background: linear-gradient(155deg, #ffffff, #e8eaed);
}
.home-brand-tile-img.home-brand-tile-img--accessories {
  background: linear-gradient(155deg, #475569, #1e293b);
}

/* Text mark (Accessories tile only — Apple / Samsung / Google use inline SVG) */
.home-brand-tile-mark {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1.25rem, 4.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-align: center;
  padding: 0 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.home-brand-tile-img--accessories .home-brand-tile-mark {
  color: #f8fafc;
}

.home-brand-tile-img img,
.home-brand-tile-img svg {
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 6px 18px rgba(15, 23, 42, 0.08));
}

/* Static brand logos: fill the gradient area (not capped like old 130px). */
.home-brand-tile-img img.home-brand-tile-brandmark,
.home-brand-tile-img svg.home-brand-tile-brandmark {
  max-height: 188px;
  width: 100%;
  height: auto;
  display: block;
}

.home-brand-tile-brandmark--samsung text {
  text-rendering: geometricPrecision;
}

/* Legacy: dynamic thumbs if any tile omits .home-brand-tile-brandmark */
.home-brand-tile-img img:not(.home-brand-tile-brandmark) {
  max-height: 188px;
}

.home-brand-tile-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.home-brand-tile-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.home-brand-tile-arrow {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
  transition: transform 0.18s ease;
}

.home-brand-tile:hover .home-brand-tile-arrow {
  transform: translateX(4px);
}

.home-brand-tile-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  width: 100%;
}

.home-brand-tile-logo {
  height: 36px;
  width: auto;
  opacity: 0.5;
}

.home-brand-tile-placeholder span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

/* ===================== FEATURED DEALS ===================== */
.home-deals {
  margin-top: 48px;
}

.home-deals-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 16px;
}

.home-deals-countdown {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 14px;
  border-radius: 999px;
}

.home-deals-subtitle {
  margin: -8px 0 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.home-deals-grid {
  gap: 20px;
}

.home-deals-cta-wrap {
  margin-top: 24px;
  text-align: center;
}

.home-deals-cta {
  text-decoration: none;
  font-weight: 600;
  padding: 14px 32px;
}

/* ===================== WHY DRIVECENTRICS ===================== */
.home-features {
  margin-top: 48px;
}

.home-features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-feature-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.1);
}

.home-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.home-feature-icon--red {
  background: rgba(229, 57, 53, 0.1);
  color: #c62828;
}
.home-feature-icon--blue {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}
.home-feature-icon--amber {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}
.home-feature-icon--green {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.home-feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.home-feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===================== HOW IT WORKS ===================== */
.home-steps {
  margin-top: 48px;
}

.home-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-step {
  text-align: center;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  padding: 32px 22px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease;
}

.home-step:hover {
  transform: translateY(-3px);
}

.home-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ef5350);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(229, 57, 53, 0.3);
}

.home-step-icon {
  display: block;
  margin: 0 auto 14px;
  color: var(--text-muted);
}

.home-step h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.home-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===================== TRADE-IN BANNER (home) ===================== */
.home-tradein {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 36px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff 0%, rgba(229, 57, 53, 0.04) 42%, #f8fafc 100%);
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.05),
    0 20px 40px -12px rgba(15, 23, 42, 0.1);
}

.home-tradein-text {
  flex: 1;
}

.home-tradein-text h2 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
}

.home-tradein-text p {
  margin: 0 0 22px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 44ch;
}

.home-tradein-btn {
  text-decoration: none;
  font-weight: 600;
}

.home-tradein-graphic {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.28;
}

/* ===================== HOME RESPONSIVE ===================== */
@media (max-width: 900px) {
  .hero {
    padding: 40px 28px 36px;
    min-height: auto;
    width: 100%;
    max-width: 100%;
  }
  .hero-main {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hero-inner { max-width: 100%; }
  .hero-inner h1 { font-size: 1.9rem; }
  .hero-right-stack {
    order: -1;
    margin-top: 0;
    margin-bottom: 28px;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
  }
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-end;
  }
  .hero-stat-pill { min-width: 0; flex: 1; }
  .hero-actions { justify-content: flex-start; }

  .home-trust-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .home-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-features-grid {
    grid-template-columns: 1fr;
  }
  .home-steps-grid {
    grid-template-columns: 1fr;
  }
  .home-tradein {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
  .home-tradein-text p { max-width: 100%; }
}

@media (max-width: 560px) {
  .home-brands--first {
    margin-top: 10px;
  }

  .hero {
    padding: 32px 20px 28px;
    border-radius: 18px;
  }
  .hero-inner h1 { font-size: 1.5rem; }
  .hero-sub { font-size: 0.92rem; }
  .hero-btn-primary,
  .hero-btn-outline {
    width: 100%;
    justify-content: center;
  }
  .hero-stats { gap: 8px; }
  .hero-stat-pill { padding: 10px 14px; }
  .hero-stat-number { font-size: 1rem; }

  .home-trust-bar-inner {
    padding: 16px 18px;
    gap: 12px 16px;
  }
  .home-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .home-brands--first .home-brand-tile-img {
    height: 148px;
    padding: 4px 5px;
  }
  .home-brands--first .home-brand-tile-img img.home-brand-tile-brandmark,
  .home-brands--first .home-brand-tile-img svg.home-brand-tile-brandmark {
    max-height: 140px;
  }
  .home-brand-tile-img {
    height: 148px;
    padding: 4px 6px;
  }
  .home-brand-tile-img img.home-brand-tile-brandmark,
  .home-brand-tile-img svg.home-brand-tile-brandmark,
  .home-brand-tile-img img:not(.home-brand-tile-brandmark) {
    max-height: 140px;
  }
  .home-brand-tile-info { padding: 10px 14px; }
  .home-section-title { font-size: 1.25rem; }
}

.category-section {
  margin-top: 32px;
  padding: 14px 12px;
  border-radius: 22px;
  background: #c4e6c9; /* darker ecoâ€‘green around boxes */
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  border: none;
  border-radius: 20px;
  padding: 18px 18px;
  background: linear-gradient(135deg, #ffffff, #f5f7ff);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.18s ease,
    border-color 0.14s ease, background 0.14s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
  background: linear-gradient(135deg, #ffffff, #e5f0ff);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 0deg,
    rgba(229, 57, 53, 0.05),
    rgba(229, 57, 53, 0.8),
    rgba(229, 57, 53, 0.05)
  );
  opacity: 0;
  pointer-events: none;
  transform: rotate(0deg);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: linear-gradient(135deg, #ffffff, #f5f7ff);
}

.category-card:hover::before {
  opacity: 1;
  animation: category-strobe 1.2s linear infinite;
}

.category-card > * {
  position: relative;
  z-index: 1;
}

.category-emoji {
  font-size: 2.3rem;
  line-height: 1;
  opacity: 0.85;
}

.category-label {
  font-size: 0.98rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: 0.01em;
}

@keyframes category-strobe {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hero-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
}

.filters {
  margin-top: 24px;
}

.filters {
  display: none;
}

.filters-inner {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.6fr auto;
  gap: 20px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.section-header--shop {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.shop-header-main {
  flex: 1;
  min-width: min(100%, 260px);
}

.shop-title-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 6px;
}

.shop-title-toggle-row h2 {
  margin: 0;
}

/* Sliding segment: Phones | Accessories */
.shop-segment-track {
  position: relative;
  display: flex;
  flex-shrink: 0;
  padding: 4px;
  background: #e8eaed;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.shop-segment-track::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 6px);
  bottom: 4px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  transition: transform 0.22s ease;
  pointer-events: none;
}

.shop-segment-track[data-mode="accessories"]::before {
  transform: translateX(calc(100% + 8px));
}

.shop-segment-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 108px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s ease;
  font-family: inherit;
}

.shop-segment-btn:hover {
  color: #334155;
}

.shop-segment-track[data-mode="phones"] .shop-segment-btn:first-of-type,
.shop-segment-track[data-mode="accessories"] .shop-segment-btn:last-of-type {
  color: #111827;
}

.shop-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.shop-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-sort-label {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
}

.shop-sort-select {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #ffffff;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  min-width: 140px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.shop-filters-toggle {
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #ffffff;
  padding: 7px 16px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* Author `display: inline-flex` wins over the default [hidden] rule in some cases */
.shop-filters-toggle[hidden] {
  display: none !important;
}

.shop-filters-toggle-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.shop-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.shop-filter-drawer-open {
  pointer-events: auto;
  opacity: 1;
}

.shop-filter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
}

.shop-filter-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(380px, 100%);
  height: 100%;
  background: #f9fafb;
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.25);
  border-left: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.shop-filter-drawer-open .shop-filter-panel {
  transform: translateX(0);
}

.shop-filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.shop-filter-panel-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.shop-filter-close {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}

.shop-filter-panel-body {
  padding: 12px 18px 0;
  flex: 1;
  overflow-y: auto;
}

.shop-filter-row {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  gap: 6px;
}

.shop-filter-label {
  font-size: 0.85rem;
}

.shop-filter-row select,
.shop-filter-row input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #ffffff;
  font-size: 0.82rem;
}

.shop-filter-panel-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.shop-filter-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-filter-reset {
  width: 100%;
  border-radius: var(--radius-full);
  border: 1px solid rgba(15, 23, 42, 0.2);
  padding: 10px 18px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
  cursor: pointer;
}

.shop-filter-apply {
  width: 100%;
  border-radius: var(--radius-full);
  border: none;
  padding: 10px 18px;
  background: #111827;
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ===================== SHOP EMPTY STATE ===================== */
.shop-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 28px 48px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.shop-empty-logo {
  height: 56px;
  width: auto;
  margin-bottom: 24px;
  opacity: 0.8;
}

.shop-empty-heading {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  max-width: 36ch;
  line-height: 1.35;
}

.shop-empty-hint {
  margin: 0 0 24px;
  font-size: 0.92rem;
  color: #64748b;
  max-width: 42ch;
  line-height: 1.55;
}

.shop-empty-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  background: #0f172a;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.shop-empty-reset:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.filter-group label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(163, 177, 198, 0.9);
  margin-bottom: 6px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #ffffff;
  color: var(--text-main);
  padding: 6px 11px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s;
}

.chip:hover {
  background: #f3f4f6;
}

.chip-active {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

#priceRange {
  width: 100%;
}

.price-labels {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sort-group select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.8rem;
}

.product-section {
  margin-top: 28px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.weekly-deals-countdown {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.35em;
}

.section-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    #ffffff,
    #f9fafb
  );
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.2s ease,
    border-color 0.16s ease, background 0.16s;
}

.product-card:not(.product-card--catalog)::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(124, 179, 66, 0.35),
    transparent,
    rgba(229, 57, 53, 0.35),
    transparent,
    rgba(124, 179, 66, 0.38)
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.product-card:not(.product-card--catalog):hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
  border-color: rgba(229, 57, 53, 0.55);
  background: radial-gradient(
      circle at top left,
      rgba(229, 57, 53, 0.08),
      transparent 60%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(124, 179, 66, 0.14),
      transparent 60%
    ),
    #ffffff;
}

.product-card:not(.product-card--catalog):hover::before {
  opacity: 0.28;
}

/* Catalog grid (shop + weekly deals): minimal, no ratings */
.product-card--catalog {
  padding: 0;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  gap: 0;
}

.product-card--catalog::before {
  display: none;
}

.product-card--catalog:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
}

.product-card--catalog .product-card-image {
  border-radius: 16px 16px 0 0;
  margin-bottom: 0;
  min-height: 188px;
  height: 188px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.product-card-body {
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.product-card-brand {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.product-card--catalog .product-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card--catalog .product-meta {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-priceblock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.product-card-price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.product-card--catalog .product-price {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.product-card--catalog .product-original-price {
  font-size: 0.8125rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.product-save-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #0d9488;
  background: rgba(13, 148, 136, 0.1);
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.product-card-footer {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding-bottom: 2px;
}

.product-card-condition {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

p.product-card-condition {
  margin: 0;
}

.modal-meta #modalGrade.product-card-condition {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  align-items: center;
}

.product-detail-info #productDetailGrade.product-card-condition {
  align-items: stretch;
  text-align: center;
  margin-bottom: 10px;
}

.product-card-condition-grade {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.product-card-condition-detail {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.45;
  max-width: 100%;
}

.product-card--catalog .product-card-actions {
  padding: 0 14px 14px;
  margin-top: 6px;
}

.product-card--catalog .product-card-add {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.8125rem;
  padding-top: 11px;
  padding-bottom: 11px;
}

.product-card-actions {
  margin-top: auto;
  padding-top: 8px;
  width: 100%;
}

.product-card-add {
  cursor: pointer;
}

.product-card-image {
  border-radius: 14px;
  height: 200px;
  min-height: 200px;
  background: #f3f4f6;
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
  box-sizing: border-box;
}

.product-card-image::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 16px;
  border: 2px solid rgba(0, 0, 0, 0.7);
  background: linear-gradient(145deg, #f9fafb, #e5e7eb);
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.85),
    0 0 0 7px rgba(0, 0, 0, 0.85),
    0 0 0 11px rgba(31, 41, 55, 0.8);
}

.product-card-image:has(img)::before {
  display: none;
}

.product-title {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.product-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.product-price {
  font-size: 0.95rem;
  font-weight: 600;
}

.product-original-price {
  font-size: 0.75rem;
  color: rgba(163, 177, 198, 0.7);
  text-decoration: line-through;
}

.product-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.pill {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.7rem;
}

.pill-grade {
  background: rgba(229, 57, 53, 0.08);
  color: var(--accent-strong);
}

.pill-tag {
  background: rgba(124, 179, 66, 0.12);
  color: var(--accent-green);
}

.pill-small {
  padding: 3px 6px;
  font-size: 0.7rem;
  background: #f3f4f6;
  color: var(--text-muted);
}

.rating {
  font-size: 0.75rem;
  color: rgba(252, 211, 77, 0.96);
}

/* value-props removed — replaced by home-features section */

/* ===================== TRADE-IN PAGE (modern) ===================== */
.tradein-page-body {
  background: linear-gradient(180deg, #f1f5f9 0%, var(--bg) 28%);
}

.tradein-page {
  min-height: 60vh;
}

.tradein-hero {
  position: relative;
  padding: 36px 20px 44px;
  overflow: hidden;
}

.tradein-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 80% at 15% -30%, rgba(229, 57, 53, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 60% at 100% 20%, rgba(124, 179, 66, 0.12), transparent 50%),
    linear-gradient(165deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  pointer-events: none;
}

.tradein-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  color: #f8fafc;
}

.tradein-hero-kicker {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.72);
}

.tradein-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 4.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.tradein-hero-lead {
  margin: 0 auto 22px;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.92);
  max-width: 46ch;
}

.tradein-hero-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}

.tradein-hero-highlights li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 500;
  color: #e2e8f0;
}

.tradein-hero-highlight-icon {
  display: flex;
  color: rgba(248, 250, 252, 0.9);
  opacity: 0.95;
}

.tradein-section {
  margin-top: -18px;
  padding: 0 20px 56px;
  position: relative;
  z-index: 2;
}

.tradein-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.tradein-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 24px;
  align-items: start;
}

.tradein-how {
  background: var(--bg-elevated);
  border-radius: 22px;
  padding: 26px 24px 22px;
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 24px 48px -12px rgba(15, 23, 42, 0.08);
}

.tradein-how-title {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.tradein-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tradein-timeline-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 22px;
  position: relative;
}

.tradein-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(229, 57, 53, 0.35), rgba(148, 163, 184, 0.2));
  border-radius: 1px;
}

.tradein-timeline-marker {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.35);
  flex-shrink: 0;
}

.tradein-timeline-heading {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.tradein-timeline-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.tradein-how-footnote {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
  padding-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.tradein-estimator {
  min-width: 0;
}

.tradein-card--glass {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  padding: 26px 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.05),
    0 20px 50px -15px rgba(15, 23, 42, 0.12);
}

.tradein-card-header {
  margin-bottom: 22px;
}

.tradein-card-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.tradein-card-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.tradein-form--modern {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tradein-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.tradein-field--full {
  grid-column: 1 / -1;
}

.tradein-field label,
.tradein-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #64748b;
  margin-bottom: 8px;
}

.tradein-field-hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.tradein-select-wrap {
  position: relative;
}

.tradein-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.tradein-select {
  width: 100%;
  appearance: none;
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tradein-select:hover {
  border-color: rgba(229, 57, 53, 0.35);
}

.tradein-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tradein-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border-radius: 16px;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.tradein-segmented .chip,
.tradein-segmented .tradein-seg-btn {
  margin: 0;
  border-radius: 12px;
  border: none;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tradein-segmented .chip:hover,
.tradein-segmented .tradein-seg-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.65);
}

.tradein-segmented .chip-active,
.tradein-segmented .chip.chip-active {
  background: #fff !important;
  color: var(--accent-strong) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.tradein-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tradein-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 160px;
}

.tradein-refresh-text-btn {
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  flex: 0 0 auto;
}

.tradein-result--panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(229, 57, 53, 0.06),
    rgba(255, 255, 255, 0.95)
  );
  border: 1px solid rgba(229, 57, 53, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tradein-result-main {
  min-width: 0;
  flex: 1;
}

.tradein-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tradein-accept-btn {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-green), #5f9f30);
  border-color: rgba(95, 159, 48, 0.72);
}

.tradein-accept-btn:hover {
  background: linear-gradient(135deg, #6ead36, #568f2b);
  border-color: rgba(86, 143, 43, 0.8);
}

.tradein-accept-btn--bottom {
  width: 100%;
  margin-top: 14px;
  min-height: 48px;
  font-size: 0.95rem;
}

.tradein-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tradein-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: rgba(229, 57, 53, 0.04);
}

.tradein-icon-btn.tradein-copy-done {
  border-color: rgba(124, 179, 66, 0.5);
  color: var(--accent-green);
}

.tradein-result-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #64748b;
}

.tradein-result-value {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.tradein-result-value.tradein-has-value {
  color: var(--accent-strong);
}

.tradein-result-sub {
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.tradein-multi {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.65);
  background: rgba(248, 250, 252, 0.85);
}

.tradein-multi-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.tradein-multi-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tradein-multi-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tradein-multi-item-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  min-width: 0;
  color: #0f172a;
}

.tradein-multi-item-num {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.72rem;
  color: #64748b;
  min-width: 1.25rem;
}

.tradein-multi-item-text {
  flex: 1 1 120px;
  min-width: 0;
  font-weight: 600;
}

.tradein-multi-item-price {
  flex-shrink: 0;
  font-weight: 800;
  color: var(--accent-strong, #c62828);
}

.tradein-multi-remove {
  flex-shrink: 0;
  margin: 0;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 8px;
  cursor: pointer;
}

.tradein-multi-remove:hover {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(254, 242, 242, 0.6);
}

.tradein-add-device-btn {
  width: 100%;
  margin-bottom: 8px;
}

.tradein-multi-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.tradein-graph {
  margin-top: 6px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: linear-gradient(165deg, #f8fafc 0%, #fff 100%);
  border: 1px solid var(--border-subtle);
  display: none;
}

.tradein-accept-panel {
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
}

.tradein-accept-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.tradein-accept-sub {
  margin: 6px 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tradein-accept-grid {
  display: grid;
  gap: 10px;
}

.tradein-accept-grid textarea {
  min-height: 132px;
}

.tradein-accept-submit-btn {
  width: 100%;
}

.tradein-terms-row {
  margin-top: 6px;
  display: grid;
  gap: 10px;
}

.tradein-terms-open-btn {
  width: fit-content;
}

.tradein-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #334155;
}

.tradein-terms-check input[type="checkbox"] {
  margin-top: 2px;
}

/* Scroll lives in .tradein-terms-content only; Close stays fixed in .tradein-terms-actions (fixes iOS showing end of doc + stuck close). */
/* Do not set display:flex on the base rule — it overrides UA `dialog:not([open])` and keeps terms visible over the whole trade-in form. */
.tradein-terms-dialog {
  --tradein-terms-max-h: min(90dvh, 92vh, 900px);
  width: min(760px, calc(100vw - 28px));
  max-height: var(--tradein-terms-max-h);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
  display: none;
}

.tradein-terms-dialog[open] {
  display: flex;
  flex-direction: column;
}

.tradein-terms-dialog::backdrop {
  background: rgba(2, 6, 23, 0.5);
}

.tradein-terms-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: var(--tradein-terms-max-h);
  flex: 1 1 auto;
}

.tradein-terms-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 18px;
}

.tradein-terms-content h3 {
  margin: 0 0 10px;
}

.tradein-terms-content p {
  margin: 0 0 10px;
  line-height: 1.55;
  font-size: 0.92rem;
}

.tradein-terms-actions {
  flex-shrink: 0;
  margin-top: 0;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
}

.tradein-terms-close-btn {
  width: 100%;
  touch-action: manipulation;
  position: relative;
  z-index: 1;
}

.tradein-graph-visible {
  display: block;
  animation: tradein-graph-in 0.35s ease;
}

@keyframes tradein-graph-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tradein-graph-header {
  margin-bottom: 10px;
}

.tradein-graph-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.tradein-graph-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Month buttons row (must not use .tradein-timeline — that class is for the “How trade-in works” list) */
.tradein-month-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.tradein-month-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.tradein-month-btn:hover {
  border-color: rgba(124, 179, 66, 0.45);
  background: rgba(124, 179, 66, 0.06);
}

.tradein-month-btn--active {
  border-color: rgba(124, 179, 66, 0.85);
  background: rgba(124, 179, 66, 0.1);
  box-shadow: 0 0 0 1px rgba(124, 179, 66, 0.2);
}

.tradein-month-btn-price {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.tradein-month-btn--active .tradein-month-btn-price {
  color: #166534;
}

.tradein-month-btn-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  line-height: 1.25;
}

.tradein-month-btn--active .tradein-month-btn-label {
  color: #15803d;
}

.tradein-value-box {
  margin-top: 14px;
  padding: 16px 18px 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(220, 252, 231, 0.95) 0%, rgba(187, 247, 208, 0.55) 100%);
  border: 1px solid rgba(34, 197, 94, 0.45);
  box-shadow: 0 8px 28px rgba(22, 101, 52, 0.1);
}

.tradein-value-box[hidden] {
  display: none !important;
}

.tradein-value-box-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #15803d;
}

.tradein-value-box-amount {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #14532d;
  line-height: 1.1;
}

.tradein-value-box-cta {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 500;
  color: #166534;
}

.tradein-graph-footnote {
  margin: 12px 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tradein-trust-strip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tradein-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.tradein-trust-ico {
  display: flex;
  color: var(--accent);
  opacity: 0.9;
}

.tradein-trust-txt {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
}

@media (max-width: 420px) {
  .tradein-segmented {
    grid-template-columns: 1fr;
  }
}

/* Legacy class hooks (home / older markup) */
.tradein {
  margin-top: 48px;
  padding: 22px 20px 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(236, 253, 245, 0.95), #ffffff 60%),
    radial-gradient(circle at bottom right, rgba(209, 250, 229, 0.8), transparent 60%);
  border: 1px solid rgba(34, 197, 94, 0.18);
}

.tradein-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 2fr);
  gap: 22px;
}

/* Help page */
.nav-link-active {
  font-weight: 600;
  color: var(--accent, #16a34a);
}

.help-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
}

.help-intro {
  margin-bottom: 36px;
}

.help-intro h1 {
  margin: 0 0 10px;
  font-size: 1.75rem;
  color: var(--text-main);
}

.help-intro p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.help-faq h2,
.help-contact h2 {
  margin: 0 0 20px;
  font-size: 1.2rem;
  color: var(--text-main);
}

.help-faq {
  margin-bottom: 48px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  padding: 14px 0;
}

.faq-item:first-of-type {
  padding-top: 0;
}

.faq-question {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  padding-right: 24px;
  position: relative;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
}

.faq-item[open] .faq-question::after {
  content: "âˆ’";
}

.faq-answer {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.faq-answer strong {
  color: var(--text-main);
}

.help-contact {
  margin-top: 18px;
  padding: 24px 22px 22px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.help-contact-intro {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.help-contact-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 18px;
}

.help-contact-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
  background: #e2e8f0;
}

.help-contact-direct {
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.help-contact-direct:hover {
  text-decoration: underline;
}

.help-contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.help-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.help-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-form-row--full {
  grid-column: 1 / -1;
}

.help-form-row label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.help-form-row input,
.help-form-row select,
.help-form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.help-form-row input:focus,
.help-form-row select:focus,
.help-form-row textarea:focus {
  outline: none;
  border-color: rgba(229, 57, 53, 0.58);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.14);
  background: #fff;
}

.help-form-row textarea {
  resize: vertical;
  min-height: 160px;
}

.help-form-message {
  margin: 0;
  font-size: 0.86rem;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.help-form-message.hidden {
  display: none;
}

.help-contact-submit {
  width: 100%;
  min-height: 46px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .help-contact {
    padding: 18px 16px 16px;
  }

  .help-form-grid {
    grid-template-columns: 1fr;
  }
}

.tracking-panel {
  margin-top: 18px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 18px;
}

.tracking-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tracking-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.tracking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.tracking-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  box-sizing: border-box;
}

.tracking-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.18);
}

.tracking-btn {
  white-space: nowrap;
}

.tracking-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tracking-status-card {
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}

.tracking-status-card h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.tracking-status-card p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #334155;
}

.tracking-link {
  text-decoration: none;
}

.tracking-message {
  margin: 10px 0 0;
  font-size: 0.85rem;
}

.tracking-message--error {
  color: #b91c1c;
}

.tracking-message--ok {
  color: #166534;
}

@media (max-width: 640px) {
  .tracking-row {
    grid-template-columns: 1fr;
  }
}

.footer {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  padding: 22px 20px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 20px;
  font-size: 0.8rem;
}

.footer-logo {
  margin-bottom: 6px;
}

.footer-column h4 {
  margin: 0 0 6px;
  font-size: 0.85rem;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}

.footer-column li {
  margin-bottom: 4px;
}

.footer-column li a {
  color: inherit;
  text-decoration: none;
}

.footer-column li a:hover {
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1120px;
  margin: 10px auto 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-bottom-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex: 1;
  text-align: center;
}

.footer-company {
  white-space: nowrap;
}

.footer-links {
  opacity: 0.8;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(14px);
}

.modal-dialog {
  position: relative;
  max-width: 840px;
  width: calc(100% - 32px);
  background: radial-gradient(circle at top left, #ffffff 0, #e5e7f5 60%);
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.16);
  padding: 18px 18px 18px;
  z-index: 41;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border-radius: var(--radius-full);
  border: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 18px;
  margin-top: 8px;
}

.modal-image-column {
  display: flex;
  align-items: center;
}

.modal-device-img {
  width: 100%;
  height: 280px;
  min-height: 280px;
  border-radius: 22px;
  background: #f3f4f6;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-device-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: inherit;
  padding: 12px;
  box-sizing: border-box;
}

.modal-device-img::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 20px;
  border: 2px solid rgba(0, 0, 0, 0.7);
  background: linear-gradient(145deg, #f9fafb, #e5e7eb);
  box-shadow:
    0 24px 65px rgba(0, 0, 0, 0.85),
    0 0 0 10px rgba(0, 0, 0, 0.85),
    0 0 0 14px rgba(31, 41, 55, 0.85);
}

.modal-device-img:has(img)::before {
  display: none;
}

.modal-info-column {
  font-size: 0.9rem;
}

.modal-breadcrumb {
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-info-column h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.modal-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.modal-price {
  font-size: 1.35rem;
  font-weight: 600;
}

.modal-original-price {
  font-size: 0.85rem;
  color: rgba(163, 177, 198, 0.8);
  text-decoration: line-through;
}

.modal-discount {
  font-size: 0.8rem;
  color: var(--accent-strong);
  background: rgba(229, 57, 53, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.modal-meta p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-refurbishment-blurb {
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.btn-full {
  width: 100%;
  margin-top: 12px;
}

.product-detail-add-row,
.modal-add-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.product-detail-add-row .btn-full,
.modal-add-row .btn-full {
  width: 100%;
  flex: none;
  margin-top: 0;
}

.basket-countdown-inline {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  max-width: 100%;
}

.modal-details {
  margin-top: 14px;
}

.modal-details h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.modal-details ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-details li + li {
  margin-top: 3px;
}

@media (max-width: 960px) {
  .filters-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 768px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 14px max(16px, env(safe-area-inset-left, 0px)) 14px
      max(16px, env(safe-area-inset-right, 0px));
    gap: 12px;
  }

  .logo-image {
    height: 48px;
  }

  .topnav {
    gap: 6px;
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .nav-link-ghost {
    padding: 10px 10px;
  }

  .hero {
    padding: 28px 20px 24px;
    margin-top: 12px;
  }

  .hero-inner h1 {
    font-size: clamp(1.6rem, 5vw + 1rem, 2rem);
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .filters-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card-image {
    height: 180px;
    min-height: 180px;
  }

  .product-card--catalog .product-card-image {
    height: 170px;
    min-height: 170px;
  }

  .section-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .section-header h2 {
    font-size: 1.1rem;
  }

  .tradein-grid,
  .tradein-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .tradein-hero {
    padding: 28px 18px 36px;
  }

  .tradein-hero-highlights {
    flex-direction: column;
    align-items: stretch;
  }

  .tradein-hero-highlights li {
    justify-content: center;
  }

  .tradein-form-grid {
    grid-template-columns: 1fr;
  }

  .tradein-trust-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tradein-month-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tradein-form-actions {
    flex-direction: column;
  }

  .tradein-result-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .tradein-accept-btn--bottom {
    flex: 1 1 180px;
  }

  .tradein-submit-btn {
    width: 100%;
  }

  .tradein-refresh-text-btn {
    width: 100%;
  }

  .shop-segment-btn {
    min-height: 44px;
    padding: 10px 16px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 20px 16px;
    text-align: center;
  }

  .footer-column:first-child {
    order: -1;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 16px max(16px, env(safe-area-inset-left, 0px)) calc(24px + env(safe-area-inset-bottom, 0px))
      max(16px, env(safe-area-inset-right, 0px));
  }

  .footer-bottom-main {
    flex-direction: column;
    gap: 8px;
  }

  .modal-dialog {
    width: calc(100% - 24px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 16px;
  }

  .modal-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .modal-device-img {
    height: 200px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }

}

/* Phones: stack header so logo, nav strip, then search — avoids basket/nav overlap */
@media (max-width: 640px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  .topbar-inner .logo {
    grid-row: 1;
    justify-self: start;
  }

  .topbar-inner .topnav {
    grid-row: 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 0 8px;
    margin: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .topbar-inner .topnav::-webkit-scrollbar {
    display: none;
  }

  .topbar-inner .search-wrapper {
    grid-row: 3;
    width: 100%;
    min-width: 0;
    order: 0;
  }

  .nav-link-primary {
    box-shadow: 0 3px 12px rgba(229, 57, 53, 0.2);
    flex-shrink: 0;
  }

  .tradein-section {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .tradein-card--glass {
    padding: 20px 16px 18px;
  }

  .tradein-result--panel {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 14px 14px;
  }

  .tradein-result-main {
    padding-right: 0;
  }

  .tradein-result-label {
    letter-spacing: 0.06em;
    font-size: 0.68rem;
    line-height: 1.3;
  }

  .tradein-result-actions {
    order: -1;
    align-self: flex-end;
    width: auto;
    margin-bottom: -4px;
  }

  .tradein-icon-btn {
    width: 40px;
    height: 40px;
  }

  .tradein-graph {
    padding: 16px 12px 20px;
    overflow: visible;
  }

  .tradein-month-row {
    gap: 8px;
    margin-top: 10px;
  }

  .tradein-month-btn {
    min-height: 64px;
    padding: 8px 6px;
  }

  .tradein-month-btn-label {
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .tradein-accept-btn--bottom.btn-primary {
    min-height: 48px;
    padding: 11px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 12px;
    box-shadow: 0 3px 14px rgba(22, 101, 52, 0.2);
  }

  .tradein-terms-dialog {
    --tradein-terms-max-h: min(88dvh, 92vh, 800px);
    width: calc(100vw - 20px);
    max-width: 100%;
  }

  .tradein-terms-content {
    padding: 14px 14px 16px;
  }

  .tradein-terms-actions {
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .tradein-terms-close-btn {
    width: auto;
    min-width: 120px;
    max-width: 240px;
    margin: 0 auto;
    display: block;
    padding: 10px 22px;
    min-height: 44px;
    font-size: 0.9rem;
    font-weight: 600;
  }

  /* Extra clearance above iOS/Android browser toolbars (trade-in + all pages) */
  .footer-bottom {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 560px) {
  main {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }

  .search-wrapper input,
  input[type="search"],
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  .search-wrapper {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-filter-panel {
    width: 100%;
    max-width: none;
  }

  .search-suggestion-item {
    width: 200px;
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .topbar-inner {
    padding: 12px max(12px, env(safe-area-inset-left, 0px)) 12px
      max(12px, env(safe-area-inset-right, 0px));
  }

  .logo-image {
    height: 40px;
  }

  .hero {
    padding: 20px 14px 18px;
    border-radius: 16px;
  }

  .hero-inner h1 {
    font-size: 1.3rem;
  }

  .hero-sub {
    font-size: 0.85rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 20px;
    font-size: 0.95rem;
    width: 100%;
  }

  /* Trade-in terms dialog: keep Close a normal pill, not full-bleed */
  .tradein-terms-close-btn.btn-primary {
    width: auto;
    max-width: 240px;
    margin-inline: auto;
    display: block;
    padding: 10px 22px;
    min-height: 44px;
  }

  .tradein-form-actions .btn-secondary.tradein-refresh-text-btn {
    width: auto;
    max-width: none;
  }

  .modal-dialog {
    width: calc(100% - 16px);
    padding: 14px;
    border-radius: 20px;
  }

  .modal-price {
    font-size: 1.2rem;
  }

  .footer-inner {
    padding: 16px max(12px, env(safe-area-inset-left, 0px)) 16px
      max(12px, env(safe-area-inset-right, 0px));
    font-size: 0.85rem;
  }
}

@media (max-width: 430px) {
  .topbar-inner {
    gap: 8px;
  }

  .topnav {
    gap: 4px;
    padding-bottom: 4px;
  }

  .nav-link {
    font-size: 0.74rem;
    padding: 9px 10px;
  }

  .nav-link-primary {
    padding: 9px 12px;
  }

  .search-wrapper input {
    padding: 10px 12px;
  }

  .hero {
    margin-top: 8px;
    padding: 18px 12px 16px;
  }

  .hero-inner h1 {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  .hero-sub {
    font-size: 0.82rem;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-delivery {
    font-size: 0.78rem;
  }

  .home-section-title {
    font-size: 1.2rem;
  }
}

/* Full product detail page (product.html) */
.product-detail-main {
  padding: 24px 20px 48px;
  min-height: 50vh;
}

.product-detail-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.product-detail-back {
  display: inline-block;
  font-size: 0.9rem;
  color: #4b5563;
  text-decoration: none;
  margin-bottom: 20px;
}

.product-detail-back:hover {
  color: #111827;
  text-decoration: underline;
}

.product-detail-missing {
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.product-detail-missing h1 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.product-detail-missing p {
  color: #6b7280;
  margin: 0 0 20px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 28px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.product-detail-gallery {
  outline: none;
}

.product-detail-gallery:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(229, 57, 53, 0.45);
  border-radius: 18px;
}

.product-detail-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.product-detail-image {
  flex: 1;
  border-radius: 16px;
  background: #f3f4f6;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: pan-y;
}

.product-detail-image img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  padding: 16px;
  box-sizing: border-box;
}

.product-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.product-gallery-nav:hover {
  background: #fff;
  border-color: rgba(229, 57, 53, 0.45);
}

.product-gallery-prev {
  left: 8px;
}

.product-gallery-next {
  right: 8px;
}

.product-detail-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
}

@media (max-width: 768px) {
  .product-detail-thumbnails {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .product-gallery-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
  }
}

.product-gallery-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #f3f4f6;
  flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-thumb:hover {
  border-color: rgba(148, 163, 184, 0.6);
}

.product-gallery-thumb.is-active {
  border-color: rgba(229, 57, 53, 0.85);
  box-shadow: 0 0 0 1px rgba(229, 57, 53, 0.2);
}

.product-detail-crumb {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin: 0 0 8px;
}

.product-detail-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  line-height: 1.2;
  color: #111827;
}

.product-detail-subtitle {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.product-detail-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin-bottom: 16px;
}

.product-detail-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
}

.product-detail-was {
  font-size: 1rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.product-detail-save {
  font-size: 0.8rem;
}

.product-detail-meta {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.5;
}

.product-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 28px;
  max-width: 320px;
}

.product-detail-checkout-link {
  text-align: center;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
}

.product-detail-bullets h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: #374151;
}

.product-detail-bullet-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: #4b5563;
  line-height: 1.6;
  font-size: 0.95rem;
}

.product-detail-bullet-list li {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .product-detail-main {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }

  .product-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
  }

  .product-detail-title {
    font-size: 1.4rem;
  }

  .product-detail-actions {
    max-width: none;
  }
}

/* Accessory stock + qty (shop grid + product page) */
.product-card-stock-line {
  margin: 0 0 6px;
}

.product-card-stock {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
}

.product-card-stock--out {
  color: #b91c1c;
}

.product-card--soldout .product-card-image {
  filter: grayscale(0.4);
}

.product-card-qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.product-card-qty-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.product-card-qty-input {
  width: 56px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.product-card--catalog .product-card-qty-row .product-card-add {
  flex: 1 1 120px;
}

.product-detail-qty-wrap {
  margin: 0 0 4px;
}

.product-detail-qty-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.product-detail-qty-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.product-detail-qty-input {
  width: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 1rem;
  box-sizing: border-box;
}

.product-detail-stock-hint {
  font-size: 0.85rem;
  color: #64748b;
}

/* Add-to-basket confirmation (toast) */
.basket-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 10050;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(-16px) scale(0.98);
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.basket-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.basket-toast--out {
  opacity: 0;
  transform: translateX(-50%) translateY(-12px) scale(0.98);
  pointer-events: none;
}

.basket-toast-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.08),
    0 10px 24px -6px rgba(15, 23, 42, 0.15);
}

.basket-toast-check {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.basket-toast-copy {
  min-width: 0;
  flex: 1;
}

.basket-toast-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px;
}

.basket-toast-product {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.basket-toast-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  pointer-events: auto;
}

.basket-toast-link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .basket-toast {
    top: auto;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: max(16px, env(safe-area-inset-left, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    max-width: none;
    transform: translateY(calc(100% + 32px));
  }

  .basket-toast--visible {
    transform: translateY(0);
  }

  .basket-toast--out {
    transform: translateY(calc(100% + 32px));
  }
}

.cart-count-bump {
  animation: basket-badge-pop 0.38s ease;
}

@keyframes basket-badge-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

/* ===================== RESPONSIVE HARDENING PASS ===================== */
body.shop-filter-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 1024px) {
  .topbar-inner {
    gap: 12px;
  }

  .search-wrapper {
    min-width: 0;
  }

  .topnav {
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .shop-header-main,
  .shop-header-actions,
  .shop-sort-wrap {
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .search-suggestions {
    padding: 8px;
  }

  .search-suggestion-item {
    width: min(210px, calc(100vw - 74px));
    min-width: min(210px, calc(100vw - 74px));
  }

  .shop-title-toggle-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .shop-header-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  .shop-segment-track {
    width: 100%;
  }

  .shop-segment-btn {
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .shop-sort-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .shop-sort-select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .shop-filters-toggle {
    width: 100%;
    justify-content: center;
  }

  .shop-filter-panel {
    width: min(420px, 100%);
  }

  .product-detail-actions {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .topnav {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .search-suggestion-item {
    width: min(180px, calc(100vw - 64px));
    min-width: min(180px, calc(100vw - 64px));
  }

  .shop-filter-panel-header,
  .shop-filter-panel-body,
  .shop-filter-panel-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .product-detail-grid {
    padding: 14px;
  }

  .product-detail-main {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }
}

/* Final phone-size polish pass */
@media (max-width: 430px) {
  main {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .topnav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .home-brand-grid {
    gap: 10px;
  }

  .home-brand-tile-info {
    padding: 9px 12px;
  }

  .home-brand-tile-name {
    font-size: 0.86rem;
  }

  .product-card,
  .home-feature-card,
  .home-step {
    border-radius: 14px;
  }

  .tradein-form-actions .btn-primary,
  .tradein-form-actions .btn-secondary {
    width: 100%;
  }

  .footer-company {
    white-space: normal;
  }
}

@media (max-width: 390px) {
  .nav-link {
    font-size: 0.72rem;
    padding: 8px 9px;
  }

  .hero-delivery {
    flex-wrap: wrap;
    gap: 6px;
  }
}

