/* ==========================================================================
   Lal Kitab Remedies — responsive.css
   Mobile-first adjustments and breakpoints (320 → 1920).
   ========================================================================== */

/* Mobile & tablet: drawer navigation replaces the desktop mega-menu. */
@media (max-width: 1023px) {
  .nav {
    display: none;
  }

  .nav-drawer {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 99;
    background: var(--background);
    overflow-y: auto;
    padding: 18px 0 60px;
    border-top: 1px solid var(--border);
  }
  .nav-drawer[hidden] {
    display: none;
  }
  .nav-drawer ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav-drawer > .container > ul > li {
    border-bottom: 1px solid var(--border);
  }
  .nav-drawer a {
    display: block;
    padding: 13px 4px;
    text-decoration: none;
    color: var(--text);
    font-size: 1rem;
  }
  .nav-drawer .drawer__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 4px;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    background: none;
    border: 0;
    color: var(--text);
    cursor: pointer;
  }
  .nav-drawer .drawer__toggle::after {
    content: "+";
    color: var(--accent);
    font-size: 1.2rem;
  }
  .nav-drawer .drawer__toggle[aria-expanded="true"]::after {
    content: "–";
  }
  .nav-drawer .drawer__panel {
    padding: 0 0 12px 12px;
    border-left: 2px solid var(--accent-soft);
    margin-left: 4px;
  }
  .nav-drawer .drawer__panel[hidden] {
    display: none;
  }
  .nav-drawer .drawer__panel a {
    padding: 9px 4px;
    font-size: 0.95rem;
    color: var(--muted);
  }
  .nav-drawer .drawer__cta {
    margin-top: 20px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .sidebar {
    position: static;
  }
}

@media (min-width: 1024px) {
  .header__mobile-only {
    display: none;
  }
  .site-header {
    position: sticky;
  }
  .megamenu__grid {
    grid-template-columns: repeat(var(--col-count, 4), 1fr);
  }
  .megamenu__grid--compact {
    grid-template-columns: repeat(4, 1fr);
  }
  .footer__brand {
    grid-column: auto;
  }
}

/* Small phones (320–420px) */
@media (max-width: 480px) {
  body {
    font-size: 16.5px;
  }
  .hero {
    padding: 40px 0 34px;
  }
  .section {
    padding: 40px 0;
  }
  .searchbox {
    flex-direction: column;
    border-radius: var(--radius);
  }
  .searchbox .btn {
    width: 100%;
  }
  .hero__cta .btn {
    flex: 1 1 100%;
  }
  .newsletter {
    padding: 26px 20px;
  }
  .card {
    padding: 18px;
  }
  .alphabet a,
  .alphabet span {
    width: 38px;
    height: 38px;
  }
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Horizontal category scroller used on mobile category strips */
.scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.scroller > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .scroller {
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* Large screens: keep reading measure comfortable, widen container gutters */
@media (min-width: 1440px) {
  :root {
    --container: 1240px;
  }
  .layout {
    gap: 64px;
  }
}

@media (min-width: 1800px) {
  body {
    font-size: 18px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .to-top,
  .ad-slot,
  .newsletter,
  .sidebar {
    display: none !important;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  body {
    background: #fff;
  }
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Enhancements (320px - 1023px)
   ========================================================================== */

/* Hide desktop-only CTA button in header on mobile to prevent overflow */
@media (max-width: 1023px) {
  .header__desktop-cta {
    display: none !important;
  }
  
  .site-header .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header__inner {
    gap: 10px;
    justify-content: space-between;
  }

  /* Checkout layout stacking */
  .checkout-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .order-summary-card {
    position: static !important;
    top: auto !important;
  }
}

/* Mobile topbar offer banner polish (< 768px) */
@media (max-width: 767px) {
  .topbar {
    padding: 6px 0;
  }

  .topbar__inner {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .topbar__offer {
    justify-content: center;
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .topbar__badge {
    font-size: 0.62rem;
    padding: 2px 6px;
  }

  .topbar__offer-btn {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    font-size: 0.7rem;
  }

  .topbar__links {
    display: none !important;
  }

  /* Mobile page head headings */
  .page-head h1 {
    font-size: clamp(1.45rem, 5vw, 2.1rem) !important;
    line-height: 1.3 !important;
  }

  .page-head__lead {
    font-size: 0.92rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Package pills horizontal touch scroll on mobile */
  .package-switcher-pills {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .package-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Problem CTA Box mobile polish */
  .problem-cta-box {
    padding: 1.4rem 1.1rem !important;
    margin: 2rem 0 !important;
    border-radius: 18px !important;
  }

  .problem-cta-title {
    font-size: 1.35rem !important;
  }

  .problem-cta-subtitle {
    font-size: 0.88rem !important;
  }

  .problem-cta-price-box {
    padding: 0.6rem 1.2rem !important;
  }

  .problem-cta-price {
    font-size: 1.75rem !important;
  }

  .problem-cta-feature-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .problem-cta-feat {
    font-size: 0.84rem !important;
    padding: 8px 12px !important;
  }

  .print-option-box {
    flex-direction: row !important;
    align-items: flex-start !important;
    font-size: 0.82rem !important;
    padding: 10px 12px !important;
  }

  .problem-cta-btn {
    width: 100% !important;
    padding: 14px 18px !important;
    font-size: 0.9rem !important;
  }

  /* Report Focus Grid on mobile form */
  .report-focus-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .focus-card {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }
}

/* Small mobile devices (<= 420px) */
@media (max-width: 420px) {
  .logo__img {
    max-height: 38px !important;
  }

  .report-focus-grid {
    grid-template-columns: 1fr !important;
  }

  .summary-title-row h3 {
    font-size: 1.25rem !important;
  }

  .summary-price {
    font-size: 1.65rem !important;
  }
}
