/* ================================================================
   Madhavan Jewellers — Responsive Stylesheet
   Mobile-first breakpoints
   ================================================================ */

/* --- ≤ 1024px Tablet landscape ----------------------------------- */
@media (max-width: 1024px) {
  .collections-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .footer-brand { grid-column: 1 / -1; }
  .about-grid { gap: var(--s4); }
  .coll-desc { gap: var(--s4); }
}

/* --- ≤ 768px Tablet portrait ------------------------------------- */
@media (max-width: 768px) {
  :root { --header-h: 68px; }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 78%; max-width: 320px; height: 100vh;
    background: var(--white); flex-direction: column; justify-content: center;
    padding: var(--s5) var(--s4); gap: var(--s3);
    box-shadow: var(--shadow-lg); z-index: 1000;
    transition: right 0.45s var(--ease);
  }
  .nav-links.open { right: 0; }
  .nav-links .nav-link { color: var(--charcoal) !important; font-size: 1.05rem; }

  /* Collections dropdown becomes an accordion on mobile */
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; color: var(--charcoal) !important; font-size: 1.05rem; }
  .nav-dropdown-menu {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: none;
    max-height: 0; overflow: hidden; box-shadow: none; padding: 0; margin-top: 0;
    transition: max-height var(--dur) var(--ease), padding var(--dur) var(--ease);
  }
  .nav-dropdown.open .nav-dropdown-menu {
    pointer-events: auto; max-height: 320px; padding: 0.5rem 0 0.5rem 1rem;
  }
  .nav-dropdown-link { color: var(--charcoal) !important; font-size: 0.92rem; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(10,8,5,0.5); opacity: 0; visibility: hidden; transition: opacity var(--dur), visibility var(--dur); z-index: 999; }
  .nav-overlay.show { opacity: 1; visibility: visible; }

  /* Gold bar at top of mobile menu */
  .nav-links::before { content: ''; display: block; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad-gold); }

  /* Layouts */
  .about-grid, .coll-desc, .contact-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; gap: var(--s2); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.tall { grid-row: span 1; aspect-ratio: 1; }
  .about-stats { flex-wrap: wrap; gap: var(--s3); }
  .form-row { grid-template-columns: 1fr; }
  .trust-items { flex-direction: column; align-items: flex-start; gap: var(--s2); }

  /* Auth */
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }

  /* Section */
  .section { padding: var(--s7) 0; }

  /* Footer */
  .footer-bottom { flex-direction: column; gap: var(--s1); text-align: center; }
}

/* --- ≤ 480px Mobile ---------------------------------------------- */
@media (max-width: 480px) {
  .container, .container-md { padding: 0 var(--s2); }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn { width: 100%; }
  .product-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: column; gap: var(--s2); }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: var(--s6) 0; }
  .section-head { margin-bottom: var(--s4); }
  .collections-grid { gap: var(--s2); }
  .nav-logo-text { display: none; }
}

/* --- Reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* --- Print ------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .back-to-top, #loader { display: none !important; }
}


