/* ============================================
   H8 WooCommerce - Responsive
   ============================================ */

@media (max-width: 1024px) {
    .h8-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

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

    .h8-product-detail {
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .h8-wrap {
        padding: 40px 16px;
    }

    .h8-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .h8-product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .h8-detail-gallery {
        position: static;
    }

    .h8-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .h8-filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 340px;
        min-width: unset;
        height: 100vh;
        z-index: 1000;
        background: var(--h8-white);
        padding: 24px;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        display: block;
    }

    .h8-filter-sidebar.open {
        transform: translateX(0);
    }

    .h8-filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
    }

    .h8-filter-overlay.open {
        display: block;
    }

    .h8-filter-sidebar-header {
        padding-top: 8px !important;
    }

    .h8-filter-tags-row {
        gap: 8px;
    }

    .h8-filter-tags {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .h8-newsletter-inner {
        flex-direction: column;
        text-align: center;
    }

    .h8-newsletter-input {
        width: 200px;
    }

    .h8-detail-qty-row {
        flex-wrap: wrap;
    }

    .h8-placas-inputs {
        flex-direction: column;
    }

    .h8-listing-layout {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .h8-products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .h8-product-info {
        padding: 10px 12px 14px;
    }

    .h8-product-name {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .h8-product-actions {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 4px !important;
    }

    .h8-wrap .h8-qty-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        padding: 2px !important;
    }

    .h8-wrap .h8-qty-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    .h8-wrap .h8-qty-input {
        width: 28px !important;
        font-size: 13px !important;
    }

    .h8-wrap .h8-qty-selector {
        gap: 4px !important;
    }

    .h8-wrap .h8-product-card .h8-product-cart-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        padding: 4px !important;
        border-radius: 8px !important;
    }

    .h8-wrap .h8-product-card .h8-product-cart-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

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

    .h8-detail-title {
        font-size: 18px;
    }
}

/* Desktop only */
@media (min-width: 769px) {
    .h8-filter-sidebar-close {
        display: none;
    }

    .h8-filter-overlay {
        display: none !important;
    }
}
