/* ==========================================================================
   Purisep Chromatography — Responsive Stylesheet
   USA Scientific Premium Edition
   ========================================================================== */

/* ==========================================================================
   Ultra Wide (1400px+)
   ========================================================================== */
@media (min-width: 1400px) {
  .container {
    max-width: 1340px;
  }
  .hero-content h1 {
    font-size: 4.5rem;
  }
  .section-title {
    font-size: 3rem;
  }
}

/* ==========================================================================
   Large Desktops (1200px – 1399px)
   ========================================================================== */
@media (max-width: 1199.98px) {
  .hero-content h1 {
    font-size: 3.4rem;
  }
  .card-header-stage {
    height: 240px;
  }
  .mega-menu-dropdown {
    width: 580px;
  }
}

/* ==========================================================================
   Medium Devices — Tablets & Laptops (768px – 991px)
   ========================================================================== */
@media (max-width: 991.98px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 60px;
    text-align: center;
  }

  .hero-content p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Center all page headers consistently on mobile */
  .page-header-premium,
  .page-header {
    text-align: center !important;
    padding-top: 120px !important;
    padding-bottom: 50px !important;
  }

  /* Center breadcrumbs and flex badges on mobile */
  .hero-content .breadcrumb,
  .page-header-premium .breadcrumb,
  .page-header .breadcrumb {
    justify-content: center !important;
  }

  .hero-content .section-eyebrow,
  .page-header-premium .section-eyebrow,
  .page-header .section-eyebrow {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  /* Center flex columns/buttons/badges in header/hero rows on mobile */
  .hero-content .d-flex.flex-wrap,
  .page-header-premium .d-flex.flex-wrap,
  .page-header .d-flex.flex-wrap {
    justify-content: center !important;
  }

  /* Center section title and lead descriptions on mobile for unified layout */
  .section-title {
    text-align: center !important;
  }

  .section-eyebrow {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  /* Center CTA sections on mobile */
  .cta-banner {
    text-align: center !important;
  }

  .cta-banner .section-eyebrow {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .cta-banner .d-flex {
    justify-content: center !important;
  }

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

  .stats-section-container {
    margin-top: 30px;
  }

  .stat-card {
    margin-bottom: 15px;
  }

  /* Sidebar filter on mobile — NOT sticky */
  .sidebar-filter {
    position: relative;
    top: 0;
    margin-bottom: 25px;
  }

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

  /* Mobile navbar — solid dark background for readability */
  .navbar-custom {
    padding: 12px 0;
    background: rgba(10, 35, 66, 0.98) !important;
    backdrop-filter: blur(20px) !important;
  }

  .navbar-custom .logo-text {
    color: #ffffff !important;
  }

  .navbar-brand {
    color: #ffffff !important;
  }

  .navbar-brand svg {
    color: #3BC9FF !important;
    fill: #3BC9FF !important;
  }

  .navbar-collapse .nav-link {
    color: #0A2342 !important;
    padding: 12px 16px !important;
    border-radius: 10px;
    margin: 2px 0;
    transition: all 0.25s ease;
  }

  .navbar-collapse .nav-link:hover,
  .navbar-collapse .nav-link.active {
    color: #0F62FE !important;
    background: rgba(15, 98, 254, 0.05) !important;
  }

  /* Hide the underline pseudo-element on mobile nav links */
  .navbar-collapse .nav-link::after {
    display: none !important;
  }

  /* Force wishlist drawer hidden on mobile unless explicitly opened via JS */
  .wishlist-drawer {
    visibility: hidden !important;
    transform: translateX(100%) !important;
  }

  .wishlist-drawer.open {
    visibility: visible !important;
    transform: translateX(0) !important;
  }

  .wishlist-backdrop {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .wishlist-backdrop.open {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .btn-close-wishlist {
    position: relative !important;
    z-index: 15 !important;
    pointer-events: auto !important;
    padding: 10px !important;
  }

  .btn-close-wishlist i {
    pointer-events: none;
  }

  .navbar-toggler-icon {
    filter: invert(1);
  }

  /* Hide mega-menu on mobile */
  .mega-menu-dropdown {
    display: none !important;
  }

  /* Corp stat strip — 2 columns */
  .corp-stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .corp-stat-item:nth-child(odd) {
    border-right: 1px solid rgba(255,255,255,0.08);
  }

  .corp-stat-item:nth-last-child(-n+2) {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 10px;
  }

  /* Page header */
  .page-header-premium {
    padding: 120px 0 50px;
  }

  .page-header-premium h1 {
    font-size: 2.2rem !important;
  }

  /* Floating mobile filter button (FAB) */
  .mobile-filter-fab-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1040; /* High enough to float over footer, but below wishlist drawer overlay */
    width: auto;
    pointer-events: none;
  }

  .mobile-filter-fab {
    pointer-events: auto;
    background: linear-gradient(135deg, #0F62FE 0%, #0A2342 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 12px 28px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 8px 30px rgba(15, 98, 254, 0.45) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
  }

  .mobile-filter-fab:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 35px rgba(15, 98, 254, 0.55) !important;
  }

  .mobile-filter-fab:active {
    transform: translateY(0) scale(0.98);
  }
}

/* ==========================================================================
   Small Devices — Mobile Phones (576px – 767px)
   ========================================================================== */
@media (max-width: 767.98px) {
  .hero-content h1 {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
  }

  .hero {
    padding-top: 110px;
    padding-bottom: 50px;
  }

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

  .section-padding {
    padding: 70px 0;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  /* 3D Showcase — smaller on mobile */
  .showcase-3d-stage {
    max-width: 320px;
    margin: 0 auto;
  }

  /* Stats glass wrapper */
  .stats-glass-wrapper {
    border-radius: 18px;
    padding: 28px 20px !important;
  }

  /* Feature icon grid — 2 cols on mobile */
  .feature-icon-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* CTA Banner */
  .cta-banner {
    padding: 60px 0;
  }

  .cta-banner h2 {
    font-size: 1.8rem;
  }

  /* Corp stat strip — single column on small mobile */
  .corp-stat-item {
    border-right: none !important;
  }

  .corp-stat-number {
    font-size: 2rem;
  }

  /* Contact type cards */
  .contact-type-card {
    padding: 24px 20px;
  }

  /* Filter sidebar */
  .sidebar-filter-premium {
    padding: 20px;
  }

  /* Footer */
  .footer {
    padding: 60px 0 0;
  }

  .footer-cert-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

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

  .footer-bottom-links {
    justify-content: center;
  }
}

/* ==========================================================================
   Extra Small Devices (< 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
  .hero-content h1 {
    font-size: 1.9rem;
  }

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

  .section-padding {
    padding: 56px 0;
  }

  .btn-custom {
    padding: 11px 22px;
    font-size: 0.9rem;
  }

  .trust-badge-row {
    gap: 8px;
  }

  .trust-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
  }

  .corp-stat-strip {
    padding: 28px 20px;
  }

  .mega-menu-dropdown {
    display: none !important;
  }

  .section-eyebrow {
    font-size: 0.68rem;
  }
}

/* ==========================================================================
   Preloader — always full-screen
   ========================================================================== */
#preloader {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  overflow: hidden !important;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .navbar-custom,
  #preloader,
  .cta-banner,
  footer,
  #wishlist-drawer,
  #wishlist-backdrop {
    display: none !important;
  }

  body {
    color: #000;
    background: white;
    font-size: 12pt;
  }

  .hero {
    background: white;
    color: #000;
    min-height: auto;
    padding: 20px 0;
  }
}
