﻿/* ============================================
   PRODUCTS PAGE SPECIFIC STYLES
   Product card styles are in site.css
   ============================================ */

/* Product Hero Cards */
.product-hero-card {
    height: 180px;
    min-height: 180px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(112, 85, 66, 0.25) !important;
}

.product-hero-card img {
    transition: transform 0.4s ease;
}

.product-hero-card:hover img {
    transform: scale(1.05);
}

.product-hero-overlay {
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
    transition: background 0.3s ease;
}

.product-hero-card:hover .product-hero-overlay {
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.8) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.product-hero-content {
    padding: 1.5rem;
}

.product-hero-title {
    font-size: 1.25rem;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    padding-bottom: 8px;
}

.product-hero-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.6) 100%);
    border-radius: 5px;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-hero-card:hover .product-hero-title::after {
    width: 100%;
}

.product-hero-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Responsive adjustments for hero cards */
@media (max-width: 767px) {
    .product-hero-card {
        height: 140px;
        min-height: 140px;
    }
    
    .product-hero-title {
        font-size: 1rem;
    }
    
    .product-hero-content {
        padding: 1rem;
    }
}

@media (max-width: 575px) {
    .product-hero-card {
        height: 120px;
        min-height: 120px;
    }
    
    .product-hero-title {
        font-size: 0.875rem;
    }
    
    .product-hero-content {
        padding: 0.75rem;
    }
}

/* Custom column for 5 items per row (20% width = 100% / 5) */
.col-xl-2-4 {
    flex: 0 0 auto;
    width: 20%;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 5px;
    padding: 1.15rem;
    border: 2px solid #f5f1ed;
    box-shadow: 0 2px 8px rgba(112, 85, 66, 0.1);
    position: sticky;
    top: 120px; /* Fixed distance from top (accounting for fixed navbar + promo banner) */
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    margin-top: 0;
    margin-bottom: auto;
    z-index: 10; /* Ensure sidebar stays above background */
}

    /* Custom scrollbar for filter sidebar */
    .filters-sidebar::-webkit-scrollbar {
        width: 6px;
        margin-top:20px;
    }

    .filters-sidebar::-webkit-scrollbar-track {
        background: #f5f1ed;
        border-radius: 5px;
    }

    .filters-sidebar::-webkit-scrollbar-thumb {
        background: #8b6f47;
        border-radius: 5px;
    }

        .filters-sidebar::-webkit-scrollbar-thumb:hover {
            background: #705542;
        }

.filters-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #705542;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #f5f1ed;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

    .filters-title svg {
        color: #8b6f47;
    }

.filter-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f5f1ed;
}

    .filter-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.filter-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #705542;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
}

    .filter-section-title svg {
        color: #8b6f47;
    }

.filter-input {
    border: 2px solid #f5f1ed;
    border-radius: 5px;
    padding: 0.4rem 0.65rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

    .filter-input option:checked,
    .filter-input option:hover {
        background-color: #705542;
        color: #fff;
    }

    .filter-input:focus {
        border-color: #8b6f47;
        box-shadow: 0 0 0 0.2rem rgba(112, 85, 66, 0.15);
    }

/* â”€â”€ Custom Select â”€â”€ */
.custom-select-wrapper {
    position: relative;
    font-size: 0.875rem;
}

.custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    border: 2px solid #f5f1ed;
    border-radius: 5px;
    background: #fff;
    color: #3d2b1a;
    cursor: pointer;
    transition: border-color 0.2s ease;
    text-align: left;
}

.custom-select-trigger:focus,
.custom-select-trigger[aria-expanded="true"] {
    border-color: #8b6f47;
    box-shadow: 0 0 0 0.2rem rgba(112, 85, 66, 0.15);
    outline: none;
}

.custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #d9ccb5;
    border-radius: 5px;
    box-shadow: 0 4px 16px rgba(112, 85, 66, 0.12);
    z-index: 200;
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
    max-height: 220px;
    overflow-y: auto;
}

.custom-select-wrapper.is-open .custom-select-options {
    display: block;
}

.custom-select-option {
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    color: #3d2b1a;
    transition: background 0.15s ease;
}

.custom-select-option:hover {
    background: #f5ede4;
}

.custom-select-option.is-selected {
    background: #705542;
    color: #fff;
    font-weight: 600;
}

.category-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

    /* Custom scrollbar for category list */
    .category-list::-webkit-scrollbar {
        width: 6px;
    }

    .category-list::-webkit-scrollbar-track {
        background: #f5f1ed;
        border-radius: 5px;
    }

    .category-list::-webkit-scrollbar-thumb {
        background: #d4c4b0;
        border-radius: 5px;
    }

        .category-list::-webkit-scrollbar-thumb:hover {
            background: #8b6f47;
        }

.category-item {
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

    .category-item:hover {
        background: #f8f9fa;
        padding-left: 0.5rem;
        border-radius: 5px;
    }

    .category-item .form-check-input {
        border-color: #8b6f47;
    }

        .category-item .form-check-input:checked {
            background-color: #705542;
            border-color: #705542;
        }

    .category-item label {
        color: #705542;
        font-weight: 500;
        cursor: pointer;
    }

/* Products Header */
.products-header {
    padding-bottom: 1rem;
    /*border-bottom: 2px solid #f5f1ed;*/
    position: relative;
    z-index: 10; /* Ensure header stays above background */
    isolation: isolate; /* Create new stacking context */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.products-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #705542;
    margin: 0;
}

.products-count {
    color: #8b6f47;
    font-size: 0.95rem;
    margin: 0;
}

/* Products Grid Container */
.row.g-2,
.row.g-md-3 {
    position: relative;
    z-index: 10;
    isolation: isolate;
    opacity: 1 !important; /* Force visibility */
    visibility: visible !important; /* Force visibility */
}

/* No Products State */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 5px;
    border: 2px solid #f5f1ed;
    position: relative;
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Responsive adjustments for product grid - CORRECTED */
/* XL Screens: 1200px+ ? 5 columns (20%) */
@media (min-width: 1200px) {
 .col-xl-2-4 {
        width: 20%;
    }
}

/* Large Screens: 992px - 1199px ? 4 columns (25%) */
@media (min-width: 992px) and (max-width: 1199px) {
    .col-xl-2-4 {
      width: 25%;
    }
}

/* Medium/Tablet: 768px - 991px ? 3 columns (33.33%) */
@media (min-width: 768px) and (max-width: 991px) {
    .col-xl-2-4 {
 width: 33.333333%;
    }
}

/* Small Tablet: 576px - 767px ? 3 columns (33.33%) */
@media (min-width: 576px) and (max-width: 767px) {
    .col-xl-2-4 {
     width: 33.333333%;
    }
}

/* Mobile: < 576px ? 2 columns (50%) */
@media (max-width: 575px) {
    .col-xl-2-4 {
    width: 50%;
    }
}

/* ============================================
   CATEGORIES PAGE â€” compact CTA banner
   ============================================ */

.view-products-cta--compact {
    padding: 2.5rem 2rem !important;
}

/* Products Index â€” video CTA banner */
.view-products-cta--products {
    text-align: left;
    padding: 2rem 2rem !important;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Categories â€” video CTA banner (same dimensions, btn on right) */
.view-products-cta--categories {
    text-align: left;
    padding: 2rem 2rem !important;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.view-products-cta--categories .products-cta-video,
.view-products-cta--products .products-cta-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.view-products-cta--categories .products-cta-overlay,
.view-products-cta--products .products-cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.62) 0%, rgba(40, 20, 8, 0.72) 100%);
    z-index: 1;
}

/* flex row: text left, button right */
.categories-cta-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.view-products-cta--categories h2,
.view-products-cta--products .products-cta-title {
    position: relative;
    z-index: 2;
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 0.2rem !important;
    display: inline-block;
    width: fit-content;
    padding-bottom: 0.45rem;
}

/* Underline track (faint full-width) */
.view-products-cta--categories h2::before,
.view-products-cta--products .products-cta-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Underline accent (short bar that expands on hover) */
.view-products-cta--categories h2::after,
.view-products-cta--products .products-cta-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.6) 100%);
    border-radius: 5px;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.view-products-cta--categories:hover h2::after,
.view-products-cta--products:hover .products-cta-title::after {
    width: 100%;
}

.view-products-cta--categories p {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.82) !important;
    margin-bottom: 0 !important;
}

@media (max-width: 576px) {
    .view-products-cta--categories,
    .view-products-cta--products {
        padding: 1.5rem 1.25rem !important;
        min-height: 90px;
    }
    .view-products-cta--categories h2,
    .view-products-cta--products .products-cta-title {
        font-size: 1.2rem !important;
    }
    .categories-cta-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

.view-products-cta--compact h2 {
    font-size: 1.75rem !important;
    margin-bottom: 0.5rem !important;
    color: #fff !important;
}

.view-products-cta--compact p {
    font-size: 1.05rem !important;
    margin-bottom: 1rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.btn-cta-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid #fff;
    border-radius: 5px;
    padding: 0.3rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.25s ease, color 0.25s ease;
}

.btn-cta-outline.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
}

/* ============================================
   CATEGORIES GRID PAGE
   Matches product card style from site.css
   ============================================ */

.categories-header {
    margin-top: 1rem;
}

.categories-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3d2b1a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.categories-subtitle {
    font-size: 0.95rem;
    color: #7a6355;
}

/* Category Card - Matches product-grid-card style */
.category-card {
    background: white;
    border-radius: 5px;
    overflow: visible;
    position: relative;
    transition: all 0.3s ease;
    border: 2.5px solid #d4c4b0;
    width: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
    padding: 0.85rem 0.75rem 0.65rem 0.75rem;
    box-shadow: 0 2px 8px rgba(112, 85, 66, 0.1);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.03) 0%, rgba(139, 111, 71, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    border-radius: 5px;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(112, 85, 66, 0.12);
    border-color: #c9b89a;
    z-index: 2;
}

/* Favorites category card */
.category-card--favorites {
    border-color: #e0d6cc;
    background: linear-gradient(135deg, #fff 0%, #fdf6f0 100%);
}

.category-card--favorites:hover {
    border-color: #8b6f47;
}

.category-card--favorites .category-card-title {
    color: #705542;
}

.category-card-favorites-art {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 120px;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.category-card-favorites-art svg {
    transition: transform 0.3s ease;
}

.category-card--favorites:hover .category-card-favorites-art svg {
    transform: scale(1.12);
}

.category-card--favorites .category-card-btn {
    background: linear-gradient(135deg, #705542 0%, #8b6f47 100%);
}

.category-card--favorites .category-card-btn:hover {
    background: linear-gradient(135deg, #8b6f47 0%, #705542 100%);
    box-shadow: 0 4px 12px rgba(112, 85, 66, 0.25);
}

/* Category Card Header - Name on Top */
.category-card-header {
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.category-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #705542;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
    min-height: 2em;
}

.category-card-count {
    font-size: 0.64rem;
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1px;
}

/* 4 Product Images Grid */
.category-card-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.category-card-img-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f1ed;
    border: 1.5px solid #e8e0d5;
    transition: border-color 0.3s ease;
}

.category-card:hover .category-card-img-item {
    border-color: #d4c4b0;
}

.category-card-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-img-item img {
    transform: scale(1.05);
}

/* Discover Button - Matches product-grid-btn */
.category-card-btn {
    background: linear-gradient(135deg, #705542 0%, #8b6f47 100%);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.38rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.category-card-btn:hover {
    background: linear-gradient(135deg, #8b6f47 0%, #705542 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 85, 66, 0.25);
    color: white;
    text-decoration: none;
}

.category-card-btn:active {
    transform: translateY(0);
}
}