/* Responsive Styles */

/* Large Devices (Desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .features-grid,
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .brand-item {
        width: calc(20% - 1rem);
    }
}

/* Medium Devices (Tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .search-bar {
        max-width: 300px;
        margin: 0 1rem;
    }
    
    .features-grid,
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brand-item {
        width: calc(25% - 1rem);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-layout {
        grid-template-columns: 200px 1fr;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .compatibility-list {
        grid-template-columns: 1fr;
    }
    
    .reviews-summary {
        flex-direction: column;
    }
    
    .average-rating {
        width: 100%;
        padding-right: 0;
        border-right: none;
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .rating-breakdown {
        padding-left: 0;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
    }
}

/* Small Devices (Landscape Phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    .top-bar .container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .main-header {
        padding: 0.75rem 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .search-bar {
        display: none;
    }
    
    .header-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .offers-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-item {
        width: calc(33.333% - 1rem);
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    .newsletter-form button {
        border-radius: 4px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .mobile-filter-toggle {
        display: block;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: var(--white);
        z-index: 2000;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
    }
    
    .filters-sidebar.active {
        left: 0;
    }
    
    .close-filters {
        display: block;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .coupon {
        width: 100%;
    }
    
    .coupon input {
        flex: 1;
    }
    
    .update-cart {
        width: 100%;
        justify-content: space-between;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        width: 100%;
        padding: 0 1rem;
    }
    
    .hero-banner {
        height: 400px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-item {
        width: calc(50% - 1rem);
    }
    
    .product-actions {
        flex-wrap: wrap;
    }
    
    .quantity-selector {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .add-to-cart-btn {
        flex: 1;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        padding: 0.75rem;
        text-align: center;
    }
}