/* ═══════════════════════════════════════════════════════
   CREVITA — RESPONSIVE SYSTEM
   Breakpoints: 1024px (tablet), 768px (mobile), 480px (small)
   ═══════════════════════════════════════════════════════ */

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

  .navbar-inner { padding: 0 30px; }

  .hero-slide { padding: 0 40px 0 50px; gap: 40px; }
  .hero-content h1 { font-size: 46px; }
  .hero-img-circle { width: 320px; height: 320px; }

  .section { padding: 60px 30px; }

  .category-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }

  .why-us { padding: 48px 30px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

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

  .footer-trust-strip { gap: 0; padding: 10px 20px; }
  .trust-item { padding: 5px 12px; font-size: 11px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; padding: 48px 30px; }
  .footer-bottom { padding: 18px 30px; }

  .products-layout { padding: 0 30px 60px; grid-template-columns: 200px 1fr; gap: 24px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }

  .breadcrumb { padding: 16px 30px; }

  /* Gift page */
  .gift-hero    { padding: 60px 40px !important; }
  .gift-occasions { padding: 52px 40px !important; }

}

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

  /* Global — html too, or mobile browsers still zoom out to fit overflow */
  html, body { overflow-x: hidden; }
  img  { max-width: 100%; height: auto; }

  .announcement-bar { font-size: 12px; padding: 9px 40px; }

  /* Navbar */
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 72vw;
    max-width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 80px 30px 30px;
    z-index: 160;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
  }

  .nav-links.open { left: 0; }
  .mobile-nav-overlay.open { display: block; }

  .nav-link {
    font-size: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }

  .nav-link::after { display: none; }

  /* On mobile: grid becomes hamburger | logo | actions */
  .navbar-inner {
    grid-template-columns: auto auto 1fr;
    padding: 0 16px;
    gap: 12px;
  }
  .logo-img-link { justify-self: start; }
  .nav-links { justify-content: flex-start; } /* drawer override */
  .nav-actions { justify-self: end; }
  .search-inner { padding: 0 20px; }

  /* Hero Carousel */
  .hero-carousel { height: auto; min-height: auto; }
  .hero-slide { flex-direction: column; padding: 48px 24px 36px; gap: 32px; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-content h1,
  .hero-content .hero-headline { font-size: 32px; }
  .hero-visual { order: -1; }
  .hero-img-circle { width: 200px; height: 200px; }
  .hero-flavor-badge { display: none; }
  .hero-arrow { display: none; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-tag { font-size: 11px; }

  /* Trust strip */
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-item { padding: 16px 18px; border-bottom: 1px solid var(--border); }
  .trust-item:nth-child(2) { border-right: none; }
  .trust-item:nth-child(3), .trust-item:nth-child(4) { border-bottom: none; }

  /* Sections */
  .section { padding: 48px 20px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section-header h2 { font-size: 26px; }

  /* Categories */
  .category-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  /* Product carousel — 1 per page */
  .carousel-track { grid-template-columns: repeat(7, 100%); }
  .carousel-arrow { display: none; }

  /* Why us */
  .why-us { padding: 36px 20px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .why-card { padding: 22px 18px 20px; }
  .why-stat { font-size: 22px; }
  .why-eyebrow { font-size: 10px; }

  /* Testimonials */
  .testimonial-grid { grid-template-columns: 1fr; }

  /* Newsletter */
  .newsletter-section { padding: 48px 0; }
  .newsletter-inner { flex-direction: column; text-align: center; padding: 0 24px; }
  .newsletter-text h2 { font-size: 24px; }
  .newsletter-form { flex-direction: column; }

  /* Footer — Accordion on mobile */
  .footer-trust-strip { padding: 8px 16px; }
  .trust-item { padding: 4px 10px; font-size: 10px; border-right: none; }
  .footer-top { grid-template-columns: 1fr; gap: 0; padding: 32px 20px 20px; }
  .footer-brand { padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 4px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; padding: 18px 24px; }
  .footer-legal { flex-wrap: wrap; justify-content: center; gap: 12px; }

  /* Accordion: link columns */
  .footer-links {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .footer-links h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 16px 0;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
  }
  .footer-links h4::after {
    content: '+';
    font-size: 18px;
    font-weight: 300;
    color: rgba(255,255,255,0.5);
    transition: transform 0.25s ease, color 0.2s;
    line-height: 1;
  }
  .footer-links.footer-open h4::after {
    transform: rotate(45deg);
    color: var(--gold-light);
  }
  .footer-links ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                opacity    0.25s ease,
                padding    0.25s ease;
    opacity: 0;
    padding-bottom: 0;
  }
  .footer-links.footer-open ul {
    max-height: 300px;
    opacity: 1;
    padding-bottom: 16px;
  }

  /* Mobile bottom nav — body padding so content isn't hidden under bar */
  body { padding-bottom: 64px; }

  /* Products page */
  .products-layout { grid-template-columns: 1fr; padding: 0 20px 48px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .active-filters-bar { display: none !important; }

  /* Filter sidebar → bottom drawer on mobile */
  .filter-sidebar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-height: 82vh;
    overflow-y: auto;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 32px;
    z-index: 195;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 -8px 40px rgba(61,31,10,0.15);
  }
  .filter-sidebar::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
  }
  .filter-sidebar.drawer-open { transform: translateY(0); }

  .mobile-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
  }
  .mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-size: 13px;
    font-weight: 600;
    color: var(--brown);
    cursor: pointer;
    transition: all 0.2s;
  }
  .mobile-filter-btn:hover { background: var(--cream-mid); }
  .mobile-active-count {
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
  }

  .breadcrumb { padding: 14px 20px; }

  /* Cart */
  .cart-layout { flex-direction: column; padding: 24px 20px; }
  /* flex items default to min-width:auto — the upsell strip's intrinsic width
     (4×130px cards) was forcing .cart-main wider than the phone screen */
  .cart-main { min-width: 0; width: 100%; }
  /* .cart-item is a grid (80px 1fr auto auto) — 4 columns overflow a phone.
     Collapse to 2 columns: img + info on row 1, qty + price wrap below. */
  .cart-item { grid-template-columns: 64px 1fr; row-gap: 10px; padding: 14px; }
  .cart-item-img { width: 64px; height: 64px; }
  .order-summary-box { width: 100%; }

  /* Checkout */
  .checkout-layout { flex-direction: column; padding: 24px 20px; }
  .checkout-main { min-width: 0; width: 100%; }
  /* Step indicator was ~460px min-content — compact it for phones */
  .checkout-steps { padding: 20px 14px; }
  .checkout-steps .step { font-size: 11px; gap: 5px; }
  .checkout-steps .step-num { width: 24px; height: 24px; font-size: 11px; }
  .checkout-steps .step-line { min-width: 14px; margin: 0 6px; }

  /* Gift page */
  .gift-hero     { padding: 48px 24px !important; }
  .gift-hero h1  { font-size: 32px !important; }
  .gift-occasions { padding: 40px 20px !important; }
  .gift-3col     { grid-template-columns: 1fr !important; }
  .gift-2col     { grid-template-columns: 1fr !important; }

  /* Lux sections */
  .lux-philosophy { padding: 56px 24px; }
  .lux-philosophy-inner { grid-template-columns: 1fr; gap: 32px; }
  .lux-flavours-header { padding: 0 24px; }
  .lux-flavours-arrows { display: none; }
  .lux-flavours-track { padding: 0 24px 20px; }
  .lux-flavour-card { width: 220px; }
  .lux-philosophy-stats { gap: 20px; flex-wrap: wrap; }

  /* Why Makhana */
  .why-makhana { padding: 48px 20px; }
  .why-makhana-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Quiz CTA */
  .quiz-cta { padding: 48px 20px; }
  .quiz-cta h2 { font-size: 28px; }

  /* UGC */
  .ugc-section { padding: 48px 20px; }
  .ugc-grid { grid-template-columns: repeat(3, 1fr); }

  /* Referral */
  .referral-section { padding: 48px 20px; }
  .referral-inner { grid-template-columns: 1fr; gap: 28px; }
  .referral-text h2 { font-size: 28px; }

  /* Back to top — move up so it clears WhatsApp widget */
  #back-to-top { bottom: 96px; right: 20px; width: 40px; height: 40px; }

  /* Scroll progress — slightly thinner on mobile */
  #scroll-progress { height: 2px; }

  /* Disable 3D card tilt on touch */
  .product-card { transform: none !important; }
}

/* ── Small mobile: ≤ 480px ── */
@media (max-width: 480px) {
  .hero-content h1,
  .hero-content .hero-headline { font-size: 26px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .why-card { border-left-width: 3px; }
  .why-makhana-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-item { border-right: none; border-bottom: 1px solid var(--border); }
  .trust-item:last-child { border-bottom: none; }
  .nav-logo { height: 44px; }
  .logo-tagline { display: none; }
  .ugc-grid { grid-template-columns: repeat(2, 1fr); }
  .gift-hero h1 { font-size: 26px !important; }
  .section-header h2 { font-size: 22px; }
  .newsletter-benefits { flex-direction: column; align-items: center; }
  .lux-flavour-card { width: 180px; }
  .btn { padding: 12px 22px; font-size: 11px; }
}
