/* HappyKDS123 - Products Page Premium Design System */
/* Theme: Refined Black & White Dalmatian Concepts */

:root {
    --bw-black: #000000;
    --bw-white: #ffffff;
    --bw-gray-100: #f8f9fa;
    --bw-gray-200: #f1f3f5;
    --bw-gray-300: #dee2e6;
    --bw-gray-500: #adb5bd;
    --bw-gray-800: #343a40;
}

/* Global Layout */
.products-page {
    background-color: var(--bw-white);
    min-height: 100vh;
    overflow-x: hidden;
}

[data-theme="dark"] .products-page {
    background-color: #0f172a;
}

/* Premium Hero Section - Geometric Pattern */
.products-hero-wrapper {
    position: relative;
    padding: 35px 0 !important;
    margin-bottom: 25px !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23ffffff' fill-opacity='0.3'%3E%3Cpath d='M10 10h10v10H10zM50 40h5v5h-5zM80 15h8v8h-8zM20 70h6v6h-6zM70 75h10v10H70z'/%3E%3Ccircle cx='35' cy='25' r='5'/%3E%3Ccircle cx='90' cy='60' r='4'/%3E%3Ccircle cx='15' cy='90' r='6'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, #fb923c 0%, #ec4899 50%, #8b5cf6 100%) !important;
    background-size: 150px, cover !important;
    border-radius: 20px !important;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.2) !important;
}

.products-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.products-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.products-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.products-hero-subtitle {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    max-width: 600px;
    margin: 0 auto 20px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Hero Search System */
.hero-search-system {
    max-width: 550px;
    margin: 0 auto;
    background: #fff !important;
    border-radius: 50px;
    padding: 8px;
    display: flex;
    align-items: center;
    border: 3px solid #000 !important;
    transform: translateY(10px);
}

.hero-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 800;
    outline: none;
    color: #000 !important;
}

.hero-search-btn {
    background: #000 !important;
    color: #fff !important;
    border: none;
    padding: 12px 35px;
    border-radius: 40px;
    font-weight: 900;
    text-transform: uppercase;
    transition: all 0.2s;
}

.hero-search-btn:hover {
    background: #ec4899 !important;
    transform: scale(1.05);
}

/* --- Filter Sidebar Modern B&W --- */
.filter-sidebar-premium {
    padding: 25px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    position: sticky;
    top: 20px;
}

[data-theme="dark"] .filter-sidebar-premium {
    background: #1e293b;
    border-color: #334155;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group:not(:last-child) {
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 25px;
}

[data-theme="dark"] .filter-group:not(:last-child) {
    border-color: #334155;
}

[data-theme="dark"] .form-control {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #fff !important;
}

[data-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

.filter-group-title {
    font-size: 0.85rem;
    font-weight: 900;
    color: #000;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

[data-theme="dark"] .filter-group-title {
    color: #fff;
}

/* Scrollable Areas for large amounts of filters */
.filter-scroll-area {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar for Filters */
.filter-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.filter-scroll-area::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
}

.filter-scroll-area::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 10px;
}

[data-theme="dark"] .filter-scroll-area::-webkit-scrollbar-track {
    background: #334155;
}

[data-theme="dark"] .filter-scroll-area::-webkit-scrollbar-thumb {
    background: #fff;
}

/* Filter Chips (Sizes/Colors) */
.filter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip-item {
    position: relative;
}

.filter-chip-item input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.filter-chip-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #495057;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-width: 50px;
    cursor: pointer;
    gap: 6px;
}

[data-theme="dark"] .filter-chip-label {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

.filter-chip-item input:checked+.filter-chip-label {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.filter-chip-item input:checked+.filter-chip-label::before {
    content: 'check';
    font-family: 'Material Symbols Outlined';
    font-size: 1rem;
    font-weight: normal;
}

[data-theme="dark"] .filter-chip-item input:checked+.filter-chip-label {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Category Toggle Logic UI */
.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 800;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

[data-theme="dark"] .category-row {
    color: #94a3b8;
}

.category-row:hover,
.category-row.active {
    background: #000;
    color: #fff;
    box-shadow: inset 4px 0 0 0 #fff, 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .category-row:hover,
[data-theme="dark"] .category-row.active {
    background: #fff;
    color: #000;
    box-shadow: inset 4px 0 0 0 #000, 0 4px 20px rgba(255, 255, 255, 0.1);
}

.category-toggle-icon {
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.category-row.open .category-toggle-icon {
    transform: rotate(90deg);
}

.category-children {
    display: none;
    padding-left: 20px;
    margin-top: 5px;
}

.category-children.show {
    display: block;
}

.sub-category-link {
    display: block;
    padding: 8px 12px;
    color: #6c757d;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.sub-category-link:hover,
.sub-category-link.active {
    background: #f1f3f5;
    color: #000;
}

[data-theme="dark"] .sub-category-link:hover,
[data-theme="dark"] .sub-category-link.active {
    background: #334155;
    color: #fff;
}

/* Sorting button dark mode compatibility */
[data-theme="dark"] .dropdown-toggle.btn-outline-dark {
    color: #fff !important;
    border-color: #475569 !important;
}

[data-theme="dark"] .dropdown-toggle.btn-outline-dark:hover {
    background-color: #fff !important;
    color: #000 !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .dropdown-item {
    color: #94a3b8 !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: #334155 !important;
    color: #fff !important;
}

[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

/* Actions */
.btn-apply-filters {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 900;
    margin-top: 15px;
    transition: all 0.2s;
}

[data-theme="dark"] .btn-apply-filters {
    background: #fff;
    color: #000;
}

.btn-reset-filters {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #adb5bd;
    text-decoration: none;
    text-transform: uppercase;
}

.btn-reset-filters:hover {
    color: #000;
}

/* Mobile Friendly Adjustments */
@media (max-width: 991px) {
    .products-hero-wrapper {
        padding: 40px 15px;
        margin-bottom: 30px;
        border-radius: 20px;
        background-attachment: scroll;
        /* Mobile smooth scrolling */
        background-size: 200px;
        /* Adjust dalmatian size for mobile */
    }

    .products-hero-overlay {
        background: rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .products-hero-overlay {
        background: rgba(0, 0, 0, 0.5);
    }

    .products-hero-title {
        font-size: 1.75rem;
        letter-spacing: -1px;
        margin-bottom: 8px;
    }

    .products-hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
        font-weight: 600;
        padding: 0 10px;
    }

    .hero-search-system {
        transform: none;
        /* Remove translateY on mobile */
        max-width: 100%;
        padding: 5px;
        border-width: 2px;
    }

    .hero-search-input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .hero-search-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }

    /* Sync Offcanvas Filter Styles */
    .offcanvas-body {
        padding: 20px;
        background-color: var(--bw-white);
    }

    [data-theme="dark"] .offcanvas-body {
        background-color: #0f172a;
    }

    .offcanvas-body .filter-group {
        border-bottom: 1px solid #f1f3f5;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    [data-theme="dark"] .offcanvas-body .filter-group {
        border-color: #334155;
    }

    .offcanvas-body .category-row {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .offcanvas-body .filter-chip-label {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

.mobile-filter-btn-premium {
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff !important;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

[data-theme="dark"] .mobile-filter-btn-premium {
    background: #fff;
    color: #000 !important;
}