/**
 * PCbildbg - Responsive Media Queries & Mobile Optimizations
 */

/* Mobile Nav Toggle Button (Hidden on Desktop) */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  padding: 0.4rem;
  cursor: pointer;
}

.mobile-nav-toggle svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* 1200px and below (Small Desktop / Large Laptop) */
@media (max-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* 992px and below (Tablets & Smaller Displays) */
@media (max-width: 992px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  .top-bar-left .top-bar-item:nth-child(2) {
    display: none; /* Hide hours on medium screens to keep it clean */
  }
  
  .site-nav-bar {
    display: none; /* Collapsible or moved to mobile drawer */
  }
  
  .site-nav-bar.mobile-active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  }
  
  .site-nav-bar.mobile-active .nav-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  
  .site-nav-bar.mobile-active .main-menu {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
  }
  
  .site-nav-bar.mobile-active .nav-fast-call {
    display: none;
  }

  .header-row {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .brand {
    order: 1;
  }

  .header-actions {
    order: 2;
  }

  .header-hotline {
    display: none; /* Saved in mobile menu */
  }

  .header-search {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

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

  .builder-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .builder-perks {
    justify-content: center;
  }

  .builder-banner-media {
    max-width: 260px;
    margin: 0 auto;
  }

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

  .filter-sidebar {
    display: none; /* Toggleable filter panel on mobile */
  }

  .filter-sidebar.active {
    display: block;
  }

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

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

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

/* 768px and below (Phablets & Mobile Landscape) */
@media (max-width: 768px) {
  .top-bar-inner {
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
  }

  .top-bar-left, .top-bar-right {
    justify-content: center;
    gap: 0.75rem;
  }

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

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .product-card {
    padding: 0.85rem;
  }

  .product-thumb {
    height: 140px;
  }

  .card-cta-group {
    grid-template-columns: 1fr;
  }

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

  .footer-newsletter {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .newsletter-form {
    width: 100%;
    flex-direction: column;
  }

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

  .policy-card {
    padding: 1.5rem;
  }

  .thank-you-box {
    padding: 2rem 1.25rem;
  }
}

/* 480px and below (Small Smartphones) */
@media (max-width: 480px) {
  .brand-title {
    font-size: 1.3rem;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .action-text {
    display: none; /* Only show cart badge icon on compact mobile */
  }

  .search-category-select {
    display: none; /* Keep input clean on narrow phones */
  }

  .products-grid {
    grid-template-columns: 1fr; /* Full width cards for clarity */
  }

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

  .hero-main-banner {
    padding: 1.75rem 1.25rem;
  }

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

  .cookie-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 1rem;
  }
}
