/* ==========================================================================
   Anton Traders — responsive.css
   Tested at 320 / 375 / 414 / 768 / 1024 / 1280 / 1440 / 1920px
   Order: large -> small (max-width queries cascade downwards)
   ========================================================================== */

/* ---- 1440px and up: keep the shell centred, let type breathe -------------- */
@media (min-width: 1600px) {
  :root { --container: 1320px; }
  .hero__inner { padding-block: 80px 116px; }
}

/* ---- Laptop (<= 1200px) -------------------------------------------------- */
@media (max-width: 1200px) {
  :root { --header-h: 70px; }
  .nav__list { gap: 14px; }
  .nav__link { font-size: 0.8125rem; }
  .site-footer__grid { grid-template-columns: 1.2fr 1fr 0.8fr 1fr; }
}

/* ---- Small laptop / large tablet (<= 1080px) ----------------------------- */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid--row2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid .product-card + .product-card::before { display: none; }
  .why__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--sp-6); }
  .process__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--sp-6); }
  .process__grid::before { display: none; }
  .catalogue, .post-grid, .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Tablet (<= 1024px): nav collapses to drawer ------------------------- */
@media (max-width: 1024px) {
  .hamburger { display: block; }

  .nav {
    position: fixed; top: 0; right: 0; z-index: 58;
    width: min(340px, 86vw); height: 100vh; height: 100dvh;
    flex-direction: column; align-items: stretch;
    gap: 0;
    padding: 84px var(--sp-5) var(--sp-6);
    background: #fff;
    box-shadow: -12px 0 40px rgba(7, 27, 46, .18);
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav.is-open { transform: translateX(0); }

  .nav__phone {
    padding-bottom: var(--sp-4);
    margin-bottom: var(--sp-2);
    border-bottom: 1px solid var(--line-soft);
    font-size: 1rem;
  }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list > li { border-bottom: 1px solid var(--line-soft); }
  .nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 15px 2px;
    font-size: 0.9375rem;
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { color: var(--teal-dark); }

  .dropdown {
    position: static; min-width: 0; width: 100%;
    padding: 0 0 var(--sp-3) var(--sp-3);
    border: 0; border-radius: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
    display: none;
  }
  .nav__item.is-open > .dropdown { display: block; }
  .dropdown a { padding: 9px 8px; }

  .nav__cta { margin-top: var(--sp-5); flex-direction: column; align-items: stretch; }
  .nav__cta .btn { width: 100%; }

  .hero__inner { grid-template-columns: 1fr; padding-block: 32px 64px; }
  .hero__media { order: -1; }
  .hero__text { max-width: none; }

  .quote-band__grid { grid-template-columns: 1fr; }
  .info-band__grid { grid-template-columns: 1fr; gap: var(--sp-7); }
  .info-band__col { padding: 0; border-right: 0; }
  .info-band__col + .info-band__col { padding-top: var(--sp-6); border-top: 1px solid var(--line); }
  .brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .split { grid-template-columns: 1fr; }
  .split--media-first .split__media, .split__media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Small tablet (<= 860px) --------------------------------------------- */
@media (max-width: 860px) {
  .topbar__inner { justify-content: center; gap: var(--sp-4); }
  .hero__strip-item { flex-basis: 50%; }
  .hero__strip-item:nth-child(2) { border-right: 0; }
  .hero__strip-item:nth-child(3) { border-top: 1px solid var(--line-soft); flex-basis: 100%; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
}

/* ---- Mobile (<= 768px) --------------------------------------------------- */
@media (max-width: 768px) {
  :root { --header-h: 64px; --section-y: 44px; }

  .product-grid, .product-grid--row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogue, .post-grid, .gallery-grid { grid-template-columns: 1fr; }
  .quote-form { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__bottom { justify-content: center; text-align: center; }

  .section-head { text-align: left; }
  .cols-3, .cols-4, .cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-frame iframe { height: 260px; }
}

/* ---- Phones (<= 560px) --------------------------------------------------- */
@media (max-width: 560px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__strip { margin-top: -28px; }
  .hero__strip-item { flex-basis: 100%; border-right: 0; border-top: 1px solid var(--line-soft); }
  .hero__strip-item:first-child { border-top: 0; }

  .why__grid, .process__grid { grid-template-columns: 1fr; row-gap: var(--sp-5); }
  .why__item, .process__step { flex-direction: row; text-align: left; display: flex; gap: var(--sp-4); align-items: flex-start; }
  .why__item > div, .process__step > div { flex: 1; }
  .process__icon { margin: 0; flex: none; }
  .icon-circle { flex: none; }

  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { justify-content: flex-start; }
  .cols-3, .cols-4, .cols-5, .cols-2 { grid-template-columns: 1fr; }
  .review-card { padding: var(--sp-4); }
  .to-top { right: 12px; bottom: 12px; }
}

/* ---- Narrow phones (<= 380px, covers 375 and 320) ----------------------- */
@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .product-grid, .product-grid--row2 { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: 1fr; }
  .btn { padding: 12px 18px; }
  .topbar__inner { flex-direction: column; gap: 4px; padding-block: 8px; min-height: 0; }
  .brand img { width: 118px; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .badge-row .badge { flex: 1 1 100%; }
}

/* ---- Landscape phones: shorter vertical rhythm --------------------------- */
@media (max-height: 460px) and (orientation: landscape) {
  /* .nav { padding-top: 64px; } */
  .hero__inner { padding-block: 24px 48px; }
}
