/* === TABLET (1024px) === */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .about-grid {
        gap: 30px;
    }

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

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

    .checkout-summary {
        position: static;
    }

    .product-detail {
        gap: 30px;
    }
}

/* === MOBILE (768px) === */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }

    /* --- Scroll lock when nav open --- */
    body.nav-open {
        overflow: hidden;
    }

    .hamburger {
        display: flex;
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cream);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--beige);
        z-index: 999;
    }

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

    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section {
        padding: 40px 0;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: static;
    }

    /* --- Product specs table --- */
    .product-specs table {
        width: 100%;
    }

    .product-specs td {
        display: block;
        padding: 6px 0;
    }

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

    .about-image img {
        height: 250px;
    }

    /* --- About image placeholder (inline height override) --- */
    .about-image div {
        height: auto !important;
        min-height: 150px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

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

    .footer-grid,
    .footer-grid-4 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .page-content {
        padding: 25px;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    /* --- Cart: card layout on mobile --- */
    .cart-table {
        font-size: 0.9rem;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        padding: 15px;
        margin-bottom: 15px;
        border: 1px solid var(--beige);
        border-radius: 8px;
        background: var(--cream);
    }

    .cart-table td {
        padding: 6px 0;
        text-align: right;
        border: none;
    }

    .cart-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
    }

    .cart-table td:first-child {
        text-align: left;
        padding-bottom: 10px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--beige);
    }

    .cart-table td:first-child::before {
        display: none;
    }

    .cart-table .cart-product {
        justify-content: flex-start;
    }

    .cart-table .cart-product img {
        width: 50px;
        height: 50px;
    }

    .cart-table .btn-sm {
        min-height: 44px;
        min-width: 44px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 15px;
    }

    .add-to-cart-form {
        flex-direction: column;
        align-items: stretch;
    }

    /* --- Category filter: horizontal scroll --- */
    .category-filter {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 8px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .category-filter::-webkit-scrollbar {
        display: none;
    }

    .category-filter a {
        padding: 6px 14px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* --- Touch-friendly: quantity buttons --- */
    .quantity-input button {
        min-width: 44px;
        min-height: 44px;
    }

    .lightbox-nav {
        font-size: 2rem;
        padding: 10px;
    }
}

/* === SMALL MOBILE (480px) === */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card-body {
        padding: 15px;
    }

    .container {
        padding: 0 15px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    /* --- Logo text: smaller on tiny screens --- */
    .logo-text {
        font-size: 1rem;
    }

    /* --- Gallery: tighter gap --- */
    .gallery-grid {
        gap: 6px;
    }
}
