/* 
 * Maison Riti – Collections Page Redesign
 * Layout matches collection-page.png mockup
 * Colors use existing theme palette
 */

/* =========================================
   1. HERO SECTION (Fading Image – same as front page)
   ========================================= */
.col-hero {
    position: relative;
    min-height: 80vh;
    background-size: cover;
    background-position: center right;
    display: flex;
    align-items: center;
}

.col-hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to right, var(--color-warm-ivory) 0%, rgba(250,249,246,0.8) 30%, transparent 60%);
    pointer-events: none;
}

.col-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 5%;
}

.col-hero-text {
    max-width: 500px;
}

.col-hero-kicker {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-signature-gold);
    display: block;
    margin-bottom: 16px;
}

.col-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(36px, 5vw, 52px);
    line-height: 1.1;
    color: var(--color-text-dark);
    margin-bottom: 32px;
    font-weight: 400;
}

.col-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: #9d8db3;
    color: var(--color-white);
    padding: 14px 28px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.col-hero-btn:hover {
    background-color: #8c7da1;
}

/* =========================================
   2. CATEGORY CARDS
   ========================================= */
.col-categories {
    padding: 60px 0 40px 0;
}

.col-cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.col-cat-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 3/4;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.col-cat-card:hover {
    transform: translateY(-4px);
}

.col-cat-card-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
}

.col-cat-card-gradient {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    pointer-events: none;
}

.col-cat-card-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}

.col-cat-card-info h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0 0 4px 0;
    color: var(--color-white);
    font-weight: 400;
}

.col-cat-explore {
    font-size: 0.75rem;
    color: var(--color-signature-gold);
    letter-spacing: 0.5px;
}

/* =========================================
   3. FILTER BAR
   ========================================= */
.col-filters {
    padding: 0 0 40px 0;
}

.col-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-white);
    border: 1px solid var(--color-champagne);
    border-radius: 40px;
    padding: 8px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.col-filter-group-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.col-filter-group-right {
    display: flex;
    align-items: center;
}

.col-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-dark);
    cursor: pointer;
    font-family: var(--font-body);
    position: relative;
}

.col-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-dark);
    font-family: var(--font-body);
    cursor: pointer;
    padding-right: 4px;
}

.col-filter-select:focus {
    outline: none;
}

.col-filter-item svg {
    color: var(--color-taupe);
    flex-shrink: 0;
}

.col-filter-divider {
    width: 1px;
    height: 18px;
    background-color: var(--color-champagne);
    flex-shrink: 0;
}

/* Sort dropdown override */
.col-sort-wrap {
    padding: 0 0 0 16px;
}

.col-sort-wrap .woocommerce-ordering {
    margin: 0;
}

.col-sort-wrap select.orderby {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-dark);
    font-family: var(--font-body);
    cursor: pointer;
    padding-right: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%238A837A" stroke-width="2" xmlns="http://www.w3.org/2000/svg"><path d="M6 9l6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 12px;
}

.col-sort-wrap select.orderby:focus {
    outline: none;
}

/* =========================================
   4. PRODUCT GRID
   ========================================= */
.col-products {
    padding-bottom: 40px;
}

.col-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.col-product-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.col-product-card:hover {
    transform: translateY(-3px);
}

.col-product-img {
    width: 100%;
    aspect-ratio: 4/5;
    background-color: var(--color-oat);
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    position: relative;
    margin-bottom: 12px;
}

.col-product-img .col-wishlist-icon {
    position: absolute;
    top: 12px; right: 12px;
    background: transparent;
    border: none;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-dark);
}

.col-product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.col-product-info-left {
    flex: 1;
}

.col-product-info-left h4 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 2px 0;
    color: var(--color-text-dark);
}

.col-product-subtitle {
    font-size: 0.75rem;
    color: var(--color-taupe);
    font-family: var(--font-body);
}

.col-product-info-right {
    text-align: right;
    flex-shrink: 0;
    padding-left: 12px;
}

.col-product-price {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

/* WooCommerce price overrides within our grid */
.col-product-price .woocommerce-Price-amount {
    font-weight: 600;
}

.col-product-price del {
    color: var(--color-taupe);
    font-weight: 400;
    font-size: 0.8rem;
}

/* =========================================
   5. PHILOSOPHY BANNER (Mid-grid)
   ========================================= */
.col-philosophy-banner {
    padding: 40px 0 60px 0;
}

.col-phil-inner {
    display: flex;
    align-items: stretch;
    min-height: 350px;
    overflow: hidden;
    background-color: var(--color-champagne);
}

.col-phil-image {
    flex: 1;
    background-size: cover;
    background-position: center;
}

.col-phil-content {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.col-phil-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.2;
    color: var(--color-text-dark);
    margin-bottom: 16px;
    font-weight: 400;
}

.col-phil-content p {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-text-dark);
    margin-bottom: 24px;
    line-height: 1.6;
}

.col-phil-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-signature-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.col-phil-link:hover {
    opacity: 0.8;
}

/* =========================================
   6. PAGINATION
   ========================================= */
.col-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 60px 0;
}

.col-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-champagne);
    border-radius: 4px;
    color: var(--color-text-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.col-pagination .page-numbers.current,
.col-pagination .page-numbers:hover {
    background-color: var(--color-signature-gold);
    color: var(--color-white);
    border-color: var(--color-signature-gold);
}

/* =========================================
   7. RECENTLY VIEWED
   ========================================= */
.col-recently-viewed {
    padding: 40px 0 80px 0;
    border-top: 1px solid var(--color-champagne);
}

.col-rv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.col-rv-title {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-dark);
    margin: 0;
}

.col-rv-viewall {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.col-rv-viewall:hover {
    color: var(--color-signature-gold);
}

.col-rv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.col-rv-card {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.col-rv-card:hover {
    opacity: 0.8;
}

.col-rv-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background-color: var(--color-champagne);
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}

.col-rv-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.col-rv-info h4 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    color: var(--color-text-dark);
}

.col-rv-info span {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .col-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .col-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .col-rv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Hero Section - Mobile */
    .col-hero {
        min-height: 50vh;
    }
    .col-hero-overlay {
        background: rgba(0, 0, 0, 0.4); /* Full cover dark overlay for text legibility */
    }
    .col-hero-content {
        max-width: 100%;
        text-align: center;
        align-items: center;
        padding: 0 24px;
    }
    .col-hero-title {
        font-size: clamp(28px, 8vw, 36px);
        line-height: 1.1;
        margin-bottom: 12px;
        color: var(--color-white);
    }
    .col-hero-subtitle {
        color: rgba(255, 255, 255, 0.9);
    }

    /* Category Cards - Horizontal Swipe Carousel */
    .col-cat-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 20px; /* Space for scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .col-cat-grid::-webkit-scrollbar {
        display: none;
    }
    .col-cat-card {
        flex: 0 0 50% !important; /* Shows 2 cards to hint at scrolling */
        scroll-snap-align: start;
        aspect-ratio: 4/5;
    }

    /* Product Grid - 2 Columns */
    .col-product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    .col-product-info-left h4 {
        font-size: 0.8rem;
    }
    .col-product-subtitle {
        font-size: 0.7rem;
    }
    .col-product-price {
        font-size: 0.75rem;
    }

    /* Philosophy Banner */
    .col-phil-inner {
        flex-direction: column;
    }
    .col-phil-image {
        min-height: 250px;
    }
    .col-phil-content {
        padding: 30px 20px;
        text-align: center;
    }

    /* Recently Viewed - Horizontal Swipe Carousel */
    .col-rv-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .col-rv-grid::-webkit-scrollbar {
        display: none;
    }
    .col-rv-card {
        flex: 0 0 50% !important;
        scroll-snap-align: start;
    }
}

/* =========================================
   DESKTOP ONLY PRODUCT GRID FIX
   ========================================= */
@media (min-width: 1025px) {
    .shop-container {
        display: block !important;
    }
    
    ul.products {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 40px !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    ul.products li.product {
        text-align: center;
        margin-bottom: 20px;
    }
    
    ul.products li.product img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
        transition: opacity 0.3s ease;
    }
    
    ul.products li.product:hover img {
        opacity: 0.9;
    }
    
    ul.products li.product .woocommerce-loop-product__title {
        font-family: var(--font-heading);
        font-size: 1.25rem;
        color: var(--color-text-dark);
        margin-bottom: 8px;
    }
    
    ul.products li.product .price {
        color: var(--color-text-dark);
        font-size: 1rem;
    }
}
