/* =========================================
   Premium Category Page Styles
   ========================================= */

/* Hero Banner */
.category-hero {
    position: relative;
    height: 40vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    color: #fff;
    overflow: hidden;
    margin-top: 120px;
    /* Offset for fixed header */
}

.category-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.category-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: blur(2px);
}

.category-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb .current {
    color: #fff;
    font-weight: 500;
}

.category-hero-content h1 {
    font-size: 3.5rem;
    font-family: var(--font-secondary);
    margin-bottom: 16px;
    line-height: 1.1;
}

.category-hero-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Toolbar */
.category-toolbar-wrapper {
    position: relative;
    background: transparent;
    border-bottom: none;
    margin-bottom: 24px;
}

.category-toolbar-wrapper.is-sticky {
    box-shadow: none;
}

.category-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.product-count {
    color: var(--text-light);
    font-size: 0.95rem;
}

.product-count strong {
    color: var(--text-dark);
}

.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-dark);
}

.toolbar-search {
    position: relative;
}

.toolbar-search input {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 10px 40px 10px 20px;
    font-size: 0.9rem;
    width: 250px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    font-family: var(--font-primary);
}

.toolbar-search input:focus {
    border-color: var(--text-dark);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.toolbar-search svg {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.toolbar-sort select {
    appearance: none;
    background: transparent;
    border: none;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding-right: 20px;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23111111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
}

.toolbar-view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s;
}

.view-btn:hover {
    color: var(--text-dark);
}

.view-btn.active {
    color: var(--text-dark);
    background: var(--bg-light);
}

/* Category Main Layout */
.category-main {
    padding-top: 60px;
}

.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
}

/* Sidebar Filters */
.category-sidebar {
    position: sticky;
/* Sidebar Filters */
.category-sidebar {
    position: sticky;
    top: 100px;
    height: auto;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.category-sidebar::-webkit-scrollbar {
    width: 4px;
}

.category-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.mobile-only {
    display: none;
}

.filter-group {
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 10px 0;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-dark);
}

.filter-toggle svg {
    transition: transform 0.3s ease;
}

.filter-toggle.active svg {
    transform: rotate(180deg);
}

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: visible;
}

.filter-toggle.active+.filter-content {
    padding-bottom: 10px;
}

/* Custom Checkboxes */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox .checkmark {
    height: 20px;
    width: 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.3s;
    position: relative;
}

.custom-checkbox:hover input~.checkmark {
    border-color: var(--text-dark);
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--text-dark);
    border-color: var(--text-dark);
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.label-text {
    font-size: 0.95rem;
    color: var(--text-medium);
    transition: color 0.3s;
}

.custom-checkbox:hover .label-text,
.custom-checkbox input:checked~.label-text {
    color: var(--text-dark);
}

/* Color Filter Grid */
.color-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.color-dot:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Product Grid */
.product-grid-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

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

.product-grid-view.list-view .premium-product-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.product-grid-view.list-view .premium-product-image {
    width: 250px;
    height: 250px;
    margin-bottom: 0;
}

.product-grid-view.list-view .p-bottom {
    margin-top: auto;
}

/* Premium Product Card */
.premium-product-card {
        background: #fff;
        border-radius: 16px;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        position: relative;
    }

    .premium-product-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    }

    .premium-product-image {
        position: relative;
        border-radius: 16px;
        overflow: hidden;
        background: var(--bg-secondary);
        aspect-ratio: 4/5;
        margin-bottom: 20px;
    }

    .premium-product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .premium-product-card:hover .premium-product-image img {
        transform: scale(1.08);
    }

    .premium-product-actions {
        position: absolute;
        bottom: 15px;
        left: 50%;
        transform: translate(-50%, 20px);
        display: flex;
        gap: 10px;
        opacity: 0;
        transition: all 0.4s ease;
    }

    .premium-product-card:hover .premium-product-actions {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    .p-action-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #fff;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-dark);
        cursor: pointer;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.3s;
    }

    .p-action-btn:hover {
        background: var(--text-dark);
        color: #fff;
    }

    .premium-badges {
        position: absolute;
        top: 15px;
        left: 15px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .premium-badges .badge {
        background: #fff;
        color: var(--text-dark);
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 1px;
        text-transform: uppercase;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .premium-badges .badge.eco {
        background: #4ade80;
        color: #fff;
    }

    .premium-product-info {
        padding: 0 10px 10px;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .p-category {
        font-size: 0.8rem;
        color: var(--text-light);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 8px;
        font-weight: 500;
    }

    .p-title {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 12px;
        color: var(--text-dark);
    }

    .p-desc {
        font-size: 0.9rem;
        color: var(--text-medium);
        line-height: 1.5;
        margin-bottom: 24px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .p-quote-btn {
        width: 100%;
        border-radius: 30px;
        padding: 12px;
        font-size: 0.95rem;
    }

    /* Load More */
    .load-more-container {
        text-align: center;
        margin-top: 60px;
    }

    .load-more-btn {
        padding: 16px 40px;
        border-radius: 30px;
    }

    /* Bottom CTA */
    .bottom-cta {
        padding: 60px 0 100px;
    }

    .cta-banner {
        background: var(--bg-dark);
        border-radius: 30px;
        padding: 80px 60px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #fff;
        position: relative;
        overflow: hidden;
    }

    .cta-banner::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
        border-radius: 50%;
    }

    .cta-content h2 {
        font-size: 2.5rem;
        font-family: var(--font-secondary);
        margin-bottom: 16px;
        line-height: 1.2;
    }

    .cta-content p {
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.7);
        max-width: 500px;
        line-height: 1.6;
    }

    .cta-actions {
        display: flex;
        gap: 16px;
        position: relative;
        z-index: 2;
    }

    /* Responsive */
    @media (max-width: 1200px) {
        .product-grid-view {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    @media (max-width: 992px) {
        .category-layout {
            grid-template-columns: 240px 1fr;
            gap: 40px;
        }

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

        .cta-banner {
            flex-direction: column;
            text-align: center;
            gap: 40px;
            padding: 60px 40px;
        }

        .cta-content p {
            margin: 0 auto;
        }
    }

    @media (max-width: 768px) {
        .category-layout {
            grid-template-columns: 1fr;
        }

        .category-sidebar {
            position: fixed;
            top: 0;
            left: -100%;
            width: 300px;
            height: 100vh;
            background: #fff;
            z-index: 999;
            max-height: 100vh;
            padding: 20px;
            transition: left 0.4s ease;
            box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
        }

        .category-sidebar.open {
            left: 0;
        }

        .mobile-only {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-light);
        }

        .mobile-filter-btn {
            display: flex;
        }

        .close-filters {
            background: none;
            border: none;
            cursor: pointer;
        }

        .toolbar-search {
            display: none;
            /* Hide search on mobile toolbar to save space, or make it smaller */
        }

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

        .product-grid-view.list-view .premium-product-card {
            flex-direction: column;
        }

        .product-grid-view.list-view .premium-product-image {
            width: 100%;
            height: auto;
        }

        .category-hero-content h1 {
            font-size: 2.5rem;
        }

        .cta-actions {
            flex-direction: column;
            width: 100%;
        }

        .cta-actions .btn {
            width: 100%;
        }
    }