/* Global Responsive Adjustments */

/* Desktop / Large Laptops (Max Width 1200px) */
@media(max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet / Smaller Laptops (Max Width 992px) */
@media(max-width: 992px) {
  /* Layout Grids */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-wrapper, .hero-content, .about-check {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  
  .hero-left { order: 2; }
  .hero-right { order: 1; margin-bottom: 2rem; }
  .hero-left h1 { font-size: 32px; }
  .hero-action { justify-content: center; }
  
  /* Navbar */
  .navbar {
    flex-wrap: wrap;
  }
  .search-form {
    order: 3;
    width: 100%;
    margin-top: 10px;
    margin-right: 0;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--color-surface);
    position: absolute;
    top: 70px;
    left: 0;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  .nav-menu.active {
    display: flex;
  }
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
  }
  
  /* Cart & Checkout */
  .cart-grid, .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Details Page */
  .detail-wrapper {
    grid-template-columns: 1fr;
  }
  
  /* Dashboard */
  .dashboard-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Mobile Phones (Max Width 768px) */
@media(max-width: 768px) {
  /* Typography */
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  
  /* Spacing */
  .section {
    padding: 2rem 1rem;
  }
  
  /* Auth Cards */
  .auth-card {
    width: 100%;
    margin: 1rem auto;
    padding: 1.5rem;
    box-shadow: none;
    border: 1px solid #eee;
  }
  
  /* Product Grids */
  .product-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}
.product-card {
    flex: 0 0 70%;
    min-width: 200px;
    scroll-snap-align: start;
}
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Tables */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
  }
  
  table.table th, table.table td {
    white-space: nowrap;
    padding: 0.5rem;
  }
  
  /* Form Elements */
  .input-field, select, button {
    font-size: 16px; /* Prevents iOS auto-zoom on inputs */
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
}

/* Small Mobile (Max Width 480px) */
@media(max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-left h1 { font-size: 28px; }
  
  .navbar-right .count {
    top: -5px;
    right: -5px;
  }
}
