/* ===== COLLECTION PAGE STYLES ===== */

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/images/common/pattern.png') repeat;
    opacity: 0.05;
}

.page-hero-content {
    position: relative;
    z-index: 1;
}

.page-title {
    color: var(--primary-white);
    margin-bottom: 1rem;
}

.page-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    color: var(--primary-gold);
}

/* Collections Layout */
.collections-section {
    padding: var(--spacing-xl) 0;
    min-height: 60vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
}

/* Filter Backdrop */
.filter-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1200;
    /* above mobile nav overlay */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-backdrop.active {
    display: block;
    opacity: 1;
}

/* Make filter sidebar off-canvas on mobile (visible only when .active) */
@media (max-width: 991px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 420px;
        height: 100vh;
        z-index: 1300;
        overflow-y: auto;
        transition: right 0.28s cubic-bezier(.2, .8, .2, 1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
        background: var(--primary-white);
    }

    .filter-sidebar.active {
        right: 0;
        left: auto;
    }
}

/* Filter Groups */
.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group .filter-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--soft-black);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-option {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-option:last-child {
    margin-bottom: 0;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-gold);
    flex-shrink: 0;
}

.filter-option label {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--soft-black);
    user-select: none;
    flex: 1;
}

.filter-option label:hover {
    color: var(--primary-black);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--cream);
}

.filter-header .filter-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-black);
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

.filter-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-black);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.filter-close-btn:hover {
    color: var(--primary-gold);
    background: var(--cream);
    transform: rotate(90deg);
}

/* Filter Apply Bar (Mobile) */
.filter-apply-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-white);
    padding: 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1400;
    gap: 1rem;
}

@media (max-width: 991px) {
    .filter-apply-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (min-width: 992px) {
    .filter-apply-bar {
        display: none !important;
    }
}

.filter-apply-bar .btn {
    flex: 1;
    max-width: 200px;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
}

/* Mobile Filter Toggle */
.filter-toggle-btn {
    display: none;
    width: 100%;
    padding: 1rem;
    background: var(--primary-gold);
    color: var(--primary-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.filter-toggle-btn:hover {
    background: var(--secondary-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-toggle-btn i {
    font-size: 1.1rem;
}

.collections-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.collections-main {
    width: 100%;
    min-width: 0;
    /* Prevent grid overflow */
}

.collections-main .products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    width: 100%;
}

@media (min-width: 1200px) {
    .collections-main .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 991px) {
    .collections-main .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .collections-main .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 400px) {
    .collections-main .products-grid {
        grid-template-columns: 1fr;
    }
}

/* No Results Message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--soft-black);
}

.no-results p {
    font-size: 1.25rem;
    margin: 0;
    color: var(--soft-black);
}

@media (max-width: 768px) {
    .no-results {
        padding: 3rem 1.5rem;
    }

    .no-results p {
        font-size: 1.1rem;
    }
}

/* Collections Header */
.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--cream);
    flex-wrap: wrap;
    gap: 1rem;
}

/* Page Hero */
/* Page Hero */
.page-hero {
    background: linear-gradient(rgba(26, 26, 26, 0.7), rgba(26, 26, 26, 0.7)), url('../assets/home/Home 1.jpg');
    /* Valid image with overlay */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 16rem 0 8rem;
    /* 16rem padding - 100px margin = ~150px visual space (clears header) */
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: -100px;
    color: #ffffff;
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    color: #ffffff;
    /* Force white title */
    font-family: var(--font-primary);
    font-size: 4rem;
    /* Larger for impact */
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: 0;
}

.page-description {
    color: rgba(255, 255, 255, 0.9);
    /* Lighter description */
    font-family: var(--font-secondary);
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    font-style: italic;
    font-weight: 300;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.breadcrumb a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-gold);
}

/* Collections Layout */
.collections-section {
    padding: 4rem 0 6rem;
    min-height: 60vh;
    background: #ffffff;
    /* Ensure pure white bg */
}

.results-count {
    font-size: 1rem;
    color: var(--soft-black);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-options label {
    font-weight: 500;
    color: var(--soft-black);
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--cream);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--primary-black);
    background: var(--primary-white);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-gold);
}

/* Responsive */
/* Desktop and large tablet: show left sidebar (static) */
@media (min-width: 992px) {
    .collections-layout {
        grid-template-columns: 280px 1fr;
        gap: 2rem;
        align-items: start;
    }

    .filter-toggle-btn {
        display: none;
    }

    /* Elegant Desktop Sidebar */
    .filter-sidebar {
        position: sticky;
        top: 100px;
        /* Sticky scroll */
        left: auto;
        right: auto;
        width: 100%;
        max-width: none;
        height: auto;
        max-height: calc(100vh - 120px);
        box-shadow: none;
        /* Removed heavy shadow */
        border-radius: 0;
        padding: 0 1.5rem 0 0;
        /* Right spacing instead of internal padding */
        overflow-y: auto;
        overflow-x: hidden;
        background: transparent;
        /* Seamless blend */
        border: none;
        /* Removed border */
        border-right: 1px solid rgba(0, 0, 0, 0.05);
        /* Subtle divider */
    }

    .filter-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .filter-sidebar::-webkit-scrollbar-track {
        background: var(--cream);
        border-radius: 3px;
    }

    .filter-sidebar::-webkit-scrollbar-thumb {
        background: var(--primary-gold);
        border-radius: 3px;
    }

    .filter-header {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .filter-title {
        font-size: 1.5rem;
        /* Larger, more editorial */
        font-family: var(--font-primary);
        font-weight: 400;
        color: var(--primary-black);
        margin: 0;
    }

    .filter-group {
        margin-bottom: 2.5rem;
        /* More airy spacing */
    }

    .filter-group .filter-title {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--primary-gold);
        /* Gold accents */
        margin-bottom: 1.25rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
    }

    .filter-option {
        margin-bottom: 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .filter-option input[type="checkbox"],
    .filter-option input[type="radio"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: var(--primary-gold);
    }

    .filter-option label {
        cursor: pointer;
        font-size: 0.9rem;
        color: var(--soft-black);
        user-select: none;
    }

    .filter-option label:hover {
        color: var(--primary-black);
    }

    .apply-filters-btn {
        width: 100%;
        margin-top: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .filter-sidebar.active {
        left: auto;
        right: auto;
    }

    .filter-close-btn {
        display: none;
    }
}

@media (min-width: 992px) {
    body.filters-collapsed .filter-toggle-btn {
        display: flex;
        width: auto;
        max-width: 240px;
        margin-bottom: 1rem;
        position: sticky;
        top: 100px;
        z-index: 10;
    }

    .collections-layout.filters-collapsed {
        grid-template-columns: 1fr;
    }

    .collections-layout.filters-collapsed .filter-sidebar {
        display: none;
    }

    .collections-layout.filters-collapsed .collections-main {
        grid-column: 1 / -1;
    }
}

@media (max-width: 991px) {
    .collections-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .collections-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .view-toggle {
        display: none;
    }
}

/* Filter Backdrop */
.filter-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1200;
    /* ensure backdrop stays above mobile overlays */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-backdrop.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .page-hero {
        padding: 10rem 0 4rem;
        /* Increased to clear mobile header overlap */
    }

    .page-title {
        font-size: 2rem;
    }

    .page-description {
        font-size: 1rem;
    }

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

    .collections-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-bottom: 80px;
        /* Space for filter apply bar */
    }

    /* Off-canvas compact drawer on mobile */
    .filter-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 380px;
        height: 100vh;
        z-index: 1300;
        /* ensure sidebar sits above backdrop and nav overlay */
        overflow-y: auto;
        transition: right 0.28s cubic-bezier(.2, .8, .2, 1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
        background: var(--primary-white);
        padding: 1.25rem;
        padding-bottom: 100px;
        /* Space for apply bar */
    }

    .filter-sidebar.active {
        right: 0;
    }

    .filter-apply-bar {
        display: flex;
    }

    .collections-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .sort-options {
        width: 100%;
        justify-content: space-between;
    }

    .sort-select {
        flex: 1;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 3rem 0 2rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .results-count {
        font-size: 0.85rem;
    }

    .sort-options {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-select {
        max-width: 100%;
    }

    .filter-sidebar {
        width: 90%;
    }
}

/* Ultra-wide screens */
@media (min-width: 1600px) {
    .collections-layout {
        grid-template-columns: 300px 1fr;
        gap: 3rem;
    }

    .filter-sidebar {
        padding: 2rem;
    }
}

/* Between tablet and desktop */
@media (min-width: 769px) and (max-width: 991px) {
    .collections-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .filter-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        z-index: 1300;
        overflow-y: auto;
        transition: right 0.28s cubic-bezier(.2, .8, .2, 1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
        background: var(--primary-white);
        padding: 1.25rem;
    }

    .filter-sidebar.active {
        right: 0;
    }

    .filter-close-btn {
        display: block;
    }
}