/* ============================================================================
   THE ORIGINAL FIT — responsive.css
   Desktop-first, breaking down to tablet & mobile. No horizontal overflow.
   ============================================================================ */

/* keep pages inside the viewport */
html, body { overflow-x: clip; }

/* ------------------------------------------------------------ <= 1180px ---- */
@media (max-width: 1180px) {
  .header-in { gap: 1.6rem; }
  .main-nav { gap: 1.3rem; }
}

/* ------------------------------------------------------------ <= 1020px ---- */
@media (max-width: 1020px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 1.6rem; }
}

/* ------------------------------------------------------------ <= 940px ----- */
@media (max-width: 940px) {
  :root { --nav-h: 62px; }

  .header-in {
    grid-template-columns: 44px 1fr auto;
    gap: .8rem;
  }
  .main-nav { display: none; }
  .hamburger { display: grid; }

  /* hero keeps the artwork's natural height on tablets */

  .pdp-grid { grid-template-columns: minmax(0, 1fr); }
  .pdp-sticky { position: static; }

  /* drawer clears the home-indicator / notch safe area so its bottom
     buttons are never flush with the system edge */
  .mobile-menu { padding-bottom: calc(2.4rem + env(safe-area-inset-bottom, 0px)); }

  .cart-page-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; }

  .account-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 2.4rem;
  }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------ <= 640px ----- */
@media (max-width: 640px) {
  :root {
    --wrap: 100%;
  }
  .container { width: min(var(--wrap), 100% - 2rem); }

  .announcement-in { justify-content: center; }
  .announcement-links { display: none; }

  /* hero stays an image-only banner sized by the artwork itself */
  .hero-dot { height: 20px; }
  .hero-dot.is-active { height: 32px; }

  /* brand fallback slide sizes down with the phone */
  .hero-logo-mark { width: clamp(112px, 34vw, 150px); }

  /* tighter vertical rhythm on phones */
  .section { padding: clamp(44px, 11vw, 64px) 0; }

  /* comfort: real touch targets for the controls thumbs actually hit
     (Apple HIG / Material minimum ~44-48px) */
  .btn { min-height: 46px; }
  .chip { height: 44px; min-width: 44px; padding: 0 .8em; font-size: .74rem; }
  .icon-btn { width: 44px; height: 44px; }

  /* long words can never push a phone layout sideways */
  body { overflow-wrap: break-word; }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; row-gap: 30px; }
  .product-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .p-info { gap: .35rem; }
  .p-name { font-size: .82rem; }
  .p-price { font-size: .84rem; }
  .p-add { min-height: 38px; padding: .8em 1.2em; font-size: .6rem; }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .value-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; row-gap: 2.1rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .form-row { grid-template-columns: 1fr; }

  .shop-toolbar { flex-direction: column; align-items: stretch; }
  .shop-controls { justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
  .shop-controls .sort-select { width: 100%; min-width: 0; }
  .result-count { display: none; }

  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-list .cart-item img { width: 64px; }
  .ci-side { grid-column: 2; flex-direction: row; align-items: center; padding-top: .2rem; }
  /* quantity steppers get full touch targets on a phone */
  .ci-qty button { width: 44px; height: 44px; font-size: 1.02rem; }

  .pdp-buy { flex-direction: column; }
  .pdp-wish { width: 100%; padding: 12px 0; }
  .pdp-qty { width: max-content; align-self: stretch; justify-content: space-between; }
  .pdp-qty span { flex: 1; }
  .pdp-buy .btn { width: 100%; }

  .banner-cta { padding: 2rem 1.4rem; }
}

/* ------------------------------------------------------------ <= 420px ----- */
@media (max-width: 420px) {
  :root { --nav-h: 58px; }

  .logo { font-size: .88rem; letter-spacing: 0; }
  .icon-btn { width: 44px; height: 44px; }

  .mm-link { font-size: 1.28rem; }

  .news-form { flex-direction: column; padding: .45rem; border-radius: var(--radius-md); }
  .news-form input { text-align: center; }
  .news-form .btn { width: 100%; }

  .cd-actions { grid-template-columns: 1fr; }
  .auth-card { border: 0; padding: 1.2rem 0; background: transparent; }
}

/* very short landscape phones: the artwork's own height governs the hero
   (no viewport-height floor — that would reintroduce letterboxing) */

/* ====================================== hero carousel responsive ============ */

/* tablets: keep arrows near edges, dots readable */
@media (max-width: 1020px) {
  .hero-arrow { width: 48px; height: 48px; font-size: 1.1rem; }
  .hero-dot { width: 9px; height: 9px; }
  .hero-dots-wrap { bottom: clamp(1.6rem, 4vw, 2.6rem); }
}

/* mobile: larger touch targets, arrows inset safely, dots low enough */
@media (max-width: 640px) {
  .hero-arrow {
    width: 46px;
    height: 46px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
  }
  .hero-arrow-prev { left: 0.5rem; }
  .hero-arrow-next { right: 0.5rem; }
  .hero-dots-wrap { bottom: clamp(1.4rem, 6vw, 2.2rem); gap: 0.5rem; }
  .hero-dot { width: 8px; height: 8px; border-width: 1.5px; }
}
