/* ==========================================================================
   RESPONSIVE DESIGN / MEDIA QUERIES
   ========================================================================== */

/* 1200px - Large Desktops */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 992px - Desktops & Tablets */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

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

    /* Hero Section */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 0;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

    .hero-actions {
        justify-content: center;
    }

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

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Product Detail */
    .product-detail-grid {
        gap: 2rem;
    }
}

/* 768px - Tablets & Large Phones */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }

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

    /* Navigation - Mobile Menu */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--surface);
        flex-direction: column;
        gap: 0;
        border-bottom: 2px solid var(--border-dark);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-item:last-child .nav-link {
        border-bottom: none;
    }

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

    /* Product Detail */
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    /* Cart */
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: relative;
        top: 0;
    }
    
    .cart-table th, .cart-table td {
        padding: 1rem;
    }
}

/* 576px - Mobile Phones */
@media (max-width: 576px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }

    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Utilities */
    .pt-5 { padding-top: 2rem; }
    .pb-5 { padding-bottom: 2rem; }

    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero-title {
        font-size: 2.25rem;
    }

    /* Buttons */
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }
    
    .add-to-cart-form {
        flex-direction: column;
    }
    
    .btn-add-to-cart {
        width: 100%;
    }

    /* Cart Table Responsive */
    .cart-table thead {
        display: none;
    }

    .cart-table tbody tr {
        display: block;
        border: 2px solid var(--border-dark);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 1rem;
        position: relative;
    }

    .cart-table td {
        display: block;
        padding: 0.5rem 0;
        border-bottom: none;
        text-align: right;
    }

    .cart-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
    }

    .cart-table td:first-child {
        text-align: left;
        padding-top: 0;
    }
    
    .cart-table td:first-child::before {
        display: none;
    }
    
    .btn-remove {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer {
        padding-top: 3rem;
    }
    
    .announcement-bar {
        font-size: 0.75rem;
    }
}
