/* ============================================================
   EXUDE — responsive.css
   Mobile / tablet refinements. Loaded LAST on every page so it
   can override page styles. Breakpoints:
     ≤ 1024px tablet · ≤ 768px large phone · ≤ 480px phone
   ============================================================ */

/* ---------- Global: never allow sideways scrolling ---------- */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

img,
video,
svg,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

/* Images that fill a fixed-ratio frame keep their own sizing */
.hero__media img,
.story__media img,
[class*="__media"] img,
[class*="__img"] img,
[class*="__image"] img,
.product-card img,
.pcard img {
  height: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

/* 16px inputs stop iOS Safari zooming the page on focus */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* Footer newsletter heading was inheriting dark text on the dark footer */
.footer__newsletter h6 {
  color: var(--gold);
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .container {
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
  }
}

/* ---------- Phones ---------- */
@media (max-width: 768px) {
  /* Slide-in animations: vertical only, so nothing starts off-screen sideways */
  .reveal-left,
  .reveal-right {
    transform: translateY(40px);
  }

  .reveal-left.visible,
  .reveal-right.visible {
    transform: translate(0, 0);
  }

  /* Touch-friendly tap targets */
  .btn,
  .nav-icon,
  .nav-toggle,
  .mobile-menu__link {
    min-height: 44px;
  }

  .nav-icon,
  .nav-toggle {
    min-width: 44px;
  }

  /* Header */
  .navbar__inner {
    gap: 0.5rem;
  }

  .navbar__actions {
    gap: 0.15rem;
  }

  /* Announcement bar */
  .top-banner__item {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  /* Hero */
  .hero__title {
    font-size: clamp(3.2rem, 17vw, 5.5rem);
    letter-spacing: 0.08em;
  }

  .hero__title span {
    letter-spacing: normal;
  }

  .hero__sub {
    font-size: 0.95rem;
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

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

  .hero__meta-item {
    padding: 0.9rem 0.4rem;
  }

  .hero__meta-item strong {
    font-size: clamp(0.85rem, 3.8vw, 1.05rem);
    line-height: 1.25;
  }

  .hero__meta-item span {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .hero__scroll {
    display: none;
  }

  /* Section headings */
  .section-title {
    font-size: clamp(1.7rem, 7.5vw, 2.4rem);
    line-height: 1.2;
  }

  /* Stacked two-column blocks should not overflow their track */
  .story,
  .origin {
    gap: 2rem;
  }

  .story > *,
  .origin > * {
    min-width: 0;
  }

  /* About: decorative offset image must stay inside the screen */
  .origin__media-offset {
    right: 0;
    bottom: -6%;
  }

  /* Floating cart bar + back-to-top */
  .cart-bar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .to-top {
    right: 0.75rem;
  }

  /* Footer */
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.25rem;
  }

  .footer__brand,
  .footer__newsletter {
    grid-column: 1 / -1;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
  }

  /* Product tabs: one swipeable row instead of wrapping onto two lines */
  .pdp-tabs__list {
    flex-wrap: nowrap;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .pdp-tabs__list::-webkit-scrollbar {
    display: none;
  }

  .pdp-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Tables and wide content scroll inside themselves */
  table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .hero__meta-item span {
    display: block;
  }

  .toast,
  .toast-container {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-width: none;
  }
}

/* ---------- Short landscape phones ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: 0;
    padding-top: 5rem;
    padding-bottom: 6rem;
  }

  .hero__scroll {
    display: none;
  }
}
