/* ==========================================
   MOBILE NAVIGATION DRAWER
   ========================================== */
/* ------------------------------------------
   HAMBURGER
   Three staggered rounded bars that morph
   into a clean X when the drawer opens.
   ------------------------------------------ */
.hamburger {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 0 8px;
  z-index: 1001;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hamburger:active { background: #f1f5f9; }

.hamburger span {
  display: block;
  height: 2.5px;
  border-radius: 10px;
  background: linear-gradient(90deg, #0b1f27, #14453a);
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease;
}
/* Staggered widths give it a designed look instead of a plain "≡" */
.hamburger span:nth-child(1) { width: 22px; }
.hamburger span:nth-child(2) { width: 15px; }
.hamburger span:nth-child(3) { width: 19px; }

.hamburger:hover span:nth-child(2) { width: 22px; }
.hamburger:hover span:nth-child(3) { width: 22px; }

/* Morph into an X */
.hamburger.open span { width: 22px; background: linear-gradient(90deg, #00875f, #0b1f27); }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ------------------------------------------
   DRAWER (slides in from the LEFT, matching
   the hamburger's new position)
   ------------------------------------------ */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: min(86vw, 340px);
  height: 100vh;
  background: #fff;
  z-index: 1000;
  transform: translateX(-102%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 6px 0 34px rgba(11, 31, 39, 0.16);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef1f4;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.mobile-nav-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6f8;
  color: #40515e;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.mobile-nav-close:active { background: #e6eaee; }

.mobile-nav-inner {
  padding: 6px 18px 28px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: #0b1f27;
  text-align: left;
  padding: 15px 2px;
  border: none;
  border-bottom: 1px solid #f1f4f6;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.mobile-nav-link:active { color: #00875f; }

/* Accordion sections */
.mobile-nav-acc.open { color: #00875f; }
.acc-chevron { transition: transform 0.28s ease; flex-shrink: 0; }
.mobile-nav-acc.open .acc-chevron { transform: rotate(180deg); }

.mobile-nav-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-nav-sub a {
  display: block;
  padding: 11px 2px 11px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #4a5a67;
  border-bottom: 1px solid #f6f8f9;
  text-decoration: none;
}
.mobile-nav-sub a:active { color: #00875f; }

/* Pill account button */
.mobile-nav-account {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 14px;
  background: linear-gradient(100deg, #00b488, #00875f);
  color: #fff;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 135, 95, 0.26);
}

.mobile-nav-ctas {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .product-img {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .product-body {
    padding: 12px;
  }
  .product-title {
    font-size: 0.85rem;
    min-height: 2.4rem;
    margin-bottom: 8px;
  }
  .current-price {
    font-size: 1.1rem;
  }
  .action-row {
    grid-template-columns: 1fr;
    gap: 8px;
    display: flex;
    flex-direction: column;
  }
  .buy-now-btn {
    padding: 12px 0;
    font-size: 1.05rem;
    font-weight: 800;
    width: 100%;
    order: 1;
  }
  .add-to-cart-btn {
    padding: 10px 0;
    font-size: 0.9rem;
    background: #f1f5f9;
    color: #059669;
    width: 100%;
    order: 2;
  }
  .cart-drawer.open {
    width: 100%;
  }
  .live-sales-popup {
    /* Sits above the WhatsApp circle, which sits above the tab bar */
    bottom: calc(134px + env(safe-area-inset-bottom, 0px));
    left: -400px;
  }
  .live-sales-popup.show {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .icon-link:not([href="cart.html"]) {
    display: none !important;
  }
  #mainNav {
    display: none;
  }
  .header-right {
    gap: 16px;
  }
  .help-block {
    display: none;
  }

  /* ------------------------------------------
     MOBILE HEADER + SEARCH
     The inline search box used to be squeezed
     into the same row as the logo and cart,
     leaving it only a few px wide. On mobile we
     now hide it entirely and use a magnifier
     button that opens a full-screen search
     sheet instead (same pattern as the leading
     apps in this space).
     ------------------------------------------ */
  .main-header {
    padding: 10px 0;
  }
  /* 3-column layout: hamburger | centred logo | actions.
     The outer columns are locked to the same width so the
     logo lands in the true centre of the header. */
  .header-inner {
    display: grid;
    grid-template-columns: 82px 1fr 82px;
    align-items: center;
    gap: 0;
  }
  .hamburger {
    justify-self: start;
    margin-left: -8px;
  }
  .logo {
    justify-self: center;
    margin: 0;
    gap: 8px;
  }
  /* Inline desktop search is replaced by the trigger + overlay */
  .search-wrapper {
    display: none;
  }
  .header-right {
    justify-self: end;
    gap: 2px;
    margin-left: 0;
  }
  .search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
  }
  /* Cart drops the rupee total on mobile — the badge is enough */
  #cartTotal {
    display: none;
  }
  .header-right .icon-link {
    width: 38px;
    height: 38px;
    justify-content: center;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
  .logo-word {
    font-size: 1.06rem;
  }
}

@media (max-width: 400px) {
  .header-inner {
    grid-template-columns: 74px 1fr 74px;
  }
  .logo-word {
    font-size: 0.97rem;
  }
}

/* ==========================================
   MOBILE PRODUCT GRID — 2 columns
   ========================================== */
@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card {
    border-radius: 14px;
  }
  .product-img {
    aspect-ratio: 4 / 3;
  }
  .product-body {
    padding: 10px;
  }
  .product-category {
    font-size: 0.62rem;
    margin-bottom: 4px;
  }
  .product-title {
    font-size: 0.8rem;
    min-height: 2.2rem;
  }
  .trust-points {
    display: none;
  }
  .buy-now-btn {
    padding: 10px 0;
    font-size: 0.9rem;
  }
  .add-to-cart-btn {
    padding: 9px 0;
    font-size: 0.8rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .section-subtitle {
    font-size: 0.82rem;
    margin-bottom: 22px;
  }
  .brand-chip {
    font-size: 0.8rem;
    padding: 6px 15px 6px 6px;
    gap: 8px;
  }
  .brand-chip-img,
  .brand-chip-logo {
    width: 26px;
    height: 26px;
  }
}

/* ==========================================
   MOBILE HERO
   ========================================== */
@media (max-width: 768px) {
  .hero {
    padding: 44px 20px 48px;
  }
  .hero-badge {
    font-size: 0.75rem;
    margin-bottom: 20px;
    gap: 7px;
    padding: 4px 13px 4px 4px;
  }
  .hero-badge-pill {
    font-size: 0.65rem;
    padding: 3px 9px;
  }
  .hero-title {
    font-size: 2.05rem;
    margin-bottom: 14px;
  }
  .hero-subtitle {
    font-size: 0.94rem;
    margin-bottom: 26px;
  }
  .hero-btn,
  .hero-btn-ghost {
    max-width: 100%;
    font-size: 0.96rem;
  }
  .brand-section {
    padding: 18px 0 26px;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.82rem;
  }
}

