/* ==========================================================================
   Brobond Chemical Manufacturer & Importer - Responsive Stylesheet
   Breakpoints: 1200px, 992px, 768px, 576px
   ========================================================================== */

/* Large Tablets & Small Laptops (Max 1199px) */
@media (max-width: 1199px) {
  .hero-title {
    font-size: 2.7rem;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .app-cards-showcase-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .stat-box {
    border-right: none;
    padding: 10px;
  }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablets (Max 991px) */
@media (max-width: 991px) {
  .top-bar-left, .top-bar-right {
    justify-content: center;
    width: 100%;
  }
  .top-bar-inner {
    text-align: center;
    justify-content: center;
  }

  .header-inner {
    height: 70px;
  }

  .brand-logo img {
    height: 40px;
  }

  .main-nav {
    margin: 0;
  }

  /* Mobile Navigation Drawer */
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 40px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    gap: 0;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1400;
  }

  .nav-menu-backdrop.open {
    display: block;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-link {
    width: 100%;
    padding: 14px 0;
    font-size: 1.05rem;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 10px 15px;
    display: none;
  }

  .dropdown-menu.mega-dropdown,
  .dropdown-menu.product-dropdown {
    position: static;
    width: 100%;
    max-width: 100%;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    display: none;
    background: transparent;
  }

  .nav-item.dropdown-open .dropdown-menu,
  .nav-item.dropdown-open .dropdown-menu.product-dropdown,
  .nav-item.dropdown-open .dropdown-menu.mega-dropdown {
    display: block;
  }

  .mega-dropdown-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 10px 0;
  }

  .mega-dropdown-header, .mega-dropdown-footer {
    display: none; /* Keep mobile drawer clean and fast */
  }

  .mega-item {
    padding: 8px 6px;
    border-bottom: 1px dashed var(--border-color);
  }

  .mega-item:last-child {
    border-bottom: none;
  }

  .btn-whatsapp-header {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-trust-row {
    justify-content: center;
  }

  .hero-card-floating {
    left: 20px;
    bottom: 20px;
  }

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

  .detail-gallery {
    position: static;
  }

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

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

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

/* Mobile Phones (Max 767px) */
@media (max-width: 767px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .stats-section {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
  }

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

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

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

  .app-cards-showcase-grid {
    grid-template-columns: 1fr !important;
  }

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

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

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

  .detail-main-img img {
    max-height: 280px;
  }

  .detail-sub-badges {
    grid-template-columns: 1fr;
  }

  .inquiry-strip-inner {
    text-align: center;
    justify-content: center;
  }

  .inquiry-actions {
    justify-content: center;
    width: 100%;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
  }

  .toast-container {
    right: 15px;
    left: 15px;
  }

  .toast {
    min-width: unset;
    width: 100%;
  }
}

/* Extra Small (Max 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .btn {
    width: 100%;
  }

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

  .tab-nav {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
    padding-bottom: 5px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}
