/* ==========================================================================
   RESPONSIVE.CSS  —  5-breakpoint system

   xl   → 1280px  large laptop / small desktop
   lg   → 1024px  tablet landscape + layout collapses
   md   →  768px  tablet portrait + mobile nav
   sm   →  640px  large phone + stacking
   xs   →  480px  small phone
   ========================================================================== */


/* ── XL: 1280px ─────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {

  /* Typography: tighten scale slightly */
  :root {
    --h1: clamp(2.4rem, 4.8vw + 0.5rem, 4.8rem);
    --h2: clamp(1.75rem, 3.2vw + 0.4rem, 3.4rem);
  }

  /* Footer: compress brand column */
  .site-footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }

  /* Grid--4 collapses to 3 on large layout shrink */
  .grid--4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Gallery: 3 columns */
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}


/* ── LG: 1024px ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {

  /* Section padding reduces */
  .section {
    --section-py: 4.5rem;
  }

  /* Hero layout: stack vertically */
  .hero {
    padding: 5.5rem 0 4rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin-inline: auto;
    text-align: center;
  }

  .hero__content {
    align-items: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__visual {
    display: none; /* standalone hero card handled by storefront.css hero-showcase */
  }

  /* Main content layouts: collapse */
  .split-layout,
  .product-layout,
  .highlight-banner {
    grid-template-columns: 1fr;
  }

  /* Catalog: sidebar becomes narrower */
  .catalog-layout {
    grid-template-columns: 240px 1fr;
  }

  /* Contact: stack at this point */
  .contact-layout {
    grid-template-columns: 1fr;
  }

  /* Grid--4 → 2 columns */
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Footer: 2-column layout */
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
  }

  /* Product sticky image: disable sticky on tablet */
  .aside-filter {
    position: static;
  }

  /* Highlight banner: no horizontal padding needed */
  .highlight-banner {
    padding: 1.75rem;
  }

}


/* ── MD: 768px ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ---- Mobile nav ---- */
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 5.25rem;
    right: 1rem;
    left: 1rem;
    z-index: 29;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.875rem;
    border-radius: 24px;
    background: rgba(255, 250, 242, 0.98);
    border: 1px solid rgba(196, 122, 32, 0.14);
    box-shadow: 0 16px 48px rgba(80, 45, 8, 0.16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .site-nav__list,
  .site-nav__actions {
    width: 100%;
    display: grid;
    gap: 0.45rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__link {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-size: 1rem;
  }

  .site-nav__cta {
    margin-left: 0;
    margin-top: 0.2rem;
    text-align: center;
  }

  /* ---- Sections ---- */
  .section {
    --section-py: 4rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-header--center {
    margin-bottom: 2rem;
  }

  /* ---- Grids ---- */
  .grid--3,
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* ---- Catalog: sidebar on top ---- */
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .aside-filter {
    position: static;
  }

  /* ---- Gallery: 2 columns ---- */
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* ---- Forms ---- */
  .form-grid {
    grid-template-columns: 1fr;
  }

  /* ---- Page-level ---- */
  .page-hero {
    padding-top: 3.5rem;
    padding-bottom: 2rem;
  }

  /* ---- Footer: 2 columns ---- */
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    margin-top: 3.5rem;
  }

  /* Section-header split: stack on mobile */
  .section-header--split {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

}


/* ── SM: 640px ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {

  /* ---- Container: tighten horizontal padding ---- */
  .container {
    width: min(calc(100% - 1.25rem), var(--container, 1200px));
  }

  /* ---- Sections ---- */
  .section {
    --section-py: 3.25rem;
  }

  /* ---- Hero ---- */
  .hero {
    padding: 4.5rem 0 3rem;
  }

  /* ---- All grids → single column ---- */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  /* Gallery stays 2 columns even on small phones (not xs) */
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  /* ---- Buttons: full width in button rows ---- */
  .button-row .button,
  .hero__actions .button {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  /* ---- Footer: single column ---- */
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  /* ---- Form panels: reduce padding ---- */
  .form-panel,
  .product-copy {
    padding: 1.4rem;
  }

  /* ---- Highlight banner: compact ---- */
  .highlight-banner {
    padding: 1.4rem;
  }

  /* ---- Lightbox & modal: full-width ---- */
  .lightbox__panel,
  .modal__dialog {
    padding: 1.25rem;
    border-radius: 20px;
  }

  /* ---- Product layout: ensure proper stack ---- */
  .product-layout {
    grid-template-columns: 1fr;
  }

  /* ---- Split layout ---- */
  .split-layout {
    grid-template-columns: 1fr;
  }

}


/* ── XS: 480px ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {

  /* ---- Sections: further reduction ---- */
  .section {
    --section-py: 2.75rem;
  }

  /* ---- Hero: tightest ---- */
  .hero {
    padding: 4rem 0 2.75rem;
  }

  /* ---- Buttons always full-width at smallest sizes ---- */
  .button {
    width: 100%;
    justify-content: center;
  }

  /* Except icon-only or explicitly NOT full-width */
  .button--icon,
  .button--small:not(.button--full) {
    width: auto;
  }

  /* ---- Gallery: single column ---- */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* ---- Nav menu slightly adjusted ---- */
  .site-nav {
    top: 5rem;
  }

  /* ---- Floating WA: hide text label, show icon only ---- */
  .floating-contact .floating-contact__label {
    display: none;
  }

  .floating-contact {
    padding: 1rem;
    border-radius: var(--r-pill, 999px);
    width: 3.25rem;
    height: 3.25rem;
    justify-content: center;
  }

  /* ---- Section header: tighter bottom margin ---- */
  .section-header {
    margin-bottom: 1.5rem;
  }

  .section-header--center {
    margin-bottom: 1.5rem;
  }

  /* ---- Form fields: reduce font on very small ---- */
  .form-stack input,
  .form-stack textarea,
  .form-stack select {
    font-size: 0.97rem;
    padding: 0.8rem 0.9rem;
  }

  /* ---- Footer: tighten ---- */
  .site-footer {
    padding-top: 3rem;
    margin-top: 2.5rem;
  }

  /* ---- Card body: less padding ---- */
  .card-body {
    padding: 1rem 1.1rem;
  }

}
