/* ==========================================================================
   LAKHAN SPORTS — SIALKOT, PAKISTAN
   RESPONSIVE STYLESHEET (MOBILE-FIRST & DESKTOP BREAKPOINTS)
   Strict Zero-Overlap Architecture for 320px to 1920px+
   ========================================================================== */

/* --- EXTRA LARGE SCREENS (1440px and up) --- */
@media (min-width: 1440px) {
  :root {
    --container-max: 1360px;
  }
}

/* --- LARGE SCREENS & DESKTOPS (Max 1200px) --- */
/* CRITICAL BREAKPOINT: Prevents any collision between Logo, 7 Nav Links, and CTA button */
@media (max-width: 1180px) {
  .nav-menu {
    gap: 16px;
  }
  .nav-link {
    font-size: 0.88rem;
  }
  .header-actions .btn {
    padding: 10px 18px;
    font-size: 0.88rem;
  }
  .brand-logo img,
  .brand-logo svg {
    height: 42px;
  }
}

/* Switch to clean Mobile Navigation early at 1040px to GUARANTEE ZERO OVERLAPPING */
@media (max-width: 1040px) {
  .nav-menu {
    display: none !important;
  }
  .header-actions .btn-quote-desktop {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-card-preview {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .modal-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-img-wrap {
    height: 280px;
  }
}

/* --- TABLETS (Max 768px) --- */
@media (max-width: 768px) {
  :root {
    --header-height: 72px;
  }

  .topbar {
    display: none; /* Hide topbar on mobile to prioritize viewport space and eliminate clutter */
  }

  .brand-logo img,
  .brand-logo svg {
    height: 38px;
    max-width: 190px;
  }

  .hero-home {
    min-height: auto;
    padding: 60px 0 50px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .hero-card-preview img {
    height: 380px;
  }

  .section {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .categories-grid,
  .products-grid,
  .features-grid,
  .process-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.col-span-2 {
    grid-column: span 1;
  }

  .form-card {
    padding: 24px 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
  }

  /* Floating WhatsApp Adjustments for small screens */
  .whatsapp-float {
    bottom: 20px;
    right: 16px;
  }

  .whatsapp-float-btn {
    width: 52px;
    height: 52px;
  }

  .whatsapp-float-btn svg {
    width: 28px;
    height: 28px;
  }

  .whatsapp-tooltip {
    display: none; /* Avoid obstructing mobile viewports */
  }

  .back-to-top {
    bottom: 82px;
    right: 18px;
    width: 38px;
    height: 38px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

/* --- SMALL MOBILE DEVICES (Max 430px / 390px / 375px / 320px) --- */
@media (max-width: 430px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-logo img,
  .brand-logo svg {
    height: 34px;
    max-width: 165px;
  }

  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.25rem; }

  .hero-card-preview img {
    height: 300px;
  }

  .product-img-wrap,
  .category-card-img-wrap {
    height: 210px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .mobile-drawer {
    max-width: 100%;
    padding: 70px 20px 30px;
  }

  .modal-body {
    padding: 20px 16px;
  }
}

/* Absolute minimum 320px safety */
@media (max-width: 340px) {
  .brand-logo img,
  .brand-logo svg {
    height: 30px;
    max-width: 140px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

