/**
 * V28 Shop Page Styles
 * T-Shirt Planet — mytshirt.be
 *
 * Design system: Charcoal #363030 + Lime #C1E53E
 * Typography: Outfit / JetBrains Mono
 * Pattern: shadows > borders (V28 principle)
 *
 * Sections:
 *   1. Shop Page Layout
 *   2. Page Header
 *   3. Filter Sidebar (slide-in)
 *   4. Controls Bar
 *   5. Product Grid
 *   6. Product Cards
 *   7. Pagination
 *   8. Responsive: Large Tablet (≤1399px)
 *   9. Responsive: Tablet (≤1199px)
 *  10. Responsive: Mobile (≤899px)
 *  11. Responsive: Small (≤599px) — horizontal scroll
 *  12. Responsive: Tiny (≤480px)
 */

/* ═══════════════════════════════════════════
   1. SHOP PAGE LAYOUT
   ═══════════════════════════════════════════ */

.v28-shop-page {
    padding: 60px 0 100px;
    background: var(--paper, #fafafa);
}

.v28-shop-page .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}

/* Override Hello Elementor theme constraints */
body.archive.post-type-archive-product #main.site-main,
body.archive.post-type-archive-product .site-main,
body.archive.post-type-archive-product #primary.content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

/* Hide variation swatches plugin (CFVSW) on shop */
.v28-shop-page .cfvsw_variations_form,
.v28-shop-page .variations_form,
.v28-shop-page .cfvsw_shop_archive {
    display: none !important;
}

/* Hide duplicate WC archive page title */
.v28-shop-page .woocommerce-products-header__title {
    display: none !important;
}

/* ═══════════════════════════════════════════
   2. PAGE HEADER
   ═══════════════════════════════════════════ */

.v28-shop-header {
    margin-bottom: 20px;
}

.v28-shop-header .section-title {
font-size: clamp(36px, 5vw, 58px);
    font-weight: 800;
    line-height: 1.12;
    color: var(--ink, #363030);
    letter-spacing: -0.5px;
    margin: 0;
}

.v28-shop-header .section-subtitle {
    font-size: 24px;
    color: var(--ink-muted, #7a7575);
    max-width: 620px;
    margin-top: 8px;
    line-height: 1.7;
}

/* ═══════════════════════════════════════════
   3. FILTER SIDEBAR (SLIDE-IN PANEL)
   ═══════════════════════════════════════════ */

/* Overlay */
.v28-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.v28-filter-overlay.show {
    display: block;
    opacity: 1;
}

/* Sidebar panel */
.v28-shop-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 380px;
    max-width: 90vw;
    background: var(--white, #fff);
    z-index: 200;
    overflow-y: auto;
    padding: 0 24px 100px;
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
    transform: translateX(100%);
    border-radius: 0;
    border: 0;
    margin: 0;
}

.v28-shop-sidebar.sidebar-open {
    transform: translateX(0);
}

/* Sidebar header */
.v28-sidebar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--border-light, #eeecec);
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: var(--white, #fff);
    z-index: 1;
}

.v28-sidebar-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink, #363030);
}

.v28-sidebar-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--paper, #fafafa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--ink-muted, #7a7575);
    cursor: pointer;
    border: 0;
    transition: all 0.2s ease;
}

.v28-sidebar-modal-close:hover {
    background: var(--coral, #E63946);
    color: white;
}

/* Sidebar groups */
.v28-sidebar-group {
    margin-bottom: 28px;
}

.v28-sidebar-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary, #363030);
    margin-bottom: 14px;
}

.v28-sidebar-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    min-height: 44px;
font-size: 17px;
    color: var(--ink-soft, #4a4545);
    cursor: pointer;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.v28-sidebar-option:hover {
    color: var(--ink, #363030);
}

/* Checkbox indicator */
.v28-sidebar-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border, #e0dede);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.v28-sidebar-check.active {
    background: var(--primary, #363030);
    border-color: var(--primary, #363030);
    color: var(--secondary, #C1E53E);
}

/* Color swatches */
.v28-color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 0;
}

.v28-sidebar-color {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid var(--border, #e0dede);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.v28-sidebar-color:hover {
    transform: scale(1.15);
    border-color: var(--ink-muted, #7a7575);
}

.v28-sidebar-color.active {
    border-color: var(--primary, #363030);
    box-shadow: 0 0 0 3px rgba(54, 48, 48, 0.2);
}

/* ═══════════════════════════════════════════
   4. CONTROLS BAR
   ═══════════════════════════════════════════ */

.v28-shop-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.v28-shop-count {
font-size: 18px;
    color: var(--ink-muted, #7a7575);
}

.v28-shop-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filter toggle button */
.v28-filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--white, #fff);
    border: 1.5px solid var(--border, #e0dede);
    border-radius: var(--radius-btn, 6px);
font-size: 15px;
    font-weight: 600;
    color: var(--primary, #363030);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.v28-filter-toggle-btn:hover {
    border-color: var(--blue, #2D7FF9);
    background: var(--paper, #fafafa);
}

/* Sort dropdown — targets WooCommerce native select */
.v28-shop-sort .woocommerce-ordering {
    margin: 0;
}

.v28-shop-sort .woocommerce-ordering select,
.v28-shop-sort select {
    padding: 10px 16px;
    border: 2px solid var(--border, #e0dede);
    border-radius: var(--radius-btn, 6px);
font-size: 16px;
    color: var(--ink, #363030);
    background: var(--white, #fff);
    cursor: pointer;
    outline: 0;
    transition: border-color 0.25s ease;
}

.v28-shop-sort .woocommerce-ordering select:focus,
.v28-shop-sort select:focus {
    border-color: var(--coral, #E63946);
}

/* ═══════════════════════════════════════════
   5. PRODUCT GRID
   ═══════════════════════════════════════════ */

.v28-products-grid {
    display: block;
    width: 100%;
}

/* WooCommerce overrides — 5-column grid */
.v28-shop-page .products,
.v28-shop-page ul.products,
.v28-shop-page ul.products.columns-3,
.v28-shop-page ul.products.columns-4,
.v28-shop-page ul.products[class*="columns-"],
body.woocommerce .v28-shop-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
}

.v28-shop-page .products::before,
.v28-shop-page .products::after {
    display: none !important;
}

/* Kill WC default li float/width */
.v28-shop-page ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
}

/* ═══════════════════════════════════════════
   6. PRODUCT CARDS
   ═══════════════════════════════════════════ */

.v28-product-card {
    will-change: transform;
    background: var(--paper, #fafafa);
    border-radius: var(--radius, 10px);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1.5px solid var(--border-light, #eeecec);
}

.v28-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(54, 48, 48, 0.1), 0 4px 12px rgba(54, 48, 48, 0.06);
    border-color: transparent;
}

/* Product image */
.v28-product-img {
    aspect-ratio: 1 / 1;
    background: var(--paper-warm, #f5f4f4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.v28-product-img img,
.v28-product-img .v28-tee-visual {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Product info */
.v28-product-info {
    padding: 16px;
}

.v28-product-name {
font-size: 17px;
    font-weight: 600;
    color: var(--ink, #363030);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.v28-product-meta {
font-size: 12px;
    color: var(--ink-muted, #7a7575);
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    gap: 5px;
    margin-bottom: 8px;
}

.v28-product-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Language badges */
.badge-lang {
font-weight: 700;
    border-radius: 10px;
    letter-spacing: 0.3px;
    border: 0;
    line-height: 1.2;
    font-size: 10px;
    padding: 2px 7px;
}

.badge-lang-nl { color: var(--nl-color, #e85d3a); background: rgba(232, 93, 58, 0.08); }
.badge-lang-fr { color: var(--fr-color, #2563eb); background: rgba(37, 99, 235, 0.08); }
.badge-lang-de { color: var(--de-color, #16a34a); background: rgba(22, 163, 74, 0.08); }
.badge-lang-uni { color: var(--universal-color, #FFB74D); background: rgba(45, 127, 249, 0.08); }

/* Express badge */
.badge-express {
font-weight: 700;
    border-radius: 10px;
    border: 0;
    line-height: 1.2;
    font-size: 9px;
    padding: 2px 6px;
    color: var(--coral, #E63946);
    background: rgba(230, 57, 70, 0.06);
}

/* Product bottom row */
.v28-product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
}

.v28-product-price {
font-size: 22px;
    font-weight: 700;
    color: var(--primary, #363030);
}

/* WooCommerce price overrides inside cards */
.v28-product-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.v28-product-price del {
    opacity: 0.5;
    font-size: 0.75em;
}

.v28-product-price ins {
    text-decoration: none;
}

/* Wear It / Try-On button */
.v28-wear-it-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
font-size: 14px;
    font-weight: 600;
    padding: 7px 16px;
    background: #fff;
    color: var(--primary, #363030);
    border: 1.5px solid var(--primary, #363030);
    flex-shrink: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s ease;
}

.v28-wear-it-btn:hover {
    background: var(--primary, #363030);
    color: #fff;
    border-color: var(--primary, #363030);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   7. PAGINATION
   ═══════════════════════════════════════════ */

.v28-shop-page .woocommerce-pagination {
    margin-top: 40px;
    text-align: center;
}

.v28-shop-page .woocommerce-pagination ul {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.v28-shop-page .woocommerce-pagination ul li a,
.v28-shop-page .woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-btn, 6px);
font-size: 16px;
    font-weight: 600;
    color: var(--ink, #363030);
    background: var(--white, #fff);
    border: 1.5px solid var(--border-light, #eeecec);
    transition: all 0.2s ease;
    text-decoration: none;
}

.v28-shop-page .woocommerce-pagination ul li a:hover {
    border-color: var(--blue, #2D7FF9);
    color: var(--blue, #2D7FF9);
    box-shadow: 0 4px 12px rgba(54, 48, 48, 0.08);
}

.v28-shop-page .woocommerce-pagination ul li span.current {
    background: var(--primary, #363030);
    color: var(--secondary, #C1E53E);
    border-color: var(--primary, #363030);
}

/* ═══════════════════════════════════════════
   8. RESPONSIVE: LARGE TABLET (≤1399px)
   ═══════════════════════════════════════════ */

@media (min-width: 1200px) and (max-width: 1399px) {
    .v28-shop-page .products,
    .v28-shop-page ul.products,
    .v28-shop-page ul.products[class*="columns-"],
    body.woocommerce .v28-shop-page ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 18px !important;
    }
}

/* ═══════════════════════════════════════════
   9. RESPONSIVE: TABLET (≤1199px)
   ═══════════════════════════════════════════ */

@media (min-width: 900px) and (max-width: 1199px) {
    .v28-shop-page .products,
    .v28-shop-page ul.products,
    .v28-shop-page ul.products[class*="columns-"],
    body.woocommerce .v28-shop-page ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
    }
    .v28-product-info { padding: 14px; }
    .v28-wear-it-btn { padding: 6px 14px; }
}

/* ═══════════════════════════════════════════
   10. RESPONSIVE: MOBILE (≤899px)
   ═══════════════════════════════════════════ */

@media (min-width: 600px) and (max-width: 899px) {
    .v28-shop-page .products,
    .v28-shop-page ul.products,
    .v28-shop-page ul.products[class*="columns-"],
    body.woocommerce .v28-shop-page ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    .v28-product-info { padding: 12px; }
    .v28-wear-it-btn { padding: 5px 12px; }
}

/* ═══════════════════════════════════════════
   11. RESPONSIVE: SMALL (≤599px) — HORIZONTAL SCROLL
   ═══════════════════════════════════════════ */

@media (max-width: 599px) {
    .v28-shop-page {
        padding: 16px 0 40px;
    }
    .v28-shop-page .container {
        padding: 0 16px;
    }
    .v28-shop-header {
        margin-bottom: 12px;
    }

    /* Horizontal scroll — single row of cards */
    .v28-shop-page .products,
    .v28-shop-page ul.products,
    .v28-shop-page ul.products[class*="columns-"],
    body.woocommerce .v28-shop-page ul.products {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        grid-template-columns: none !important;
        gap: 12px !important;
        padding-bottom: 8px !important;
    }
    .v28-shop-page ul.products li.product {
        flex: 0 0 calc(100vw - 48px) !important;
        max-width: calc(100vw - 48px) !important;
        scroll-snap-align: start !important;
    }
    /* Subtle scrollbar */
    .v28-shop-page .products::-webkit-scrollbar { height: 4px; }
    .v28-shop-page .products::-webkit-scrollbar-track { background: transparent; }
    .v28-shop-page .products::-webkit-scrollbar-thumb { background: rgba(54, 48, 48, 0.15); border-radius: 2px; }

    .v28-product-info { padding: 10px; }
    .v28-product-meta { gap: 3px; }
    .v28-wear-it-btn { padding: 4px 10px; border-radius: 6px; }
    .badge-lang { padding: 2px 5px; }
    .badge-express { padding: 1px 4px; }

    /* Controls bar stacks */
    .v28-shop-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .v28-shop-controls-right {
        justify-content: space-between;
    }
}

/* ═══════════════════════════════════════════
   12. RESPONSIVE: TINY (≤480px)
   ═══════════════════════════════════════════ */

@media (max-width: 480px) {
.v28-shop-page .container {
        padding: 0 12px;
    }
    .v28-filter-toggle-btn { padding: 8px 14px; }
    .v28-shop-sort .woocommerce-ordering select,
    .v28-shop-sort select { padding: 8px 12px; }
/* Pagination smaller */
    .v28-shop-page .woocommerce-pagination ul li a,
    .v28-shop-page .woocommerce-pagination ul li span { width: 38px; height: 38px; }
}

/* ═══════════════════════════════════════════
   LANGUAGE DOT INDICATORS (shared)
   ═══════════════════════════════════════════ */

.lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.lang-dot-nl { background: var(--nl-color, #e85d3a); }
.lang-dot-fr { background: var(--fr-color, #2563eb); }
.lang-dot-de { background: var(--de-color, #16a34a); }
.lang-dot-universal { background: var(--universal-color, #FFB74D); }
