/* ==========================================================================
   RESPONSIVE CSS — Media query overrides for all breakpoints
   ========================================================================== */

/* --------------------------------------------------------------------------
   XL — 1280px
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  :root { --container-px: 1.25rem; }
  .footer-main { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .footer-newsletter { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   LG — 1024px  (Desktop / Tablet landscape breakpoint)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  :root { --sp-12: 2.5rem; --sp-14: 3rem; }

  /* Header */
  .header-inner { justify-content: space-between; }
  .header-search { display: none; } /* hidden on tablet — use mobile search toggle */
  .header-actions { margin-left: auto; }
  .primary-nav { display: none; }
  .mobile-menu-toggle { display: flex; }

  /* Hero */
  .hero-slider { height: clamp(300px, 55vw, 480px); }

  /* Product Layout */
  .product-layout { grid-template-columns: 1fr; gap: var(--sp-6); }
  .product-gallery { position: static; }

  /* Footer */
  .footer-main { grid-template-columns: 1fr 1fr; row-gap: var(--sp-6); }
  .footer-brand { grid-column: 1 / -1; }

  /* Footer bottom clearance for mobile/tablet bottom navigation dock
     (applied on .footer-bottom instead of body so the dark footer background
     extends seamlessly behind the floating dock with no white strip below) */
  body.has-mobile-bottom-nav .footer-bottom {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
  body.has-mobile-bottom-nav.rajputi-single-product .footer-bottom {
    padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px));
  }

  /* Cart & Checkout tablet stack */
  .cart-layout,
  .checkout-layout { grid-template-columns: 1fr; gap: var(--sp-6); }
  .cart-totals,
  .checkout-order-review { position: static; }

  /* Account layout */
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; }
  .account-nav__menu { flex-direction: row; flex-wrap: wrap; }
  .account-nav__link { flex: 0 0 calc(50% - 1px); }
}

/* --------------------------------------------------------------------------
   MD — 768px  (Tablet portrait / large phones)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  :root {
    --sp-10: 2rem;
    --sp-12: 2rem;
    --sp-16: 3rem;
  }

  /* Benefits bar — clean aligned 2-column grid, 5th item centered */
  .benefits-bar { padding-block: var(--sp-4); }
  .benefits-bar__inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
    align-items: stretch;
  }
  .benefit-item {
    flex: none;
    justify-content: flex-start;
    padding: var(--sp-3);
    background: var(--clr-ivory);
    border: 1px solid var(--clr-border-light);
    border-radius: var(--radius-md);
    gap: var(--sp-2);
  }
  .benefit-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .benefit-item__icon { width: 36px; height: 36px; }
  .benefit-item__icon svg { width: 17px; height: 17px; }
  .benefit-item__title { font-size: 12px; line-height: 1.25; }
  .benefit-item__sub { font-size: 10.5px; line-height: 1.3; }

  /* Category circles */
  .category-circles { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: var(--sp-3); }
  .category-circle__img-wrap { width: 72px; height: 72px; }

  /* Section header — prevent View All overlapping title lines on mobile */
  .section-header {
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-5);
  }
  .section-header .section-link {
    position: static;
    font-size: var(--fs-xs);
  }
  .section-title {
    font-size: 1.2rem;
    gap: var(--sp-3);
    white-space: normal;
  }
  .section-title::before,
  .section-title::after { width: 28px; }

  /* Products grid */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }

  /* Stats strip — clean aligned 2-column grid, 5th item centered */
  .stats-strip { padding-block: var(--sp-6); }
  .stats-strip__inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
  }
  .stat-item { padding: var(--sp-4) var(--sp-3); }
  .stat-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  /* Footer */
  .footer-main { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; }
  .site-footer { padding-top: var(--sp-8); }

  /* Hero — compact, clean typography & buttons so hero image stays visible */
  .hero-slider { height: clamp(270px, 68vw, 380px); }
  .hero-slide__content { align-items: flex-end; }
  .hero-slide__overlay {
    background: linear-gradient(to top, rgba(26, 10, 14, 0.86) 0%, rgba(107, 39, 55, 0.45) 55%, rgba(0, 0, 0, 0.1) 100%);
  }
  .hero-slide__text {
    padding: var(--sp-5) var(--sp-4) var(--sp-8);
    max-width: 100%;
    width: 100%;
  }
  .hero-slide__eyebrow {
    font-size: 9.5px;
    letter-spacing: 0.14em;
    margin-bottom: var(--sp-1);
  }
  .hero-slide__heading {
    font-size: clamp(1.35rem, 5.8vw, 1.85rem);
    line-height: 1.15;
    margin-bottom: var(--sp-2);
  }
  .hero-slide__description {
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: var(--sp-4);
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-slide__actions { gap: var(--sp-2); }
  .hero-slide__actions .btn,
  .hero-slide__actions .btn--lg {
    padding: 0.55rem 1rem !important;
    font-size: 11px !important;
    letter-spacing: 0.06em;
  }
  .hero-slider__dots { bottom: var(--sp-3); }
  .hero-slider__prev,
  .hero-slider__next { display: none; } /* Use swipe on mobile */

  /* App promo */
  .app-promo__inner { flex-direction: column; text-align: center; }
  .app-promo__content { max-width: 100%; }
  .app-promo__badges { justify-content: center; }
  .app-badge { min-width: 140px; padding: var(--sp-2) var(--sp-4); }
  .app-promo__phone { display: none; }

  /* Testimonials slider mobile */
  .testimonials__slider { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .testimonials__slider::-webkit-scrollbar { display: none; }
  .testimonials .slider-btn { display: none; }

  /* Cart */
  .cart-layout { grid-template-columns: 1fr; }
  .cart-table { display: block; }
  .cart-table thead { display: none; }
  .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr {
    position: relative;
    border: 1.5px solid var(--clr-border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--sp-3);
    padding: var(--sp-4);
    background: var(--clr-white);
  }
  .cart-table td { padding: var(--sp-2) 0; }
  .cart-table td::before {
    content: attr(data-label);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    display: block;
    margin-bottom: 4px;
  }
  .cart-table td.product-thumbnail::before,
  .cart-table td.product-remove::before { display: none; }
  .cart-table td.product-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
    padding: 0;
  }
  .cart-totals,
  .checkout-section,
  .checkout-order-review { padding: var(--sp-4); }

  /* Footer bottom mobile center */
  .footer-bottom .container > div { justify-content: center !important; text-align: center; }
  .footer-payment-icons { justify-content: center; }

  /* Checkout billing fields */
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-order-review { position: static; }

  /* Promo cards */
  .promo-cards__grid { grid-template-columns: 1fr; }

  /* Product tabs */
  .product-tabs__nav { flex-wrap: nowrap; overflow-x: auto; }
  .product-tab-btn { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-xs); white-space: nowrap; }

  /* Single product gallery */
  .product-gallery__thumbnails { }
  .product-gallery__thumb { width: 60px; height: 68px; }

  /* Testimonials */
  .testimonial-card { flex: 0 0 85vw; min-width: 85vw; }

  /* Small-screen form & summary grids */
  .stitching-contact-grid,
  .thankyou-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  /* Lift WhatsApp float on single product mobile so it clears sticky ATC + bottom nav */
  body.rajputi-single-product .whatsapp-float {
    bottom: 142px;
  }

  /* Mobile header compact layout */
  .header-inner { gap: var(--sp-2); height: 62px; }
  .header-action { padding: var(--sp-1) var(--sp-2); }
  .header-action__label { display: none; }
  .site-logo__tagline { display: none; }
}

/* Desktop defaults for responsive helper grids */
@media (min-width: 768px) {
  .stitching-contact-grid,
  .thankyou-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
  }
}

/* --------------------------------------------------------------------------
   SM — 480px  (Small phones)
   -------------------------------------------------------------------------- */
@media (max-width: 479px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .product-card__body { padding: var(--sp-3); }
  .product-card__quick-add { display: none; } /* Show product name + price only */

  .hero-slide__heading { font-size: 1.3rem; }
  .hero-slide__description { font-size: 11.5px; }

  .cart-coupon { flex-direction: column; }
  .cart-coupon__input { width: 100%; }

  .account-nav__link { flex: 0 0 100%; }

  .mini-cart-panel { width: 100%; max-width: 100%; }
  .mobile-nav { width: 86vw; max-width: 320px; }
}

/* --------------------------------------------------------------------------
   Announcement bar height variable
   -------------------------------------------------------------------------- */
:root {
  --announcement-height: 38px;
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .primary-nav, .site-footer,
  .mobile-bottom-nav, .whatsapp-float,
  .mini-cart-panel, .mobile-nav,
  .sticky-atc, .announcement-bar { display: none !important; }
  .product-layout { display: block; }
  body { padding: 0; }
}
