/* ============================================
   PLAIN STANDARD — Responsive Overrides
   Page-specific mobile breakpoints
   ============================================ */

/* ── About Page ── */
@media (max-width: 900px) {
  /* Stats row */
  .about-stat-row { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 640px) {
  /* Stats */
  .about-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .about-stat:last-child { border-bottom: none; }

  /* Persona grid */
  .persona-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Value cards */
  .value-grid { grid-template-columns: 1fr !important; }

  /* Two-col sections go single col */
  .two-col { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Family CTA grid in boys */
  .family-cta-grid { grid-template-columns: 1fr !important; }

  /* Wardrobe hero stats */
  .wardrobe-stats { flex-direction: column !important; gap: 24px !important; }
  .wardrobe-stats-divider { display: none !important; }

  /* Bundle card images */
  .bundle-images { height: 180px !important; }

  /* Builder layout */
  .builder-layout { grid-template-columns: 1fr !important; gap: 32px; }

  /* BNPL strip */
  .bnpl-strip { grid-template-columns: 1fr !important; }

  /* Discount ladder */
  .discount-ladder { flex-direction: row; }

  /* Footer bottom */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-payments { flex-wrap: wrap; }
}

/* ── Global tablet ── */
@media (max-width: 768px) {
  /* Section padding */
  .section { padding: 56px 0 !important; }
  .section-lg { padding: 64px 0 !important; }

  /* Hero */
  .hero-content { padding: 48px 0 !important; }

  /* Brand story */
  .brand-story { grid-template-columns: 1fr !important; }
  .brand-story-content { padding: 40px 24px !important; }
  .brand-story-image { min-height: 280px; }

  /* Look builder */
  .look-builder { grid-template-columns: 1fr !important; }
  .look-panel { padding: 32px 0 0 !important; }

  /* Product detail */
  .product-detail { grid-template-columns: 1fr !important; }
  .product-info { padding: 28px 0 !important; position: static !important; }

  /* Bundle grid */
  .bundle-grid { grid-template-columns: 1fr !important; }

  /* Category split */
  .category-split { grid-template-columns: 1fr !important; }
  .category-panel { min-height: 320px !important; }

  /* Newsletter */
  .newsletter-form { flex-direction: column; border-radius: 4px; }
  .newsletter-form input { border-right: 1px solid rgba(255,255,255,0.2); border-bottom: none; border-radius: 4px 4px 0 0 !important; }
  .newsletter-form .btn { border-radius: 0 0 4px 4px !important; }

  /* Trust bar */
  .trust-bar-inner { flex-direction: column; align-items: center; gap: 16px !important; }

  /* Nav links hidden handled in main CSS */
}

/* ── Announcement bar ── */
@media (max-width: 480px) {
  .announcement-bar { font-size: 11px; padding: 8px 16px; }
  .announcement-bar br { display: none; }
}

/* ── Cart drawer ── */
@media (max-width: 480px) {
  .cart-drawer { width: 100vw; }
  .cart-item { grid-template-columns: 70px 1fr auto; gap: 12px; }
}

/* ── Product grid responsive ── */
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .product-card-name { font-size: 12px; }
  .product-card-price { font-size: 13px; }
  .product-card-colors { gap: 4px; }
  .color-dot { width: 12px; height: 12px; }
}

/* ── Scroll row ── */
@media (max-width: 480px) {
  .scroll-row .product-card { flex: 0 0 200px !important; }
}

/* ── About page specific inline grids ── */
@media (max-width: 900px) {
  /* 4-col stats → 2-col */
  div[style*="grid-template-columns: repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* 6-col personas → 3-col */
  div[style*="grid-template-columns: repeat(6,1fr)"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  /* 3-col values → 2-col */
  div[style*="grid-template-columns: repeat(3,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  /* All multi-col inline grids → 1 or 2 col */
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  div[style*="grid-template-columns: repeat(6,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  div[style*="grid-template-columns: repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  div[style*="grid-template-columns: repeat(5,1fr)"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  /* Builder items */
  div[style*="grid-template-columns: 1fr 480px"],
  div[style*="grid-template-columns: 1fr 380px"],
  div[style*="grid-template-columns: 2fr 1fr"],
  div[style*="grid-template-columns: 1fr 420px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Focus / Accessibility ── */
:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 2px;
}

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Print ── */
@media print {
  .site-header, .announcement-bar, .cart-drawer, .cart-overlay,
  .mobile-nav, .newsletter, .site-footer { display: none !important; }
  .product-card-actions, .wishlist-btn { display: none !important; }
}

/* ── Smooth image loading ── */
img {
  background: var(--cream);
}

/* ── Active nav states ── */
.nav-links a.active::after { width: 100%; }

/* ── Wardrobe builder item hover fix ── */
.builder-item.selected {
  box-shadow: inset 0 0 0 2px var(--black);
}

/* ── Filter buttons active state fix ── */
.filter-btn.active {
  background: var(--black) !important;
  color: var(--white) !important;
  border-color: var(--black) !important;
}

/* ── Product card image transitions ── */
.product-card-media > div {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease;
}

/* ── Sticky product info max height ── */
@media (min-width: 1025px) {
  .product-info {
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .product-info::-webkit-scrollbar { display: none; }
}

/* ── Wardrobe tab panel transitions ── */
.wardrobe-panel {
  animation: fadeIn 0.3s ease;
}

/* ── Bundle card hover lift ── */
.bundle-card:hover {
  transform: translateY(-2px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* ── Look item check state ── */
.look-item.selected {
  position: relative;
}
.look-item.selected::before {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  background: var(--black);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

/* ── Scroll snap for product rows ── */
.scroll-row {
  scroll-padding-left: 24px;
}

/* ── Sale badge ── */
.product-card-badge.badge-save {
  background: #C24A2E;
}

/* ── Size button hover fix ── */
.size-btn:not(.soldout):hover {
  background: var(--cream);
}
.size-btn.active:hover {
  background: var(--dark) !important;
}
