/* CATALOG STYLES */
body {
    background-color: #ffffff;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
}

.catalog-page {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
}

.catalog-header-container {
    padding: 0 40px;
    margin-bottom: 40px;
}

.catalog-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 80px;
    margin-bottom: 40px;
    padding-bottom: 40px;
}

.cat-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cat-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.cat-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
}

.cat-link.active {
    color: #000;
    font-weight: 500;
}
@media (hover: hover) {
    .cat-link:hover {
        color: #000;
        font-weight: 500;
    }
}

.catalog-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--gold);
    padding-top: 40px;
}

/* SEARCH BAR */
.catalog-search-wrapper {
    flex: 1;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
}

.catalog-search-icon {
    position: absolute;
    left: 14px;
    color: #999;
    pointer-events: none;
    flex-shrink: 0;
}

.catalog-search-input {
    width: 100%;
    padding: 10px 40px 10px 40px;
    border: 1px solid var(--gold);
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: #1e1e1e;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.catalog-search-input::placeholder {
    color: #aaa;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.catalog-search-input:focus {
    border-color: #1e1e1e;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.catalog-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 2px 4px;
    transition: color 0.2s;
    opacity: 0;
    visibility: hidden;
}

.catalog-search-clear.visible {
    opacity: 1;
    visibility: visible;
}

@media (hover: hover) {
    .catalog-search-clear:hover {
        color: #1e1e1e;
    }
}








.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--gold);
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .control-btn:hover {
        border-color: #000;
    }
}

/* SORT DROPDOWN */
.sort-wrapper {
    position: relative;
}

.sort-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: var(--bg-base);
    border: 1px solid #EBEBEB;
    min-width: 220px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.sort-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-option {
    padding: 12px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sort-option.active {
    background: #f8f8f8;
    color: var(--gold, #C5A065);
}
@media (hover: hover) {
    .sort-option:hover {
        background: #f8f8f8;
        color: var(--gold, #C5A065);
    }
}


/* CATALOG GRID */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px;
    padding: 0 60px;
}

/* PRODUCT CARD (MATCHING HOMEPAGE INSPIRATION BLOCK) */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

@media (hover: hover) {
    .product-card:hover .card-img {
        transform: scale(1.05);
    }
}



.card-info {
    padding-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    text-align: center;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #141414;
    margin: 0 0 8px 0;
    text-transform: none;
    letter-spacing: 0.5px;
}

.card-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #141414;
    margin: 0 0 15px 0;
}




/* FILTER DRAWER */
.filter-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filter-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.filter-drawer {
    position: fixed;
    top: 0;
    left: -400px; /* Hidden offscreen to left */
    width: 400px;
    height: 100vh;
    background: var(--bg-base);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.filter-drawer.active {
    left: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    border-bottom: 1px solid var(--gold);
}

.filter-header h3 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
}

.close-filter-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #000;
    padding: 0;
}

.filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* CUSTOM CHECKBOX */
.custom-checkbox {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #333;
    display: flex;
    align-items: center;
    user-select: none;
}

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

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 1px solid #ccc;
    transition: all 0.2s ease;
}

@media (hover: hover) {
    .custom-checkbox:hover input ~ .checkmark {
        border-color: #000;
    }
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #000;
    border-color: #000;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

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

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-footer {
    padding: 20px 40px;
    border-top: 1px solid #EBEBEB;
    display: flex;
    gap: 12px;
}

.reset-filter-btn {
    flex: 1;
    padding: 15px 0;
    background: transparent;
    color: #1e1e1e;
    border: 1px solid #ccc;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .reset-filter-btn:hover {
        border-color: #1e1e1e;
        background: rgba(0,0,0,0.05);
    }
}

.apply-filter-btn {
    flex: 2;
    padding: 15px 0;
    background: #000;
    color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease;
}

@media (hover: hover) {
    .apply-filter-btn:hover {
        background: var(--gold, #C5A065);
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    /* 1. Remove all categories on mobile version */
    .catalog-categories {
        display: none !important;
    }

    /* 2. Format controls row: search at top, filters and sorting side-by-side below */
    .catalog-controls-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        padding-top: 20px !important;
        border-top: 1px solid rgba(197, 160, 101, 0.4) !important;
    }

    .catalog-search-wrapper {
        order: 1 !important;
        grid-column: span 2 !important;
        width: 100% !important;
        max-width: none !important;
        margin-bottom: 5px !important;
    }

    #filterBtn {
        order: 2 !important;
        grid-column: span 1 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }

    .sort-wrapper {
        order: 3 !important;
        grid-column: span 1 !important;
        width: 100% !important;
        position: relative !important;
    }

    #sortBtn {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }

    /* 3. Borderless titlecase buttons */
    .catalog-controls-row .control-btn {
        border: none !important;
        background: transparent !important;
        padding: 10px 0 !important;
        font-size: 15px !important;
        text-transform: none !important;
        letter-spacing: 0.5px !important;
    }

    /* 4. Display 2 cards in a row like home Inspiration block */
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 15px !important;
    }

    /* 5. Mobile card details scaling */
    .product-card {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
    }
    .card-info {
        display: flex !important;
        flex-direction: column !important;
        flex-grow: 1 !important;
    }
    .card-image-wrapper {
        margin-bottom: 12px !important;
    }
    .card-title {
        font-size: 13px !important;
    }
    .card-price {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }
    .card-hover-btn {
        padding: 12px 0 !important;
        font-size: 11px !important;
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
    }
    .product-card .card-fav-icon {
        top: 10px !important;
        right: 10px !important;
    }
    
    .filter-drawer {
        width: 100%;
        left: -100%;
    }
}

/* DUAL RANGE SLIDER */
.price-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: var(--text-main);
}

.price-inputs span {
    color: #999;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
}

.price-inputs input[type="number"] {
    width: 90px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    text-align: center;
    outline: none;
    transition: border-color 0.3s ease;
}

.price-inputs input[type="number"]:focus {
    border-color: var(--gold, #C5A065);
}

.price-inputs input[type="number"]::-webkit-inner-spin-button,
.price-inputs input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.range-slider {
    position: relative;
    width: 100%;
    height: 30px;
}

.range-track {
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #e0dcd3;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2px;
    z-index: 1;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    z-index: 2;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: var(--gold, #C5A065);
    cursor: pointer;
    -webkit-appearance: none;
    pointer-events: auto;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.15s ease, background 0.15s ease;
}

@media (hover: hover) {
    .range-slider input[type="range"]::-webkit-slider-thumb:hover {
        transform: scale(1.25);
        background: #141414;
    }
}

.range-slider input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.25);
    background: #141414;
}

.range-slider input[type="range"]::-moz-range-thumb {
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: var(--gold, #C5A065);
    cursor: pointer;
    pointer-events: auto;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.15s ease, background 0.15s ease;
}

@media (hover: hover) {
    .range-slider input[type="range"]::-moz-range-thumb:hover {
        transform: scale(1.25);
        background: #141414;
    }
}

.range-slider input[type="range"]::-moz-range-thumb:active {
    transform: scale(1.25);
    background: #141414;
}

/* CUSTOM SCROLLBAR FOR FILTER BODY */
.filter-body::-webkit-scrollbar {
    width: 5px;
}

.filter-body::-webkit-scrollbar-track {
    background: transparent;
}

.filter-body::-webkit-scrollbar-thumb {
    background: #e0dcd3;
    border-radius: 10px;
    transition: background 0.3s ease;
}

@media (hover: hover) {
    .filter-body::-webkit-scrollbar-thumb:hover {
        background: var(--gold, #C5A065);
    }
}

/* FILTER DRAWER: ACCORDION HEADER */
.filter-accordion-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 15px;
    user-select: none;
}

.filter-group:first-child .filter-accordion-head {
    border-top: 1px solid #ebebeb;
}

.acc-arrow {
    transition: transform 0.35s ease;
    flex-shrink: 0;
    color: #888;
}

.acc-arrow.rotated {
    transform: rotate(180deg);
}
