/* ==============================================================================
 * 0. DESKTOP SCREENS (Min 769px) - STRICT NAVBAR LAYOUT
 * ============================================================================== */
@media (min-width: 769px) {
  .site-header {
    height: 80px;
  }

  .main-nav {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    overflow: visible !important;
  }

  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2.25rem !important;
    margin: 0 !important;
    width: auto !important;
  }

  .nav-link {
    display: inline-flex !important;
    padding: 0.5rem 0.25rem !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .nav-link-content {
    display: inline-flex !important;
  }

  /* Force hide all mobile-drawer-only elements on desktop */
  .drawer-header,
  .mobile-nav-cta,
  .mobile-nav-toggle,
  .nav-backdrop,
  .nav-icon,
  .nav-arrow {
    display: none !important;
  }
}

/* ==============================================================================
 * 1. LARGE TABLETS & SMALL LAPTOPS (Max 1024px)
 * ============================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 0.9fr;
    gap: 2.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .features-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

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

  .about-preview-grid {
    gap: 2.5rem;
  }

  .shop-controls-grid {
    grid-template-columns: 1.8fr 1.2fr 1fr;
  }
}

/* ==============================================================================
 * 2. TABLETS & MOBILE BREAKPOINT (Max 768px)
 * ============================================================================== */
@media (max-width: 768px) {
  /* Container & Section Padding */
  .container {
    padding: 0 1.25rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

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

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

  /* Header Optimization */
  .site-header {
    height: 72px;
    background-color: #FFFFFF;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 1050;
  }

  .header-container {
    height: 72px;
    gap: 0.75rem;
  }

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

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-tagline {
    font-size: 0.68rem;
  }

  .header-actions {
    gap: 0.6rem;
  }

  .btn-header-cta {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }

  /* Mobile Toggle Button */
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    z-index: 1051;
  }

  /* ==========================================================================
     MOBILE DRAWER & BACKDROP ARCHITECTURE (ZERO BLUR BLEED)
     ========================================================================== */
  
  /* Backdrop Blur Overlay - Sits BELOW drawer, blurs only page content */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Mobile Slide-out Drawer - Crystal clear white surface, above backdrop */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 330px;
    height: 100vh;
    height: 100dvh;
    background-color: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: -8px 0 35px rgba(15, 23, 42, 0.25);
    padding: 1.25rem 1.5rem 2rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1060;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.is-open {
    right: 0;
  }

  /* Drawer Header */
  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
  }

  .drawer-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
  }

  .drawer-brand span {
    color: var(--color-secondary);
  }

  .drawer-close-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background-color: var(--color-gray-100);
    border: 1px solid var(--color-border);
    color: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
  }

  .drawer-close-btn:hover {
    background-color: #FEE2E2;
    color: #EF4444;
    border-color: #FCA5A5;
  }

  .drawer-close-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Drawer Navigation Links */
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .nav-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 0.95rem;
    border-radius: var(--radius-md);
    background-color: var(--color-gray-50);
    border: 1px solid var(--color-border);
    transition: var(--transition);
  }

  .nav-link-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
  }

  .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(6, 33, 61, 0.08);
    color: var(--color-primary);
    flex-shrink: 0;
    transition: var(--transition);
  }

  .nav-arrow {
    display: flex;
    align-items: center;
    color: var(--color-text-muted);
    transition: var(--transition);
  }

  .nav-link:hover {
    background-color: #FFFFFF;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    box-shadow: 0 2px 8px rgba(0, 132, 214, 0.1);
  }

  .nav-link:hover .nav-icon {
    background-color: rgba(0, 132, 214, 0.12);
    color: var(--color-secondary);
  }

  .nav-link:hover .nav-arrow {
    transform: translateX(3px);
    color: var(--color-secondary);
  }

  .nav-link.active {
    background-color: rgba(0, 132, 214, 0.08);
    color: var(--color-secondary);
    border-color: rgba(0, 132, 214, 0.3);
    font-weight: 700;
  }

  .nav-link.active .nav-icon {
    background-color: var(--color-secondary);
    color: #FFFFFF;
  }

  .nav-link.active .nav-arrow {
    color: var(--color-secondary);
  }

  .nav-link.active::after {
    display: none;
  }

  /* Drawer Action Footer */
  .mobile-nav-cta {
    display: block;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
  }

  .mobile-nav-cta .btn {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
  }

  .drawer-contact-strip {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
  }

  .drawer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .drawer-contact-item svg {
    width: 16px;
    height: 16px;
    color: var(--color-secondary);
  }

  /* ==========================================================================
     HERO SECTION (MOBILE)
     ========================================================================== */
  .hero-section {
    padding: 2.5rem 0 3.25rem 0;
  }

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

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-badge {
    margin: 0 auto 1.15rem auto;
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
    max-width: 100%;
    justify-content: center;
  }

  .hero-title {
    font-size: 2.15rem;
    line-height: 1.18;
    margin-bottom: 0.85rem;
  }

  .hero-description {
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
  }

  .hero-trust-chips {
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
  }

  .hero-trust-chip {
    font-size: 0.76rem;
    padding: 0.3rem 0.65rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
  }

  .hero-cta-group .btn,
  .btn-hero-primary,
  .btn-hero-whatsapp {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 0.98rem;
    justify-content: center;
  }

  .hero-quick-call {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
  }

  .hero-brand-bar {
    padding-top: 1.25rem;
  }

  .hero-brand-badges {
    justify-content: center;
    gap: 0.5rem;
  }

  .brand-badge-item {
    font-size: 0.8rem;
    padding: 0.3rem 0.65rem;
  }

  .hero-visual {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }

  /* ==========================================================================
     FEATURE & SERVICE GRIDS (MOBILE)
     ========================================================================== */
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .features-grid,
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-box,
  .service-card {
    padding: 1.75rem 1.5rem;
  }

  .about-preview-grid,
  .showroom-feature-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  /* ==========================================================================
     MINI SHOP CATALOG (MOBILE)
     ========================================================================== */
  .shop-controls-bar {
    padding: 1.25rem;
    margin-bottom: 2rem;
  }

  .shop-controls-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .search-input {
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    padding: 0.85rem 1rem 0.85rem 2.75rem;
  }

  .filter-category-group {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 0.4rem;
    -webkit-overflow-scrolling: touch;
  }

  .category-tab-btn {
    flex: 1 0 auto;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .sort-select-wrapper select {
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    padding: 0.85rem 1rem;
  }

  .brand-filters-row {
    margin-top: 1rem;
    padding-top: 0.85rem;
  }

  #brand-pills-container {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 0.4rem;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .brand-pill {
    flex-shrink: 0;
    white-space: nowrap;
  }

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

  /* ==========================================================================
     PRODUCT DETAILS MODAL (MOBILE)
     ========================================================================== */
  .modal-backdrop {
    padding: 1rem;
    z-index: 2000;
  }

  .modal-window {
    max-height: 92vh;
    border-radius: var(--radius-md);
  }

  .modal-content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem;
  }

  .modal-img-container {
    padding: 1rem;
    max-height: 220px;
  }

  .modal-img {
    max-height: 180px;
  }

  .modal-info-title {
    font-size: 1.4rem;
  }

  .modal-specs-table {
    font-size: 0.85rem;
  }

  .modal-specs-table th {
    width: 40%;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .modal-actions .btn {
    width: 100%;
    padding: 0.85rem;
  }

  /* ==========================================================================
     CONTACT PAGE (MOBILE)
     ========================================================================== */
  .contact-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 2.25rem !important;
  }

  .contact-layout-grid form > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .form-control {
    font-size: 16px; /* Prevents auto-zoom on iOS */
    padding: 0.85rem 1rem;
  }

  #contact-map-section iframe {
    height: 280px !important;
  }

  /* ==========================================================================
     CTA & FOOTER (MOBILE)
     ========================================================================== */
  .cta-title {
    font-size: 1.85rem;
  }

  .cta-description {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .cta-buttons .btn {
    width: 100%;
  }

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

  .footer-brand {
    max-width: 100%;
  }

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

/* ==============================================================================
 * 3. SMALL MOBILE PHONES (Max 480px)
 * ============================================================================== */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

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

  .brand-name {
    font-size: 1.15rem;
  }

  .btn-header-cta span {
    display: none;
  }

  .btn-header-cta {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
  }

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

  .product-actions-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .floating-whatsapp {
    bottom: 1.25rem;
    right: 1.25rem;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
  }
}
