/* ═══════════════════════════════════════════════════════
   RESPONSIVE DESIGN — GLOBAL OVERRIDES
   Viewport targets: 320px · 375px · 480px · 568px · 768px · 1024px · 1440px · 1920px
   ═══════════════════════════════════════════════════════ */

/* ─── Overflow Protection ─── */
html, body {
  overflow-x: hidden;
}

/* ─── Desktop Wide (>1440px) ─── */
@media (min-width: 1441px) {
  .container {
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
  }
}

/* ─── Tablet (≤1024px) ─── */
@media (max-width: 1024px) {
  :root {
    --spacing-xxl: 40px;
    --spacing-huge: 56px;
  }

  .desktop-nav {
    display: none;
  }

  /* Asymmetric grids collapse */
  .grid-asymmetric-desktop {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Mobile (≤768px) ─── */
@media (max-width: 768px) {
  :root {
    --spacing-xxl: 32px;
    --spacing-huge: 48px;
  }

  .main-header {
    height: var(--header-height-mobile);
  }

  .header-store-name {
    font-size: 1rem;
    letter-spacing: 0.06em;
  }

  .page-title {
    font-size: 2rem;
  }

  /* Asymmetric grids go single column */
  .grid-asymmetric-desktop {
    grid-template-columns: 1fr;
  }

  /* Toast container: full-width at bottom on mobile */
  .toast-container {
    left: var(--spacing-md);
    right: var(--spacing-md);
    max-width: none;
  }
}

/* ─── Small Mobile (≤480px) ─── */
@media (max-width: 480px) {
  :root {
    --spacing-xl: 24px;
    --spacing-xxl: 28px;
    --spacing-huge: 40px;
  }

  .container {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  /* Announcements should be readable */
  .announcement-bar {
    font-size: 0.7rem;
  }
}

/* ─── Very Small Mobile (≤375px) ─── */
@media (max-width: 375px) {
  :root {
    --spacing-xl: 20px;
    --spacing-xxl: 24px;
  }

  .container {
    padding-left: var(--spacing-xs);
    padding-right: var(--spacing-xs);
  }

  .btn {
    font-size: 0.75rem;
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

/* ─── Minimum Viewport (≤320px) ─── */
@media (max-width: 320px) {
  :root {
    --spacing-xl: 16px;
    --spacing-xxl: 20px;
    --spacing-huge: 32px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .btn {
    font-size: 0.7rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    letter-spacing: 0.05em;
  }
}

/* ═══════════════════════════════════════════════════════
   REDUCED MOTION PREFERENCES
   ═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
