/* =================================================================
   Shop Archive Layout (Fixed Sidebar & Dynamic WooCommerce Data)
   =================================================================== */

.maayon-shop-page {
    background-color: #f3f2ee;
    padding-bottom: 6rem;
    font-family: var(--font-primary, sans-serif);
}

.shop-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
/* =================================================================
   Dynamic Promotional Hero Banner Styling
   =================================================================== */

.shop-promo-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 5rem 0;
    border-radius: 24px;
    margin: 1.5rem auto;
    max-width: calc(1350px - 3rem); /* Matches container width bounds */
    overflow: hidden;
}

/* Dark gradient mask over background image to make white text crisp */
.shop-promo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.65) 60%, rgba(15, 23, 42, 0.3) 100%);
    z-index: 1;
}

.shop-promo-hero .shop-container {
    position: relative;
    z-index: 2;
}

.promo-hero-card {
    background: transparent !important;
    box-shadow: none !important;
    padding: 1rem 0 !important;
    display: block !important;
}

.promo-hero-text .promo-breadcrumb {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    display: block;
}

.promo-hero-text .promo-breadcrumb a {
    color: #ffffff;
    text-decoration: none;
}

.promo-hero-text h1 {
    font-family: var(--font-display, serif);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    max-width: 700px;
}

.promo-hero-text p {
    font-size: 1rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
    max-width: 550px;
}

/* Responsive adjustment for smaller mobile screens */
@media screen and (max-width: 768px) {
    .shop-promo-hero {
        padding: 3.5rem 1rem;
        border-radius: 16px;
        margin: 1rem;
    }
}

/* Main Shop Grid Setup */
.shop-products-section {
    padding-top: 2rem;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: flex-start;
}

/* =================================================================
   FIXED STICKY SIDEBAR (Desktop/Laptop View)
   =================================================================== */
.shop-sidebar {
    position: sticky;
    top: 2rem; /* Locks into position 2rem below the top when scrolling */
    align-self: flex-start;
}

.shop-sidebar .filter-box {
    background-color: #ffffff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
}

.filter-heading {
    font-family: var(--font-display, serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.filter-group {
    border-bottom: 1px solid #f3f4f6;
    padding: 1.1rem 0;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-group-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.collapse-icon {
    font-size: 0.8rem;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.filter-group.collapsed .filter-group-body {
    display: none;
}

.filter-group.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.filter-group-body {
    margin-top: 1rem;
}

/* Category Links List */
.category-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.category-filter-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.category-filter-list a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease;
}

.category-filter-list a:hover {
    color: #0f172a;
    font-weight: 500;
}

.category-filter-list .count {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Color Swatches Grid */
.color-swatch-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.color-dot:hover {
    border-color: #0f172a;
    transform: scale(1.1);
}

/* Scrollable Right Side Products Container */
.shop-products {
    min-width: 0; /* Prevents grid layout breaking */
}

.shop-toolbar-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.04);
}

.shop-toolbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-result-count {
    font-size: 0.85rem;
    color: #6b7280;
}

.shop-sorting select {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1f2937;
    outline: none;
    cursor: pointer;
}

/* Archive 3-Column Grid */
.shop-archive-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Responsive adjustments */
@media screen and (max-width: 1024px) {
    .promo-hero-card {
        grid-template-columns: 1fr;
        padding: 2.5rem;
        text-align: center;
    }
    .promo-hero-image {
        display: none;
    }
    .promo-hero-text p {
        margin: 0 auto;
    }
    .shop-layout {
        grid-template-columns: 1fr;
    }
    .shop-sidebar {
        position: static; /* Disables sticky positioning on mobile devices */
    }
    .shop-archive-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (max-width: 640px) {
    .shop-archive-grid {
        grid-template-columns: 1fr !important;
    }
}