/* ============================================
   VIBHUSHA RESPONSIVE STYLES
   Breakpoints:
   - 1440px (Large Desktop)
   - 1024px (Laptop / Tablet Landscape)
   - 768px (Tablet Portrait)
   - 390px / 375px / 320px (Mobile)
   ============================================ */

/* ─── 1440px+ LARGE DESKTOP ─── */
@media (min-width: 1440px) {
  .container {
    max-width: var(--content-width);
  }
  .container-wide {
    max-width: var(--max-width);
  }
}

/* ─── 1024px TABLET LANDSCAPE / LAPTOP ─── */
@media (max-width: 1024px) {
  :root {
    --nav-height: 64px;
    --gutter-desktop: var(--gutter-tablet);
    --space-section: 80px;
  }

  .container,
  .container-wide {
    padding-left: var(--gutter-tablet);
    padding-right: var(--gutter-tablet);
  }

  /* Header */
  .header-inner {
    grid-template-columns: auto 1fr auto;
    padding: 0 var(--gutter-tablet);
  }

  .header-nav { display: none; }
  .mobile-nav-toggle { display: flex; }

  /* Grid adjustments */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  /* Shop layout */
  .shop-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: relative; top: auto; }

  /* Hero */
  .hero-title { font-size: var(--text-5xl); }

  /* Collection grid */
  .style-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }

  /* Mega menu */
  .mega-menu { display: none; }

  /* Newsletter */
  .newsletter-inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .newsletter-form { min-width: unset; width: 100%; }

  /* Carousel cards */
  .product-carousel .product-card { flex: 0 0 calc(50% - 12px); }

  /* Mood slider cards */
  .mood-card { flex: 0 0 calc(50% - 12px); }

  /* Section title */
  .section-title { font-size: var(--text-3xl); }
}

/* ─── 768px TABLET PORTRAIT / MOBILE ─── */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
    --space-section: 64px;
  }

  body {
    padding-bottom: 64px; /* bottom nav height */
    overflow-x: hidden;
  }

  .container,
  .container-wide,
  .container-narrow {
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
  }

  /* Header */
  .header-inner {
    padding: 0 var(--gutter-mobile);
  }

  .header-logo img { height: 36px; }
  .header-logo-tagline { display: none; }

  /* Mobile bottom nav */
  .mobile-bottom-nav { display: block; }

  /* Keep Search, Wishlist, Account, Cart aligned or accessible */
  .header-actions .header-icon-btn:not([data-action="search"]):not([data-action="cart"]) {
    display: none;
  }

  /* Hero */
  .hero-section { height: 90vh; min-height: 520px; }
  .hero-title { font-size: var(--text-4xl); letter-spacing: -0.02em; }
  .hero-subtitle { font-size: var(--text-sm); max-width: 100%; margin-bottom: var(--space-6); }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { width: 100%; justify-content: center; }

  /* Grids */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: var(--space-8); }

  /* Product Card on Mobile */
  .product-card-name { font-size: var(--text-base); }
  .product-card-fabric { font-size: 11px; }
  .price-current { font-size: var(--text-sm); }
  .price-original { font-size: 11px; }
  .product-card-actions { flex-direction: column; gap: var(--space-1); }
  .product-card-btn-add, .product-card-whatsapp { width: 100%; font-size: 10px; padding: 6px 8px; }

  /* Style cards grid on mobile */
  .style-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
  .style-card { aspect-ratio: 1/1.2; }
  .style-card-title { font-size: var(--text-xl); }

  /* Carousels */
  .product-carousel .product-card { flex: 0 0 calc(70vw); }
  .product-carousel { gap: var(--space-3); }

  /* Brand intro */
  .brand-intro { padding: 60px 0; }
  .brand-intro-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .brand-intro-text { padding-left: 0; }
  .brand-intro-image { aspect-ratio: 4/3; }

  /* Quality section */
  .quality-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
  .quality-title { font-size: var(--text-lg); }

  /* Heritage section */
  .heritage-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .heritage-text { padding-left: 0; }

  /* Featured collection */
  .featured-collection { height: 480px; }
  .featured-banner-title { font-size: var(--text-3xl); }

  /* Section titles */
  .section-title { font-size: var(--text-2xl); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; gap: var(--space-3); }

  /* Cart */
  .cart-layout { grid-template-columns: 1fr; }

  /* Mood slider */
  .mood-card { flex: 0 0 calc(75vw); }
  .mood-slider { gap: var(--space-4); padding: 0 var(--gutter-mobile); }

  /* Review cards */
  .reviews-grid { grid-template-columns: 1fr; gap: var(--space-4); }

  /* Float whatsapp position */
  .float-whatsapp { bottom: 80px; right: var(--space-4); width: 48px; height: 48px; }
  .float-whatsapp svg { width: 24px; height: 24px; }
  .scroll-top { left: var(--space-4); bottom: 80px; width: 40px; height: 40px; }

  /* PDP */
  .pdp-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .pdp-gallery { position: relative; }

  /* UGC grid */
  .ugc-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
  .ugc-item:nth-child(1) { grid-row: span 1; }
  .ugc-item:nth-child(4) { grid-row: span 1; }

  /* Journal */
  .journal-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .journal-card:first-child { grid-row: span 1; }
  .journal-card:first-child .journal-img { aspect-ratio: 16/10; }

  /* Newsletter */
  .newsletter-form { flex-direction: column; }
  .newsletter-input { border-bottom: 1px solid rgba(184,149,42,0.4); }

  /* Toast */
  .toast-container { left: var(--space-4); right: var(--space-4); bottom: 76px; }
  .toast { max-width: 100%; font-size: var(--text-xs); }

  /* Search */
  .search-results { grid-template-columns: 1fr; }
  .search-input { font-size: var(--text-xl); }
}

/* ─── 390px / 375px SMALL MOBILE ─── */
@media (max-width: 390px) {
  :root {
    --gutter-mobile: 16px;
  }
  .hero-title { font-size: var(--text-3xl); }
  .hero-subtitle { font-size: var(--text-xs); }
  .section-title { font-size: var(--text-xl); }
  .product-grid { gap: var(--space-3); }
  .product-card-name { font-size: var(--text-sm); line-height: 1.2; }
  .price-current { font-size: var(--text-sm); }
  .product-card-fabric { display: none; }
  .style-card-title { font-size: var(--text-lg); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ─── 320px EXTRA SMALL MOBILE ─── */
@media (max-width: 320px) {
  :root {
    --gutter-mobile: 12px;
  }
  .hero-title { font-size: 1.75rem; }
  .product-grid { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: 1fr; }
  .quality-grid { grid-template-columns: 1fr; }
  .ugc-grid { grid-template-columns: 1fr; }
}

/* ─── PRINT ─── */
@media print {
  .site-header,
  .site-footer,
  .mobile-bottom-nav,
  .float-whatsapp,
  .scroll-top {
    display: none !important;
  }
}
