/* --- PRODUCTS PAGE SPECIFIC STYLES --- */
/* Global styles are now in global.css */

body {
    background-color: #fff;
}

.category-header {
    text-align: center;
    padding: 20px 0;
}

.category-header.small-header {
    text-align: left;
    padding: 0 0 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 2px;
}

.category-header h1 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-header {
    padding: 40px 0 20px;
    text-align: center;
    margin-bottom: 30px;
}

.search-header h1 {
    font-size: 25px;
    margin: 0 0 10px;
    color: #333;
    font-weight: 800;
}

.search-header .search-context {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.search-header .search-context strong {
    color: #099baa;
}

.sorting-options {
    cursor: pointer;
}

.select-sort :focus {

    border-color: #ffcd1c !important;

}

.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.shop-layout {
    display: flex;
    gap: 30px;
    padding-bottom: 36px;
}

.filters {
    width: 280px;
    flex-shrink: 0;
}

.filters-sidebar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    padding: 22px 18px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    height: fit-content;
}

.shop-main-content {
    flex-grow: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

.category-slider-wrapper {
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* --- CLEAR FILTERS BUTTON --- */
.clear-filters-wrapper {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.btn-clear-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ffcd1c;
    color: #4a5568;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.btn-clear-filters:hover {
    background-color: #ffcd1c;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(255, 205, 28, 0.2);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-clear-filters i {
    font-size: 14px;
}

.filters-sidebar h3,
.filters-sidebar h4 {
    margin-top: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 15px;
    padding-bottom: 6px;
    border-bottom: 2px solid #ffcd1c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s;
}

.filters-sidebar h3:hover,
.filters-sidebar h4:hover {
    color: #002494;
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #64748b;
}

.is-collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.is-collapsed .section-content {
    display: none;
}

.filter-section {
    margin-bottom: 25px;
}

.filters .filter-group {
    margin-bottom: 20px;
}

.filters label {
    display: block;
    margin-bottom: 5px;
}

.filters input[type="search"],
.filters select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.filters .show-more {
    color: #ffcd1c;
    text-decoration: none;
    font-size: 14px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.product-card {
    border: 1px solid #eee;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
    border-color: #003399;
}

.product-image-wrapper {
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
}

.product-card img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-info-wrapper {
    margin-bottom: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-card .price {
    font-weight: bold;
    color: #333;
    margin: 0;
    text-align: left;
    flex-grow: 1;
    font-size: 15px;
}

.price-action-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    width: 100%;
    padding-top: 8px;
}

.product-card .price del {
    color: #999;
    font-weight: normal;
    margin-right: 5px;
}

.product-card .vat {
    font-size: 12px;
    color: #777;
    font-weight: normal;
    display: block;
}

.add-to-cart-btn {
    background-color: var(--button-blue);
    color: white;
    border: none;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.add-to-cart-btn:hover {
    background-color: #001a6e;
}

.add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.product-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #099baa;
    color: white;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
    z-index: 90;
}

.product-card .sold-out {
    background-color: #d9534f;
    left: auto;
    right: 10px;
}

.product-card.out-of-stock img {
    opacity: 0.5;
}

.load-more-container {
    text-align: center;
    padding: 40px 0;
}

.load-more-btn {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    cursor: pointer;
}

/* --- RESPONSIVE STYLES --- */

/* Tablet and below (max-width: 1024px) */
@media (max-width: 1024px) {
    .shop-layout {
        flex-direction: column;
        gap: 30px;
    }

    .filters {
        width: 100%;
    }

    .category-header.small-header {
        text-align: center;
    }

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

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .shop-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }

    .shop-layout {
        gap: 15px;
        padding-bottom: 20px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-card {
        padding: 12px;
    }

    .product-card h3 {
        font-size: 13px;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .shop-controls {
        padding: 12px;
        font-size: 14px;
    }

    .filters h3 {
        font-size: 18px;
    }

    .product-card {
        padding: 10px;
    }

    .product-card .price {
        font-size: 14px;
    }

    .product-card .vat {
        font-size: 11px;
    }
}

/* --- SUBCATEGORY SIDEBAR STYLES --- */
.subcategory-section {
    margin-bottom: 25px;
}

.subcategory-section h3 {
    font-size: 14px;
}

.subcategory-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subcategory-list.scrollable {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.subcategory-list.scrollable::-webkit-scrollbar {
    width: 6px;
}

.subcategory-list.scrollable::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.subcategory-list.scrollable::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.subcategory-list.scrollable::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.subcategory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-weight: 500;
}

.subcategory-item:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: #0f172a;
}

.subcategory-item.active {
    background-color: #f0f7ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-weight: 600;
}

.subcategory-name {
    flex-grow: 1;
}

.subcategory-count {
    font-size: 12px;
    color: #94a3b8;
    margin-left: 8px;
}

.subcategory-item.active .subcategory-count {
    color: #0d6efd;
}

/* ============================================================
   MOBILE FILTER DRAWER AND STICKY CONTROL BAR
   ============================================================ */

/* Desktop defaults - hidden */
.mobile-category-title-header,
.mobile-filter-bar-sticky,
.mobile-drawer-header,
.mobile-drawer-footer,
.filters-mobile-overlay {
    display: none;
}

@media (max-width: 1024px) {
    /* Category title outside the sidebar on mobile */
    .mobile-category-title-header {
        display: block;
        text-align: left;
        margin-bottom: 12px;
        padding: 0 5px;
    }

    .mobile-category-title-header h1 {
        font-size: 20px;
        font-weight: 800;
        color: #0f172a;
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Hide the category title inside the sidebar */
    .filters-sidebar .category-header.small-header {
        display: none !important;
    }

    /* Sticky/Floating mobile filter/sort bar */
    .mobile-filter-bar-sticky {
        display: flex;
        gap: 10px;
        padding: 10px 5px;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 98;
        border-bottom: 1.5px solid #eee;
        margin-bottom: 20px;
    }

    .mobile-filter-toggle-btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 16px;
        background-color: #f8fafc;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        color: #334155;
        cursor: pointer;
        transition: background-color 0.2s;
    }

    .mobile-filter-toggle-btn:active {
        background-color: #e2e8f0;
    }

    .mobile-sort-wrapper {
        flex: 1;
        position: relative;
    }

    .mobile-sort-wrapper::after {
        content: '';
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 4.5px solid transparent;
        border-right: 4.5px solid transparent;
        border-top: 5.5px solid #4a5568;
        pointer-events: none;
    }

    .mobile-sort-dropdown {
        width: 100%;
        padding: 10px 28px 10px 12px;
        background-color: #f8fafc;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        color: #334155;
        appearance: none;
        -webkit-appearance: none;
        outline: none;
        cursor: pointer;
    }

    /* Filters drawer layout */
    .filters-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: #fff;
        z-index: 2000;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        padding: 0;
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        border-radius: 0;
        border: none;
    }

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

    /* Drawer Header */
    .mobile-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        background: #ffcd1c;
        border-bottom: 1px solid #e2e8f0;
    }

    .mobile-drawer-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 800;
        color: #262329;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-drawer-close {
        background: none;
        border: none;
        font-size: 28px;
        font-weight: 300;
        line-height: 1;
        color: #262329;
        cursor: pointer;
        padding: 0 5px;
    }

    /* Wrapper for scrollable accordion content inside drawer */
    .filters-sidebar > div[data-vue-root],
    .filters-sidebar > .collapsible-sidebar-section,
    .filters-sidebar > .clear-filters-wrapper {
        padding: 0 20px;
    }

    /* Scrollable content container wrapper */
    .filters-sidebar {
        overflow-y: auto;
    }

    .clear-filters-wrapper {
        margin-top: 15px;
        margin-bottom: 15px;
        padding-bottom: 0;
        border-bottom: none;
    }

    /* Drawer Footer */
    .mobile-drawer-footer {
        display: block;
        padding: 15px 20px;
        background: #f8fafc;
        border-top: 1px solid #e2e8f0;
        margin-top: auto;
        position: sticky;
        bottom: 0;
        z-index: 10;
    }

    .btn-apply-filters {
        width: 100%;
        padding: 12px;
        background: #262329;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        cursor: pointer;
        transition: background-color 0.2s;
    }

    .btn-apply-filters:active {
        background: #000;
    }

    /* Overlay styling */
    .filters-mobile-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(2px);
    }

    .filters-mobile-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    /* General layout adjust */
    .filters-column {
        width: 100%;
    }

    .filters-column .ps-card {
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        margin-bottom: 20px;
    }

    /* Hide standard breadcrumbs sort controls on mobile as we have it in the bar */
    .breadcrumbs-flex-container .breadcrumb-controls {
        display: none !important;
    }
}