/* ==========================================================================
   Brobond Chemical Importer & Wholesaler - 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) {

  .company-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }


  .formulation-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  .formulation-stats {
    flex-direction: column;
    gap: 15px;
  }
  .formulation-stats .stat-item {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
  }
  .formulation-stats .stat-item:first-child {
    border-top: none;
    padding-top: 0;
  }


  /* About Page Responsive */
  .about-hero-title {
    font-size: 1.8rem;
  }
  .about-grid, .about-grid-rev {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .about-grid-rev .about-img-col {
    order: -1;
  }
  .about-features {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .about-values {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .top-bar {
    display: none;
  }

  .header-inner {
    height: 70px;
  }

  .brand-logo img {
    height:  50px;
  }

  .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: 990;
  }

  .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: 20px;
    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;
  }

  /* Hero Flex Reordering for Mobile */
  .hero-grid {
    display: flex !important;
    flex-direction: column;
  }
  .hero-content {
    display: contents;
  }
  .hero-badge { order: 1; margin-bottom: 5px; }
  .hero-title { order: 2; margin-bottom: 5px; }
  .hero-showcase { order: 3; margin-bottom: 5px; width: 100%; }
  .hero-subtitle { order: 4; margin-bottom: 10px; }
  .hero-cta-group { order: 5; margin-bottom: 15px; }
  .hero-trust-row { order: 6; }

}

/* Mobile Phones (Max 767px) */
@media (max-width: 767px) {

  .company-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hero-grid { gap: 5px; }


  /* Light Hero Mobile Overrides */
  .light-hero {
    padding: 30px 0 40px;
  }
  .hero-title-light {
    font-size:  1.6rem;
    line-height: 1.2;
    margin-bottom: 15px;
  }
  .hero-subtitle-light {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  .hero-badge-light {
    font-size:  0.6rem;
    padding: 4px 12px;
  }
  .hero-trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:  5px;
  }
  .trust-card {
    align-items: flex-start;
  }
  .trust-icon {
    width:  30px; height:  30px;
    font-size: 0.9rem;
  }
  .trust-text {
    font-size:  0.65rem;
  
    text-align: left;}
  .btn-red-pill, .btn-outline-pill {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 12px;
  }
  .hero-bg-slider .bg-slide {
    background-position: 70% center; 
  }
  /* Overlay to make text readable on mobile over the background */
  .hero-bg-slider::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.75) 50%, rgba(255,255,255,0.3) 100%);
    z-index: 5;
  }
  .light-hero .container {
    position: relative;
    z-index: 10;
  }
  
  .hero-bottom-badge {
    position: relative;
    bottom: auto;
    left: auto;
    padding: 15px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.05));
    margin-top: 30px;
    flex-direction: column;
    text-align: center;
  }
  .hero-bottom-badge .icon-box {
    margin: 0 auto 5px;
  }
  .hero-bottom-badge::before {
    left: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    border-radius: 15px;
  }


  
  


  


  


  


  /* Footer Responsive */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 15px;
  }
  .footer-bottom > div {
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.6;
  }
  
  .footer-logo {
    justify-content: center;
    margin-bottom: 20px;
  }
  .footer-col > div[style*="display: flex"] {
    justify-content: center;
    flex-wrap: wrap;
  }
  


  /* Contact Page Responsive */
  .contact-info-panel {
    padding: 25px;
  }
  .form-card {
    padding: 25px;
  }
  .form-title {
    font-size: 1.5rem;
  }
  .contact-map-iframe {
    height: 300px;
  }


  .tab-nav {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }

.detail-title { font-size: 1.7rem; margin-bottom: 8px; }
  .detail-header-tag { font-size: 0.75rem; }
  .detail-packing-info { padding: 12px; font-size: 0.85rem; }
  .detail-actions { gap: 10px; margin-bottom: 25px; }

  .hero-card-stack img {
    height: 250px !important;
  }
  .hero-card-floating {
    left: 50% !important;
    transform: translateX(-50%);
    bottom: 10px !important;
    width: 90%;
    max-width: none;
    padding: 10px 12px;
  }


  .hero-trust-row {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    align-items: center;
  }
  .trust-item {
    font-size:  11px;
  }


  .hero-section {
    padding: 20px 0;
  }
  .hero-badge {
    font-size: 8px;
    padding: 5px 10px;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 8px; text-align: justify;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  
  .stats-section {
    padding: 25px 0;
    margin-top: -15px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: #ffffff;
    z-index: 10;
    position: relative;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .stat-box {
    padding: 12px;
    text-align: center;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
  }
  .stat-number {
    font-size:  16px;
    margin-bottom: 5px;
  }
  .stat-label {
    font-size:  9.5px;
    line-height: 1.3;
    margin-bottom: 4px;
  }
  .stat-desc {
    font-size:  8px;
    line-height: 1.4;
  }


  .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 {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .sub-badge-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 15px;
    row-gap: 2px;
    align-items: center;
    text-align: left;
    padding: 12px 15px;
  }
  .sub-badge-card i {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    font-size: 1.5rem;
    margin-bottom: 0;
  }
  .sub-badge-card strong {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    margin-right: 0;
    white-space: normal;
  }
  .sub-badge-card span {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
  }



  .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-showcase:hover .hero-card-floating {
    transform: translateX(-50%) !important;
  }
  .hero-card-stack {
    transform: none !important;
  }


  .product-card-footer {
    flex-direction: column;
    gap: 10px;
  }
  .product-card-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-subtitle { font-size: 8px; text-align: justify; }
  .hero-title {
    font-size: 1.5rem;
  }

  .btn {
    width: 100%;
  }

  
  .hero-cta-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
  }
  .hero-cta-group .btn {
    width: 50%;
    padding: 10px 5px;
    font-size:  9px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero-cta-group .btn i {
    display: none;
  }
.filter-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

@media (max-width: 767px) {

  .tab-nav {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }

.detail-title { font-size: 1.7rem; margin-bottom: 8px; }
  .detail-header-tag { font-size: 0.75rem; }
  .detail-packing-info { padding: 12px; font-size: 0.85rem; }
  .detail-actions { gap: 10px; margin-bottom: 25px; }
  html, body { overflow-x: hidden; }
  .spec-table-wrap { width: 100%; }
}

@media (max-width: 991px) { .quote-btn-item { margin-top: 15px; padding: 0 15px; width: 100%; border-bottom: none !important; } }
