/* ============================================================
   ANAND ASSOCIATES — MOBILE & TABLET RESPONSIVE SYSTEM
   Strategy: Mobile-first fluid layout. Overrides for ≥600px,
   ≥768px, ≥1024px. Uses CSS custom properties + clamp().
   ============================================================ */

/* ══════════════════════════════════════════════════════
   1. FLUID TYPE SCALE — scales smoothly across all screens
══════════════════════════════════════════════════════ */
:root {
  /* Fluid font sizes: min at 320px, max at 1240px */
  --fs-xs:   clamp(0.72rem,  1.8vw,  0.82rem);
  --fs-sm:   clamp(0.84rem,  2.2vw,  0.94rem);
  --fs-base: clamp(0.94rem,  2.5vw,  1.05rem);
  --fs-md:   clamp(1.05rem,  2.8vw,  1.2rem);
  --fs-lg:   clamp(1.2rem,   3.5vw,  1.5rem);
  --fs-xl:   clamp(1.5rem,   5vw,    2.2rem);
  --fs-2xl:  clamp(1.8rem,   6vw,    3rem);
  --fs-hero: clamp(2rem,     8vw,    3.8rem);

  /* Fluid spacing */
  --sp-xs:  clamp(6px,  1.5vw, 10px);
  --sp-sm:  clamp(10px, 2vw,   16px);
  --sp-md:  clamp(16px, 3vw,   28px);
  --sp-lg:  clamp(24px, 5vw,   48px);
  --sp-xl:  clamp(40px, 8vw,   88px);

  /* Touch targets */
  --touch-min: 48px;
  --nav-h: clamp(60px, 10vw, 76px);
}

/* ══════════════════════════════════════════════════════
   2. BASE RESET FOR MOBILE
══════════════════════════════════════════════════════ */
html { font-size: 16px; overflow-x: hidden; }
body { overflow-x: hidden; }

/* All text uses fluid sizes by default */
p, li, td, th, label, input, select, textarea, button {
  font-size: var(--fs-base);
}

/* ══════════════════════════════════════════════════════
   3. NAV — mobile hamburger first
══════════════════════════════════════════════════════ */
.nav { height: var(--nav-h); }
.nav-inner { padding: 0 var(--sp-md); gap: var(--sp-sm); }

/* Mobile: hide desktop links, show hamburger */
.nav-links  { display: none; }
.cart-btn   { display: none; }
.hamburger  { display: flex !important; margin-left: auto; flex-direction: column; gap: 5px; padding: 8px; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 26px; height: 3px; background: var(--indigo, #2D2B7F); border-radius: 3px; }

/* Explicit mobile breakpoint guarantee for the nav menu */
@media (max-width: 1023px) {
  .nav-links { display: none !important; }
  .hamburger { display: flex !important; }
}
@media (min-width: 1024px) {
  .hamburger { display: none !important; }
}

.logo-emblem { width: 40px; height: 40px; border-radius: 11px; }
.logo-a      { font-size: 22px; }
.logo-main   { font-size: clamp(14px, 4vw, 21px); }
.logo-sub    { display: none; }

.mobile-menu {
  position: fixed !important;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  width: 100vw; height: calc(100vh - var(--nav-h));
  background: white; z-index: 2000; overflow-y: auto;
  padding: 20px 24px 40px;
  display: none; flex-direction: column; gap: 4px;
  box-shadow: 0 8px 32px rgba(45,43,127,.15);
  border-top: 1px solid var(--gray-100);
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.open { display: flex !important; }
.mobile-menu a {
  padding: 18px 8px;
  font-size: 1.1rem;
  font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none;
}
.mobile-menu a::after { content: '›'; color: var(--saffron); font-size: 1.4em; font-weight: 700; }

/* Mobile cart button — inside mobile menu */
.mobile-cart-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--indigo); color: white;
  padding: var(--sp-md); border-radius: var(--radius);
  font-size: var(--fs-md); font-weight: 600;
  margin-top: var(--sp-sm); border: none; cursor: pointer; width: 100%;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════
   4. HERO — mobile stack
══════════════════════════════════════════════════════ */
.hero {
  padding: var(--sp-xl) 0 var(--sp-lg);
  min-height: auto;
}
.hero-inner {
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}
.hero-visual { display: none; } /* hide right panel on mobile */
.hero h1 { font-size: clamp(22px, 6vw, 32px); line-height: 1.1; }
.hero-desc { font-size: var(--fs-base); }
.hero-ctas { flex-direction: column; align-items: stretch; }
.hero-ctas button { width: 100%; justify-content: center; padding: 15px; font-size: var(--fs-md); min-height: var(--touch-min); }
.hero-stats {
  flex-wrap: wrap; gap: var(--sp-md);
  padding-top: var(--sp-md); margin-top: var(--sp-md);
}
.hero-stat-num { font-size: clamp(1.4rem, 5vw, 2rem); }
.hero-stat-label { font-size: var(--fs-xs); }
.hero-eyebrow { font-size: var(--fs-xs); }

/* ══════════════════════════════════════════════════════
   5. BRANDS TICKER
══════════════════════════════════════════════════════ */
.brands-label { font-size: var(--fs-xs); }
.brand-chip { padding: 0 var(--sp-md); }
.brand-chip span { font-size: var(--fs-sm); }
.brand-chip-logo { width: 22px; height: 22px; }

/* ══════════════════════════════════════════════════════
   6. SECTIONS
══════════════════════════════════════════════════════ */
.section { padding: var(--sp-xl) 0; }
.container { padding: 0 var(--sp-md); }
.section-title { font-size: var(--fs-xl); }
.section-sub   { font-size: var(--fs-base); }
.eyebrow       { font-size: var(--fs-xs); }
.section-head-row { flex-direction: column; align-items: flex-start; gap: var(--sp-sm); }
.section-head-row .btn-outline { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════════════════
   7. PRODUCT GRID — 1 col mobile, 2 tablet
══════════════════════════════════════════════════════ */
.picks-grid {
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}
.product-card { border-radius: var(--radius); }
.pc-img { height: 180px; }
.pc-body h3 { font-size: var(--fs-base); }
.pc-body p  { font-size: var(--fs-sm); }
.atc-btn { font-size: var(--fs-sm); padding: 13px; min-height: var(--touch-min); }

/* ══════════════════════════════════════════════════════
   8. SECTORS — 1 col mobile
══════════════════════════════════════════════════════ */
.sectors-grid { grid-template-columns: 1fr; gap: var(--sp-sm); }
.sector-card { padding: var(--sp-md); }
.sector-card h3 { font-size: var(--fs-md); }
.sector-icon { font-size: 36px; }

/* ══════════════════════════════════════════════════════
   9. IMG STRIP — stack vertically on mobile
══════════════════════════════════════════════════════ */
.img-strip { grid-template-columns: 1fr; height: auto; }
.img-strip-panel { height: 180px; }
.img-strip-panel-label { font-size: var(--fs-xs); }

/* ══════════════════════════════════════════════════════
   10. SHIP STRIP
══════════════════════════════════════════════════════ */
.ship-strip { min-height: 280px; }
.ship-content h2 { font-size: var(--fs-xl); }
.ship-content p  { font-size: var(--fs-sm); }
.ship-content .btn-saffron { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════════════════
   11. WHY STRIP — 2 col mobile
══════════════════════════════════════════════════════ */
.why-strip { padding: var(--sp-xl) 0; }
.why-strip-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-sm); margin-top: var(--sp-lg); }
.why-item { padding: var(--sp-md); }
.why-item h4 { font-size: var(--fs-sm); }
.why-item p  { font-size: var(--fs-xs); }
.why-item-icon { width: 48px; height: 48px; font-size: 20px; }

/* ══════════════════════════════════════════════════════
   12. BEST-PRICE GRID — 2 col mobile
══════════════════════════════════════════════════════ */
.best-price-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-sm); }
.bp-card { padding: var(--sp-sm); }
.bp-img-wrap { width: 64px; height: 64px; }
.bp-info h4 { font-size: var(--fs-xs); }
.bp-btn { font-size: var(--fs-xs); padding: 8px; }
.bp-brand span { font-size: 0.62rem; }

/* ══════════════════════════════════════════════════════
   13. CTA BANNER
══════════════════════════════════════════════════════ */
.cta-banner { padding: var(--sp-xl) 0; }
.cta-banner h2 { font-size: var(--fs-xl); }
.cta-banner p  { font-size: var(--fs-sm); }
.cta-btns { flex-direction: column; align-items: stretch; gap: var(--sp-sm); }
.cta-btns button { width: 100%; justify-content: center; min-height: var(--touch-min); }

/* ══════════════════════════════════════════════════════
   14. PAGE HERO (inner pages)
══════════════════════════════════════════════════════ */
.page-hero { padding: var(--sp-lg) 0; }
.page-hero h1 { font-size: var(--fs-xl); }
.page-hero p  { font-size: var(--fs-sm); }

/* ══════════════════════════════════════════════════════
   15. PRODUCTS PAGE — sidebar collapses to filter bar
══════════════════════════════════════════════════════ */
.products-layout { grid-template-columns: 1fr; gap: var(--sp-md); padding: var(--sp-lg) 0; }

/* Collapsible sidebar for mobile */
.sidebar-toggle-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 16px;
  background: var(--indigo); color: white;
  border: none; border-radius: var(--radius);
  font-size: var(--fs-base); font-weight: 600; cursor: pointer;
  margin-bottom: var(--sp-sm);
}
.sidebar-toggle-btn svg { transition: transform 0.2s ease; }
.sidebar-toggle-btn.open svg { transform: rotate(180deg); }
.sidebar-collapsible { display: none; }
.sidebar-collapsible.open { display: block; }

/* Horizontal scrollable filter chips on mobile */
.filter-chips-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-chips-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 50px;
  border: 1.5px solid var(--gray-200); background: white;
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: all 0.2s ease;
  min-height: var(--touch-min); display: flex; align-items: center;
}
.filter-chip.active { background: var(--indigo); color: white; border-color: var(--indigo); }

/* ══════════════════════════════════════════════════════
   16. ABOUT PAGE
══════════════════════════════════════════════════════ */
.about-grid { grid-template-columns: 1fr; gap: var(--sp-lg); }
.about-visual { height: 240px; border-radius: var(--radius-lg); }
.about-visual-icons { grid-template-columns: 1fr 1fr; gap: var(--sp-sm); padding: var(--sp-md); }
.avi { width: 72px; height: 72px; font-size: 28px; border-radius: 16px; }
.about-content h2 { font-size: var(--fs-xl); }
.about-content p  { font-size: var(--fs-sm); }
.about-values { grid-template-columns: 1fr; gap: var(--sp-sm); }
.brands-logo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--sp-sm); }
.ceo-card { flex-direction: column; text-align: center; padding: var(--sp-lg); gap: var(--sp-md); }

/* ══════════════════════════════════════════════════════
   17. WHY US + PORTFOLIO — 1 col mobile
══════════════════════════════════════════════════════ */
.why-features { grid-template-columns: 1fr; gap: var(--sp-sm); }
.wf-card { padding: var(--sp-md); }
.wf-card h3 { font-size: var(--fs-base); }
.wf-card p  { font-size: var(--fs-sm); }
.process-step { grid-template-columns: 52px 1fr; gap: var(--sp-sm); padding: var(--sp-md) 0; }
.step-circle { width: 44px; height: 44px; font-size: 1rem; }
.process-step h4 { font-size: var(--fs-base); }
.process-step p  { font-size: var(--fs-sm); }

.portfolio-grid { grid-template-columns: 1fr; gap: var(--sp-sm); }
.port-card { border-radius: var(--radius); }
.port-body h3 { font-size: var(--fs-base); }
.port-body p  { font-size: var(--fs-sm); }
.port-img { height: 160px; }

/* ══════════════════════════════════════════════════════
   18. BLOG
══════════════════════════════════════════════════════ */
.blog-grid { grid-template-columns: 1fr; gap: var(--sp-sm); }
.blog-body h3 { font-size: var(--fs-base); }
.blog-body p  { font-size: var(--fs-sm); }
.blog-img { height: 150px; }

/* ══════════════════════════════════════════════════════
   19. ARTICLE PAGE
══════════════════════════════════════════════════════ */
.article-layout { grid-template-columns: 1fr; gap: var(--sp-lg); }
.article-sidebar { order: -1; }
.article-lead { font-size: var(--fs-base); }
.article-content { font-size: var(--fs-sm); }

/* ══════════════════════════════════════════════════════
   20. CONTACT
══════════════════════════════════════════════════════ */
.contact-layout { grid-template-columns: 1fr; gap: var(--sp-lg); padding: var(--sp-lg) 0; }
.contact-info h2 { font-size: var(--fs-xl); }
.contact-info p  { font-size: var(--fs-sm); }
.enquiry-form { padding: var(--sp-md); border-radius: var(--radius-lg); }
.enquiry-form h3 { font-size: var(--fs-lg); }
.fg-row { grid-template-columns: 1fr; }
.fg input, .fg select, .fg textarea { font-size: var(--fs-base); padding: 13px 14px; min-height: var(--touch-min); }
.fg label { font-size: var(--fs-sm); }
.btn-saffron, .btn-indigo, .btn-outline { min-height: var(--touch-min); font-size: var(--fs-base); }

/* ══════════════════════════════════════════════════════
   21. CART DRAWER — full screen on mobile
══════════════════════════════════════════════════════ */
.cart-drawer { width: 100%; right: -100%; }
.cart-head h3  { font-size: var(--fs-md); }
.ci-info h4    { font-size: var(--fs-sm); }
.ci-info p, .ci-moq { font-size: var(--fs-xs); }

/* ══════════════════════════════════════════════════════
   22. FOOTER
══════════════════════════════════════════════════════ */
.footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.footer-wave svg { height: 40px; }
.footer-tagline { font-size: var(--fs-sm); }
.footer-col a { font-size: var(--fs-sm); }
.footer-col h4 { font-size: var(--fs-xs); }
.footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

/* ══════════════════════════════════════════════════════
   23. TABLET (≥600px) — 2-col where needed
══════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  html { font-size: 17px; }
  .picks-grid { grid-template-columns: repeat(2, 1fr); }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .about-values { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .why-features { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .best-price-grid { grid-template-columns: repeat(3, 1fr); }
  .img-strip { grid-template-columns: repeat(3, 1fr); height: 220px; }
  .img-strip-panel { height: 220px; }
  .hero-ctas { flex-direction: row; }
  .cta-btns { flex-direction: row; }
  .ceo-card { flex-direction: row; text-align: left; }
  .fg-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════
   24. SMALL DESKTOP / LARGE TABLET (≥768px)
══════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  html { font-size: 17px; }
  .nav-links { display: flex; }
  .cart-btn  { display: flex; }
  .hamburger { display: none; }
  .logo-sub  { display: block; }
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .hero-visual { display: flex; }
  .products-layout { grid-template-columns: 220px 1fr; }
  .sidebar-toggle-btn { display: none; }
  .sidebar-collapsible { display: block !important; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-visual { height: 420px; }
  .contact-layout { grid-template-columns: 1fr 1.6fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .why-strip-grid { grid-template-columns: repeat(4, 1fr); }
  .sectors-grid { grid-template-columns: repeat(3, 1fr); }
  .picks-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════
   25. FULL DESKTOP (≥1024px)
══════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  html { font-size: 18px; }
  .picks-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
  .products-layout { grid-template-columns: 260px 1fr; }
  .best-price-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ══════════════════════════════════════════════════════
   26. TOUCH / POINTER improvements
══════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  /* Bigger tap targets on touch screens */
  .filter-btn     { padding: 12px 16px; min-height: var(--touch-min); }
  .btn-saffron, .btn-indigo, .btn-outline, .btn-outline-w { padding: 16px 28px; }
  .cart-btn       { padding: 12px 18px; }
  .atc-btn        { padding: 15px; }
  .nav-links a    { padding: 10px 16px; }
  /* Remove hover transforms on touch (prevents sticky states) */
  .product-card:hover,
  .port-card:hover,
  .wf-card:hover,
  .sector-card:hover { transform: none; }
  /* Keep box-shadow but no transform for performance */
  .product-card:hover { box-shadow: var(--shadow-md); }
}

/* ══════════════════════════════════════════════════════
   27. PRINT
══════════════════════════════════════════════════════ */
@media print {
  .nav, .cart-btn, .hamburger, .mobile-menu,
  .cart-drawer, .cart-overlay, .footer { display: none !important; }
  body { font-size: 12pt; }
  .hero { background: none; color: black; padding: 20pt 0; }
  .hero h1, .hero-desc, .hero-stat-num { color: black; }
}
