/* ============================================================
   BRINDAVAN BEARING — Responsive Stylesheet
   Breakpoints: 1200px, 1024px, 768px, 480px
   ============================================================ */

/* ============================================================
   LARGE DESKTOP (1200px+)
   ============================================================ */
@media (min-width: 1200px) {
  .container { padding: 0 24px; }
}

/* ============================================================
   TABLET LANDSCAPE / SMALL DESKTOP (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root { --section-py: 64px; }

  .nav { display: none; }
  .hamburger { display: flex; }
  .header-actions .btn { display: none; }

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

  .brand-logos { grid-template-columns: repeat(4, 1fr); }
  .industries-grid { grid-template-columns: repeat(4, 1fr); }

  .products-layout { grid-template-columns: 220px 1fr; gap: 24px; }

  .cta-banner { flex-direction: column; text-align: center; padding: 40px 32px; }
  .cta-banner::before { width: 100%; height: 4px; top: 0; left: 0; }
  .cta-banner .btn-group { justify-content: center; }

  .bearing-rings { width: 400px; height: 400px; right: -100px; opacity: 0.04; }

  .theme-switcher { display: none; }
}

/* ============================================================
   TABLET PORTRAIT (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --section-py: 52px; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.2rem; }

  .container { padding: 0 16px; }

  /* Grid adjustments */
  .grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Hero */
  .hero { padding: 100px 0 60px; min-height: auto; }
  .hero p { font-size: 1rem; }
  .stats-bar { flex-wrap: wrap; }
  .stat-item { flex-basis: 50%; border-right: none; border-bottom: 1px solid var(--clr-border); }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--clr-border); }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }
  .bearing-rings { display: none; }

  /* Products */
  .products-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .filter-sidebar.mobile-open {
    display: block;
    position: fixed; inset: 0; z-index: 1050;
    overflow-y: auto; border-radius: 0;
    top: 0; padding-top: 60px;
  }
  .filter-mobile-btn {
    display: flex !important;
    align-items: center; gap: 8px;
    padding: 10px 16px;
    background: var(--clr-bg-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--clr-text-muted);
    cursor: pointer;
    margin-bottom: 16px;
  }

  /* About */
  .about-snap .grid-2 { gap: 32px; }

  /* Brands grid */
  .brand-logos { grid-template-columns: repeat(3, 1fr); }
  .brands-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Industries */
  .industries-grid { grid-template-columns: repeat(3, 1fr); }

  /* Cart panel */
  .cart-panel { width: 100vw; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  /* Product detail */
  .product-detail-grid { grid-template-columns: 1fr; }

  /* CTA banner */
  .cta-banner { padding: 32px 24px; }
  .cta-banner-text h2 { font-size: 1.5rem; }

  /* Floating buttons adjust */
  .floating-buttons { bottom: 20px; right: 16px; }
  .float-btn { width: 46px; height: 46px; font-size: 1.15rem; }
  .float-btn .tooltip { display: none; }

  /* Theme switcher hidden on mobile */
  .theme-switcher { display: none; }

  /* Inquiry cart inline */
  .inline-form-row { flex-direction: column; align-items: stretch; }

  /* Section header */
  .section-header { margin-bottom: 36px; }
  .section-header h2 { font-size: 1.6rem; }
}

/* ============================================================
   MOBILE (max 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root { --section-py: 44px; }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }

  .container { padding: 0 12px; }

  /* Single column grids */
  .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* Hero */
  .hero { padding: 90px 0 48px; }
  .hero-badge { font-size: 0.72rem; }
  .hero h1 { font-size: 1.75rem; }
  .stat-item { flex-basis: 100%; border-right: none; }
  .stat-item:nth-child(odd) { border-right: none; }
  .stat-num { font-size: 1.5rem; }

  /* Buttons */
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; justify-content: center; }

  /* Stats bar stacked */
  .stats-bar { flex-direction: column; }
  .stat-item { border-bottom: 1px solid var(--clr-border); }
  .stat-item:last-child { border-bottom: none; }

  /* Products grid */
  .products-grid { grid-template-columns: 1fr !important; }

  /* Brand logos */
  .brand-logos { grid-template-columns: repeat(2, 1fr); }

  /* Industries */
  .industries-grid { grid-template-columns: repeat(2, 1fr); }

  /* Contact */
  .contact-info-card { flex-direction: column; gap: 10px; }

  /* Footer */
  .footer-social { justify-content: center; }
  .footer-brand .logo { justify-content: center; }
  .footer-brand p { text-align: center; margin: 0 auto 16px; }
  .footer-col { text-align: center; }
  .footer-col ul li a::before { display: none; }

  /* Cart panel */
  .cart-panel { width: 100vw; }
  .modal { padding: 24px 16px; }

  /* Why cards */
  .why-card { padding: 24px 20px; }

  /* Logo text truncate */
  .logo-tagline { display: none; }

  /* CTA */
  .cta-banner { padding: 28px 20px; }

  /* Breadcrumb */
  .breadcrumb { font-size: 0.75rem; flex-wrap: wrap; }

  /* Timeline */
  .timeline { padding-left: 24px; }

  /* Page hero */
  .page-hero { padding: 100px 0 48px; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  #header, #footer, .floating-buttons, .theme-switcher,
  .back-to-top, .cart-panel, .modal-overlay { display: none !important; }
  body { background: white; color: black; }
  .container { max-width: 100%; }
}

/* ============================================================
   UTILITY: Filter mobile button (hidden by default, shown on mobile)
   ============================================================ */
.filter-mobile-btn { display: none; }

/* ============================================================
   STICKY CATEGORY BAR on scroll
   ============================================================ */
.category-bar-sticky {
  position: sticky;
  top: 68px;
  z-index: 100;
  background: var(--clr-bg);
  padding: 0 0 1px;
  border-bottom: 1px solid var(--clr-border);
}

/* ============================================================
   PRODUCTS GRID responsive overrides
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CATEGORY PAGES: hero smaller on mobile
   ============================================================ */
@media (max-width: 768px) {
  .page-hero { padding: 100px 0 48px; }
  .page-hero h1 { font-size: 1.6rem; }
}

/* ============================================================
   HEADER: height adjustments
   ============================================================ */
@media (max-width: 768px) {
  .header-inner { padding: 12px 0; }
  .logo-name { font-size: 0.95rem; }
}

/* ============================================================
   TIMELINE: mobile condensed
   ============================================================ */
@media (max-width: 768px) {
  .timeline-entry { padding-bottom: 32px; }
  .timeline-entry h3 { font-size: 0.95rem; }
}

/* ============================================================
   BRANDS: 4→2 col on tablet
   ============================================================ */
@media (max-width: 900px) {
  .brand-logos { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .brand-logos { grid-template-columns: repeat(3, 1fr); }
}
