/* ============================================================
   PAGES.CSS — Page-specific sections & layouts
   ============================================================ */

/* ── SPA: page show / hide ─────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── HOMEPAGE: Hero ───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--announce-h) - var(--header-h) - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(10,10,20,0.88) 0%,
    rgba(10,10,20,0.55) 55%,
    rgba(10,10,20,0.72) 100%
  );
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s12) var(--side-pad);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s8);
  align-items: center;
}
.hero-content { max-width: 600px; }
.hero-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s2);
  display: flex;
  align-items: center;
  gap: var(--s1);
}
.hero-eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(74px, 10.5vw, 132px);
  line-height: 0.9;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: var(--s3);
}
.hero-title-accent { color: var(--accent); }
.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.68);
  line-height: 1.65;
  margin-bottom: var(--s5);
  max-width: 460px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}
.hero-divider {
  color: rgba(255,255,255,0.2);
  font-size: 20px;
  font-weight: 300;
}
.hero-stats {
  display: flex;
  gap: var(--s5);
  margin-top: var(--s8);
  padding-top: var(--s4);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat { display: flex; flex-direction: column; gap: 3px; }
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--white);
  line-height: 1;
}
.hero-stat-label { font-size: 12px; color: rgba(255,255,255,0.5); letter-spacing: 0.05em; }

@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-ymm-wrap { width: 100%; max-width: 500px; }
  .ymm-card { min-width: unset; }
}
@media (max-width: 640px) {
  .hero-title  { font-size: 62px; }
  .hero-stats  { gap: var(--s4); }
  .hero-stat-num { font-size: 30px; }
  .hero-inner  { padding-top: var(--s8); padding-bottom: var(--s8); }
}

/* ── HOMEPAGE: Section headers ────────────────────────────── */
.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s5);
  flex-wrap: wrap;
}
.view-all-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap var(--t-fast);
  white-space: nowrap;
}
.view-all-link:hover { gap: 9px; }
.view-all-link-dark {
  color: rgba(255,255,255,0.6);
}
.view-all-link-dark:hover { color: var(--white); gap: 9px; }

/* ── HOMEPAGE: Categories ─────────────────────────────────── */
.categories-section {
  background: var(--ink);
  padding: var(--s10) 0;
}
.categories-section h2 { color: var(--white); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s2);
}
@media (max-width: 1200px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── HOMEPAGE: Deals / Products ───────────────────────────── */
.deals-section { background: var(--smoke); padding: var(--s10) 0; }
.products-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s3);
}
@media (max-width: 1100px) { .products-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .products-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .products-grid-4 { grid-template-columns: 1fr; } }

/* ── HOMEPAGE: Makes ──────────────────────────────────────── */
.makes-section { background: var(--ink); padding: var(--s10) 0; }
.makes-section h2 { color: var(--white); }
.makes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
}
@media (max-width: 900px) { .makes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .makes-grid { grid-template-columns: 1fr; } }

/* ── HOMEPAGE: Why XL ─────────────────────────────────────── */
.why-section {
  background: var(--white);
  padding: var(--s10) 0;
  position: relative;
  overflow: hidden;
}
.why-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.04;
}
.why-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}
.why-item {
  text-align: center;
  padding: var(--s5) var(--s4);
}
.why-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--accent-pale);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s3);
  transition: background var(--t-base), transform var(--t-base);
}
.why-item:hover .why-icon {
  background: var(--accent);
  color: var(--white);
  transform: scale(1.06);
}
.why-item h4 { font-size: 19px; margin-bottom: var(--s1); }
.why-item p  { font-size: 14px; color: var(--slate); line-height: 1.75; }
@media (max-width: 768px) { .why-grid { grid-template-columns: 1fr; } }

/* ── HOMEPAGE: Newsletter ─────────────────────────────────── */
.newsletter-section {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  padding: var(--s10) 0;
}
.nl-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  filter: grayscale(15%);
}
.nl-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,20,0.94) 0%, rgba(10,10,20,0.80) 100%);
}
.nl-inner {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.nl-inner h2 { color: var(--white); margin-bottom: var(--s2); }
.nl-inner p  { color: rgba(255,255,255,0.6); font-size: 16px; margin-bottom: var(--s4); }
.nl-form {
  display: flex;
  gap: var(--s1);
  max-width: 440px;
  margin: 0 auto;
}
.nl-input {
  flex: 1;
  height: 52px;
  padding: 0 var(--s2);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 14px;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
  backdrop-filter: blur(8px);
}
.nl-input::placeholder { color: rgba(255,255,255,0.35); }
.nl-input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.12);
}
.nl-disclaimer {
  margin-top: var(--s2);
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
@media (max-width: 480px) { .nl-form { flex-direction: column; } }

/* ── CATEGORY PAGE ────────────────────────────────────────── */
.cat-page-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--ink);
}
.cat-page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.32;
}
.cat-page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,10,20,0.92) 0%, rgba(10,10,20,0.55) 100%);
}
.cat-page-hero-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.cat-page-hero-inner h1 { color: var(--white); font-size: 36px; }

/* Listing layout */
.listing-layout {
  display: flex;
  gap: var(--s5);
  align-items: flex-start;
  padding: var(--s5) 0 var(--s10);
}
.listing-main { flex: 1; min-width: 0; }

.listing-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--smoke);
}
.listing-count { font-size: 14px; color: var(--slate); font-weight: 500; }
.listing-sort-wrap { display: flex; align-items: center; gap: var(--s2); }
.sort-label { font-size: 13px; color: var(--silver); }
.sort-select {
  height: 38px;
  padding: 0 28px 0 12px;
  border: 1.5px solid var(--mist);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t-fast);
}
.sort-select:focus { border-color: var(--accent); }

.view-toggle { display: flex; border: 1.5px solid var(--mist); border-radius: var(--r-md); overflow: hidden; }
.view-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  background: none;
  border: none;
}
.view-btn.active { background: var(--accent); color: var(--white); }
.view-btn:hover:not(.active) { background: var(--smoke); color: var(--slate); }

.products-grid-listing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}
@media (max-width: 1100px) { .products-grid-listing { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .products-grid-listing { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .filter-sidebar { display: none; }
  .listing-layout { flex-direction: column; }
}

/* Mobile filter btn */
.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  border: 1.5px solid var(--mist);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  color: var(--ink);
}
@media (max-width: 900px) { .mobile-filter-btn { display: flex; } }

/* ── PRODUCT DETAIL PAGE ──────────────────────────────────── */
.product-page { padding: var(--s6) 0 var(--s10); }
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  align-items: flex-start;
}
@media (max-width: 960px) { .product-layout { grid-template-columns: 1fr; } }

/* Gallery */
.product-gallery {
  position: sticky;
  top: calc(var(--header-h) + var(--nav-h) + var(--s4));
}
.gallery-main {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--smoke);
  aspect-ratio: 4/3;
  margin-bottom: var(--s2);
  cursor: zoom-in;
  position: relative;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-zoom-hint {
  position: absolute;
  bottom: var(--s2);
  right: var(--s2);
  background: rgba(0,0,0,0.5);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s1);
}
.gallery-thumb {
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: border-color var(--t-fast), opacity var(--t-fast);
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb:not(.active):hover { opacity: 0.8; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Product info column */
.product-info { display: flex; flex-direction: column; gap: var(--s3); }
.product-brand-row {
  display: flex;
  align-items: center;
  gap: var(--s1);
  flex-wrap: wrap;
}
.product-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--silver);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.product-title {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}
.product-rating-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}
.rating-link { font-size: 13px; color: var(--accent); font-weight: 600; text-decoration: underline; }
.product-price-block {
  padding: var(--s3) 0;
  border-top: 1px solid var(--smoke);
  border-bottom: 1px solid var(--smoke);
}
.product-price-main {
  font-size: 40px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.product-price-row {
  display: flex;
  align-items: center;
  gap: var(--s1);
  flex-wrap: wrap;
}
.product-was  { font-size: 17px; color: var(--silver); text-decoration: line-through; }
.save-badge   {
  background: var(--success-pale);
  color: #065F46;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.product-avail {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
  margin-top: var(--s2);
}
.avail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.ships-msg  { font-size: 13px; color: var(--slate); font-weight: 400; }

.product-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.product-ctas .btn-row {
  display: flex;
  gap: var(--s1);
}
.product-ctas .btn-row .btn-primary { flex: 1; }

.product-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
  padding: var(--s3);
  background: var(--smoke);
  border-radius: var(--r-lg);
}
.pt-item {
  text-align: center;
  font-size: 12px;
  color: var(--slate);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
.pt-item svg { color: var(--accent); }

/* Product tabs */
.product-tabs-section { padding-top: var(--s6); }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.spec-table tr { border-bottom: 1px solid var(--smoke); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 10px var(--s2); }
.spec-table td:first-child { font-weight: 600; color: var(--slate); width: 40%; }
.spec-table td:last-child  { color: var(--ink); }
.spec-table tr:nth-child(even) td { background: var(--smoke); }

.review-item {
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--smoke);
}
.review-item:last-child { border-bottom: none; }
.review-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s1); flex-wrap: wrap; }
.reviewer    { font-weight: 700; font-size: 15px; }
.review-date { font-size: 12px; color: var(--silver); margin-left: auto; }
.review-title { font-weight: 700; margin-bottom: 4px; }
.review-body  { font-size: 14px; color: var(--slate); line-height: 1.7; }

.related-section { padding: var(--s8) 0; background: var(--smoke); margin-top: var(--s5); }

/* ── CART PAGE ────────────────────────────────────────────── */
.cart-page { padding: var(--s6) 0 var(--s10); }
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--s5);
  align-items: flex-start;
}
@media (max-width: 960px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-items-col { display: flex; flex-direction: column; gap: var(--s2); }
.cart-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--s2);
  border-bottom: 2px solid var(--ink);
  margin-bottom: var(--s1);
}
.cart-items-head h3 { font-size: 20px; }
.cart-item {
  display: flex;
  gap: var(--s3);
  padding: var(--s3);
  background: var(--white);
  border: 1px solid var(--smoke);
  border-radius: var(--r-lg);
  transition: box-shadow var(--t-fast);
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item-img {
  width: 96px;
  height: 76px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--smoke);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name  { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 3px; line-height: 1.3; }
.cart-item-sku   { font-size: 12px; color: var(--silver); margin-bottom: var(--s1); }
.cart-item-avail { font-size: 12px; color: var(--success); font-weight: 600; margin-bottom: var(--s1); }
.cart-item-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.cart-remove {
  font-size: 13px;
  color: var(--silver);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--t-fast);
  font-family: var(--font-body);
}
.cart-remove:hover { color: var(--danger); }
.cart-item-price-col {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.cart-item-price { font-size: 22px; font-weight: 800; color: var(--ink); }
.cart-item-each  { font-size: 12px; color: var(--silver); }

.order-summary {
  position: sticky;
  top: calc(var(--header-h) + var(--nav-h) + var(--s4));
  background: var(--white);
  border: 1px solid var(--smoke);
  border-radius: var(--r-lg);
  padding: var(--s4);
}
.order-summary h3 { font-size: 18px; font-weight: 800; margin-bottom: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--smoke); }
.order-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 10px;
}
.order-line strong { font-weight: 600; color: var(--ink); }
.order-shipping { color: var(--success); font-weight: 700; }
.order-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  border-top: 1.5px solid var(--smoke);
  padding-top: var(--s2);
  margin-top: var(--s2);
  margin-bottom: var(--s3);
  display: flex;
  justify-content: space-between;
}
.order-ctas { display: flex; flex-direction: column; gap: var(--s1); }
.order-cart-trust {
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--smoke);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-trust-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--slate);
}
.cart-trust-line svg { color: var(--success); flex-shrink: 0; }

.promo-row {
  display: flex;
  gap: var(--s1);
  margin: var(--s2) 0;
}
.promo-input {
  flex: 1;
  height: 42px;
  padding: 0 var(--s2);
  border: 1.5px solid var(--mist);
  border-radius: var(--r-md);
  font-size: 13px;
  outline: none;
  transition: border-color var(--t-fast);
}
.promo-input:focus { border-color: var(--accent); }
.promo-input::placeholder { color: var(--silver); }

/* ── SEARCH PAGE ──────────────────────────────────────────── */
.search-page { padding: var(--s5) 0 var(--s10); }
.search-hero {
  background: var(--smoke);
  padding: var(--s5) 0;
  margin-bottom: var(--s5);
}
.search-query-display {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}
.search-query-display span { color: var(--accent); }
.search-result-count { font-size: 15px; color: var(--slate); }
.search-bar-large {
  display: flex;
  align-items: stretch;
  height: 54px;
  background: var(--white);
  border: 2px solid var(--mist);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 680px;
  margin-top: var(--s3);
  transition: border-color var(--t-fast);
}
.search-bar-large:focus-within { border-color: var(--accent); }
.search-bar-large input {
  flex: 1;
  padding: 0 var(--s3);
  font-size: 16px;
  border: none;
  outline: none;
  color: var(--ink);
}
.search-bar-large input::placeholder { color: var(--silver); }
.search-bar-large button {
  width: 56px;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.search-bar-large button:hover { background: var(--accent-dark); }

/* ═══════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════ */

/* ── Hero: tighter on very small phones ──────────────────── */
@media (max-width: 400px) {
  .hero-title { font-size: 48px; }
  .hero-sub { font-size: 15px; margin-bottom: var(--s4); }
  .hero-stats { flex-wrap: wrap; gap: var(--s2) var(--s4); }
  .hero-inner { padding-top: var(--s6); padding-bottom: var(--s6); }
}
@media (max-width: 360px) {
  .hero-title { font-size: 42px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-divider { display: none; }
}

/* ── Section vertical padding: reduced on mobile ─────────── */
@media (max-width: 640px) {
  .categories-section,
  .deals-section,
  .makes-section,
  .why-section,
  .newsletter-section { padding: var(--s7) 0; }
}
@media (max-width: 480px) {
  .categories-section,
  .deals-section,
  .makes-section,
  .why-section,
  .newsletter-section { padding: var(--s5) 0; }
}

/* ── Why grid: better padding on mobile ──────────────────── */
@media (max-width: 768px) {
  .why-item { padding: var(--s4) var(--s2); }
}

/* ── Category page hero ──────────────────────────────────── */
@media (max-width: 640px) {
  .cat-page-hero { height: 150px; }
  .cat-page-hero-inner h1 { font-size: 26px; }
}
@media (max-width: 400px) {
  .cat-page-hero { height: 120px; }
  .cat-page-hero-inner h1 { font-size: 22px; }
}

/* ── Listing controls: simplify on mobile ────────────────── */
@media (max-width: 480px) {
  .sort-label  { display: none; }
  .view-toggle { display: none; }
  .listing-sort-wrap { gap: var(--s1); }
}

/* ── Product gallery: remove sticky on 1-column layout ───── */
@media (max-width: 960px) {
  .product-gallery { position: static; }
}

/* ── Product info: tighter sizes on phones ───────────────── */
@media (max-width: 480px) {
  .product-price-main { font-size: 32px; }
  .product-page { padding: var(--s4) 0 var(--s8); }
}

/* ── Product trust: stack on very small screens ──────────── */
@media (max-width: 380px) {
  .product-trust { grid-template-columns: 1fr; }
  .pt-item { flex-direction: row; justify-content: center; gap: var(--s2); }
}

/* ── Cart: order summary not sticky on mobile ────────────── */
@media (max-width: 960px) {
  .order-summary { position: static; }
}

/* ── Cart items: price wraps below on small phones ────────── */
@media (max-width: 480px) {
  .cart-item { flex-wrap: wrap; }
  .cart-item-img { width: 80px; height: 64px; }
  .cart-item-price-col {
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: var(--s2);
    padding-top: var(--s2);
    margin-top: var(--s1);
    border-top: 1px solid var(--smoke);
    text-align: left;
  }
  .cart-item-price { font-size: 18px; }
}

/* ── Cart page: padding reduction ────────────────────────── */
@media (max-width: 640px) {
  .cart-page { padding: var(--s4) 0 var(--s8); }
}

/* ── Frequently Bought Together grid ─────────────────────── */
.fbt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
}
@media (max-width: 600px) {
  .fbt-grid { grid-template-columns: 1fr; }
}

/* ── Search page ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .search-query-display { font-size: 22px; }
  .search-result-count  { font-size: 13px; }
  .search-bar-large     { max-width: 100%; height: 48px; }
  .search-page { padding: var(--s4) 0 var(--s8); }
}
