/**
 * BROZONE INDUSTRY - Responsive Stylesheet
 * Sialkot, Pakistan
 *
 * Strict Zero-Overlap Responsive Design
 * Tested against: 320px, 375px, 390px, 430px, 768px, 1024px, 1280px, 1440px, 1920px
 */

/* =============================================================
 * 1. LARGE SCREENS & DESKTOPS (<= 1200px)
 * =========================================================== */
@media (max-width: 1200px) {
  :root {
    --container-pad: 1.75rem;
  }

  .desktop-nav {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* =============================================================
 * 2. TABLET LANDSCAPE & EARLY MOBILE BREAKPOINT (<= 1080px)
 * Switch desktop menu to mobile drawer before links collide!
 * =========================================================== */
@media (max-width: 1080px) {
  .top-bar {
    font-size: 0.8rem;
  }
  .top-bar-left .top-bar-item:nth-child(2) {
    display: none; /* Hide secondary location label to preserve space */
  }

  /* Switch navigation to off-canvas */
  .desktop-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }

  /* Header adjustments */
  .site-header {
    --header-height: 72px;
  }
  .site-logo img {
    height: 40px;
    max-width: 200px;
  }

  /* Hero Section */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-badges {
    justify-content: center;
  }
  .hero-visual {
    max-width: 520px;
    margin: 0 auto;
  }

  /* Manufacturing Process Steps */
  .process-step {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .process-step.reverse {
    direction: ltr;
  }
  .process-step-media {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }
}

/* =============================================================
 * 3. TABLETS (<= 768px)
 * =========================================================== */
@media (max-width: 768px) {
  :root {
    --container-pad: 1.25rem;
    --header-height: 68px;
  }

  /* Top Bar */
  .top-bar {
    line-height: 36px;
  }
  .top-bar-right {
    display: none; /* Keep phone on left, clear right clutter */
  }
  .top-bar-inner {
    justify-content: center;
  }

  /* Header buttons */
  .header-cta-btn {
    display: none; /* Keep in mobile off-canvas drawer to prevent header cramming */
  }

  /* Form layout */
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Catalog toolbar */
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }
  .catalog-search-box {
    width: 100%;
    min-width: 0;
  }
  .catalog-filter-tabs {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  /* Product grid */
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
  }

  /* Lightbox buttons */
  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }
  .lightbox-close {
    top: 10px;
    right: 10px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* =============================================================
 * 4. PHONES (<= 576px)
 * =========================================================== */
@media (max-width: 576px) {
  :root {
    --container-pad: 1rem;
    --header-height: 64px;
  }

  .site-logo img {
    height: 34px;
    max-width: 170px;
  }

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

  .hero-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    text-align: center;
  }

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

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

  .product-card-actions {
    grid-template-columns: 1fr;
  }
  .product-card-actions .btn {
    width: 100%;
  }

  /* Floating WhatsApp on mobile */
  .floating-whatsapp-wrap {
    bottom: 18px;
    right: 14px;
  }
  .floating-whatsapp-btn {
    width: 52px;
    height: 52px;
  }
  .floating-whatsapp-tooltip {
    display: none; /* Hide text tooltip on touch devices to avoid layout jumps */
  }

  /* Off-canvas Drawers */
  .mobile-drawer, .quote-drawer {
    width: 100%;
    max-width: 100vw;
  }
}

/* =============================================================
 * 5. COMPACT PHONES (<= 375px & 320px)
 * =========================================================== */
@media (max-width: 375px) {
  :root {
    --container-pad: 0.85rem;
  }

  .site-logo img {
    height: 30px;
    max-width: 150px;
  }

  .inquiry-badge-btn {
    width: 38px;
    height: 38px;
  }

  .form-card {
    padding: 1.25rem 0.85rem;
  }

  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.88rem;
  }
}

