/**
 * GRASTE SURGICAL® - Responsive & Zero-Overlap Stylesheet
 * Strict breakpoints: 320px, 375px, 390px, 430px, 768px, 1024px, 1280px, 1440px, 1920px
 */

/* ==========================================================================
   DESKTOP & LARGE SCREENS (>= 1280px to 1920px)
   ========================================================================== */
@media (min-width: 1440px) {
  :root {
    --container-max: 1360px;
  }
  .hero-home {
    padding: 6.5rem 0;
  }
}

/* ==========================================================================
   LAPTOP & TABLET LANDSCAPE (< 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
  .nav-menu {
    gap: 1.1rem;
  }
  .nav-link {
    font-size: 0.9rem;
  }
  .brand-logo img {
    height: 42px;
  }
  .hero-home-inner {
    grid-template-columns: 1fr 0.9fr;
    gap: 2.5rem;
  }
  .footer-top {
    grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   TABLET PORTRAIT (< 1024px) - NAVIGATION COLLAPSE BREAKPOINT
   Switch to mobile off-canvas drawer BEFORE any desktop menu collision can occur
   ========================================================================== */
@media (max-width: 1023.98px) {
  .header-topbar {
    display: none; /* Hide topbar on mobile/tablets to prevent clutter */
  }

  .nav-menu {
    display: none; /* Collapse desktop menu */
  }

  .mobile-toggle {
    display: flex; /* Show clean hamburger button */
  }

  .header-actions .btn-primary {
    display: none; /* Hide desktop quote button in header, available inside mobile drawer */
  }

  .header-navbar {
    padding: 0.75rem 0;
  }

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

  .hero-home-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content {
    align-items: center;
  }

  .hero-badge {
    margin: 0 auto;
  }

  .hero-description {
    margin: 0 auto;
  }

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

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

  .product-gallery-sticky {
    position: static;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* ==========================================================================
   SMALL TABLET & LARGE MOBILE (< 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
  .section-padding {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .product-filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .catalog-search-box {
    width: 100%;
  }

  .category-pills {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .category-pill {
    flex-shrink: 0;
  }

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

  .mfg-stages-grid {
    grid-template-columns: 1fr;
  }

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

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

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

/* ==========================================================================
   MOBILE DEVICES (430px, 390px, 375px, 320px)
   ========================================================================== */
@media (max-width: 639.98px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

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

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

  .detail-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions-bar .btn {
    width: 100%;
  }

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

  .brand-logo img {
    height: 34px;
    max-width: 220px;
  }

  .floating-whatsapp {
    right: 14px;
    bottom: 16px;
  }

  .floating-whatsapp-btn {
    width: 50px;
    height: 50px;
  }

  .floating-whatsapp-tooltip {
    display: none; /* Hide tooltip on small mobile screens to prevent overflow */
  }

  .table-specs th,
  .table-specs td {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   MINIMUM ULTRA-COMPACT SMARTPHONES (<= 360px - e.g. iPhone SE 1st gen / 320px)
   ========================================================================== */
@media (max-width: 360px) {
  .brand-logo img {
    height: 30px;
    max-width: 185px;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .quote-basket-trigger {
    width: 38px;
    height: 38px;
  }

  .mobile-toggle {
    width: 38px;
    height: 38px;
  }

  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .btn {
    padding: 0.7rem 1.15rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION PREFERENCES
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .floating-whatsapp-btn {
    animation: none;
  }
}

/* Print Stylesheet */
@media print {
  .site-header,
  .floating-whatsapp,
  .site-footer,
  .btn,
  .quote-drawer,
  .quote-drawer-backdrop {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}

