/* ==========================================================================
   RITZ THE LABEL — Responsive Overrides
   Breakpoints follow Bootstrap 5: sm 576 / md 768 / lg 992 / xl 1200 / xxl 1400
   ========================================================================== */

/* --------------------------------------------------------------------------
   Mobile Navigation (Off-canvas) — visible < 992px
   -------------------------------------------------------------------------- */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  z-index: 1300;
}

.mobile-nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: var(--color-ivory);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1301;
  overflow-y: auto;
  padding: var(--space-md);
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-grey-300);
}

.mobile-nav-head img {
  height: 26px;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
}

.mobile-nav-list > li {
  border-bottom: 1px solid var(--color-grey-100);
}

.mobile-nav-list > li > a,
.mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 0.95rem 0;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-black);
}

.mobile-nav-toggle .plus {
  transition: transform 0.25s ease;
  font-size: 1.1rem;
  font-weight: 300;
}

.mobile-nav-toggle[aria-expanded="true"] .plus {
  transform: rotate(45deg);
}

.mobile-submenu {
  display: none;
  padding-bottom: 0.75rem;
}

.mobile-submenu h4 {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-grey-500);
  margin: 0.75rem 0 0.4rem;
}

.mobile-submenu li a {
  display: block;
  padding: 0.4rem 0 0.4rem 0.5rem;
  font-size: 0.84rem;
  color: var(--color-grey-700);
}

.mobile-nav-foot {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-grey-300);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-foot a {
  font-size: 0.82rem;
  color: var(--color-grey-700);
}

/* --------------------------------------------------------------------------
   < 992px (Tablet & Mobile) — hide desktop nav / mega menu, show hamburger
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .header-col--nav,
  .mega-menu,
  .header-col--right {
    display: none !important;
  }

  .menu-toggle {
    display: flex;
  }

  .header-inner {
    justify-content: space-between;
  }

  .header-logo {
    order: 1;
    position: static;
    transform: none;
  }

  .header-col--left {
    order: 2;
  }

  :root {
    --header-height: 64px;
    --bottom-nav-height: 60px;
  }

  body {
    padding-bottom: var(--bottom-nav-height);
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .back-to-top {
    bottom: calc(var(--bottom-nav-height) + var(--space-sm));
  }

  .editorial-split,
  .video-showcase__grid,
  .instagram-newsletter__grid {
    grid-template-columns: 1fr;
  }

  .promo-steps {
    gap: var(--space-md);
  }

  .footer-top {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   >= 992px (Laptop / Desktop) — product track density
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .editorial-split {
    grid-template-columns: 1fr 1fr;
  }

  .video-showcase__grid {
    grid-template-columns: 1fr 0.85fr;
  }

  .instagram-newsletter__grid {
    grid-template-columns: 3fr 2fr;
  }

  .story-split {
    grid-template-columns: 1fr 1fr;
  }

  .product-track .product-card {
    width: calc(25% - (var(--space-md) * 3 / 4));
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .product-track .product-card {
    width: calc(33.333% - (var(--space-md) * 2 / 3));
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .product-track .product-card {
    width: calc(50% - (var(--space-md) / 2));
  }

  .hero-caption h1,
  .hero-caption h2 {
    max-width: 18ch;
  }
}

@media (max-width: 575.98px) {
  .product-track .product-card {
    width: 82%;
  }

  .hero-caption {
    align-items: center;
    text-align: center;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .promo-step {
    max-width: 130px;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   Mega menu — tighten spacing on smaller desktop (still full width)
   -------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .mega-menu-inner {
    grid-template-columns: repeat(3, 1fr) 1fr;
    gap: var(--space-lg);
    padding-block: var(--space-lg);
  }

  .mega-menu-feature {
    min-height: 200px;
  }

  .primary-nav {
    gap: var(--space-md);
  }
}

/* --------------------------------------------------------------------------
   Testimonial slider — tighten on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .testimonial-carousel {
    padding-inline: var(--space-lg);
  }

  .testimonial-carousel .carousel-control-prev,
  .testimonial-carousel .carousel-control-next {
    width: 36px;
    height: 36px;
  }

  .testimonial-carousel .carousel-control-prev {
    left: -6px;
  }

  .testimonial-carousel .carousel-control-next {
    right: -6px;
  }
}

/* --------------------------------------------------------------------------
   Announcement bar — tighten on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .announcement-track span {
    font-size: 0.65rem;
    padding-inline: var(--space-md);
  }
}

/* --------------------------------------------------------------------------
   Testimonial / value-prop stacking already handled by Bootstrap columns.
   Fine-tune vertical rhythm on small screens.
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .section-pad {
    padding-block: var(--space-lg);
  }

  .section-heading {
    font-size: clamp(1.6rem, 6vw, 2.1rem);
  }

  .value-prop {
    margin-bottom: var(--space-md);
  }
}

/* --------------------------------------------------------------------------
   Search panel input sizing on small screens
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .search-panel {
    padding-block: var(--space-lg) var(--space-md);
  }
}
