/* =====================================================================
   responsive.css — breakpoints & accessibility theme overrides
   Mobile-first base lives in style.css; this scales up & themes.
   ===================================================================== */

/* Small phones */
@media (max-width: 360px) {
  :root { --header-h: 58px; }
  .hero-title { font-size: 30px; }
  .product-grid { gap: 10px; }
  .cat-thumb { width: 62px; height: 62px; }
  .cat { width: 70px; }
}

/* Larger phones / small tablets: roomier grid inside shell */
@media (min-width: 440px) {
  .product-grid { gap: 16px; }
  .pc-name { font-size: 15px; }
}

/* Tablets: use the available canvas instead of framing the site as a phone. */
@media (min-width: 600px) {
  :root {
    --shell-max: 100%;
    --bottomnav-h: 72px;
  }
  body {
    background: var(--bg);
    padding: 0;
  }
  .app-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .site-header {
    border-radius: 0;
    padding-inline: max(24px, calc((100vw - 1180px) / 2));
  }
  .hero {
    min-height: 420px;
    padding: 42px max(34px, calc((100vw - 1180px) / 2)) 46px;
  }
  .hero-title {
    font-size: 52px;
  }
  .hero-sub {
    max-width: 44ch;
    font-size: 17px;
  }
  .search-wrap,
  .cats-wrap,
  .flourish,
  .section {
    width: min(calc(100% - 48px), 1180px);
    margin-inline: auto;
  }
  .search-wrap {
    margin-top: -26px;
  }
  .section {
    padding-inline: 0;
    padding-top: 28px;
  }
  .cats {
    gap: 18px;
    padding-inline: 46px;
    padding-inline-start: 90px;
  }
  .cat {
    width: 96px;
  }
  .cat-thumb {
    width: 88px;
    height: 88px;
  }
  .cat-name {
    font-size: 13.5px;
  }
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .product-card {
    border-radius: 12px;
  }
  .offer-banner {
    padding: 22px 24px;
  }
  .bottom-nav {
    max-width: 760px;
    width: min(calc(100% - 32px), 760px);
    bottom: 10px;
    border: 1px solid rgba(202,166,91,0.3);
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(39,25,19,.28);
  }
  .floating-cart {
    max-width: 620px;
    bottom: calc(var(--bottomnav-h) + 22px);
  }

  .fab-stack {
    inset-inline-end: auto;
    inset-inline-start: 12px;
  }

  .drawer.bottom-sheet {
    max-width: 760px;
  }
}

/* iPad landscape and laptops. */
@media (min-width: 900px) {
  .search-wrap,
  .cats-wrap,
  .flourish,
  .section {
    width: min(calc(100% - 150px), 1180px);
  }

  .hero {
    min-height: 430px;
  }
  .hero-title {
    font-size: 58px;
  }
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
  .product-rail .product-card {
    flex-basis: 24%;
    max-width: 280px;
  }
  .pc-body {
    padding: 15px 16px 17px;
  }
  .pc-name {
    font-size: 16px;
  }
  .section-title {
    font-size: 24px;
  }
  .bottom-nav {
    left: auto;
    right: 18px;
    bottom: 50%;
    width: 76px;
    height: auto;
    max-width: none;
    padding: 8px 6px;
    transform: translateY(50%);
    flex-direction: column;
    gap: 4px;
  }
  html[dir="rtl"] .bottom-nav {
    right: auto;
    left: 18px;
  }
  .nav-item {
    width: 100%;
    min-height: 58px;
    flex: 0 0 auto;
    justify-content: center;
  }
  .nav-item.center {
    margin-top: 0;
    order: -1;
  }
  .nav-item.center .nav-ico {
    width: 46px;
    height: 46px;
    margin: 0;
  }
  .nav-item .nav-badge {
    inset-inline-end: 6px;
  }
  .floating-cart {
    bottom: 20px;
  }

  .fab-stack {
    inset-inline-end: auto;
    inset-inline-start: 18px;
    bottom: 24px;
  }
}

/* Large desktop displays. */
@media (min-width: 1200px) {
  .search-wrap,
  .cats-wrap,
  .flourish,
  .section {
    width: min(calc(100% - 200px), 1240px);
  }
  .site-header,
  .hero {
    padding-inline: max(48px, calc((100vw - 1360px) / 2));
  }
  .hero {
    min-height: 460px;
  }
  .hero-title {
    font-size: 64px;
  }
  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (min-width: 1600px) {
  .search-wrap,
  .cats-wrap,
  .flourish,
  .section {
    width: min(calc(100% - 220px), 1360px);
  }
  .site-header,
  .hero {
    padding-inline: max(60px, calc((100vw - 1480px) / 2));
  }
}

/* ---------- Accessibility: High Contrast ---------- */
html.a11y-contrast {
  --bg: #fffdf8;
  --card: #ffffff;
  --ink: #120a04;
  --brown-700: #1d1209;
  --brown-800: #160d05;
  --muted: #4a3a26;
  --gold-dark: #6e4e0c;
  --line: rgba(0,0,0,0.45);
}
html.a11y-contrast .product-card,
html.a11y-contrast .search-bar,
html.a11y-contrast .field input,
html.a11y-contrast .field textarea { border-width: 2px; }
html.a11y-contrast .pc-name,
html.a11y-contrast .section-title { color: #120a04; }
html.a11y-contrast .btn-gold { background: #6e4e0c; color: #fff; }

/* When fonts are scaled very large, let cards stack to keep readable */
html.a11y-bigfont .product-grid { grid-template-columns: 1fr; }
html.a11y-bigfont .pc-name { min-height: auto; }
