/* =========================================
   10. SHOP PAGE SPECIFIC STYLES
   ========================================= */

/* Layout */
.shop-page-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 60px 20px;
    /* Added horizontal padding */
    max-width: 1280px;
    /* Ensure it doesn't stretch too wide on huge screens if container is missing */
    margin: 0 auto;
}

@media (min-width: 992px) {
    .shop-layout {
        display: flex;
        gap: 50px;
        align-items: flex-start;
    }

    .shop-sidebar {
        width: 280px;
        flex-shrink: 0;
    }

    .shop-products-main {
        flex: 1;
    }
}

/* Page Heading */
.shop-hero {
    position: relative;
    /* Using editorial image for botanical vibe */
    background-image: url('../images/editorial-spring.png');
    background-size: cover;
    background-position: center 30%;
    /* Focus on interesting part */
    /* Fixed attachment creates a modern premium feel */
    background-attachment: fixed;
    padding: 120px 0;
    margin-bottom: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Rich Gradient Overlay: Deep Green -> Transparent -> Deep Green */
    background: linear-gradient(90deg,
            rgba(15, 61, 62, 0.95) 0%,
            rgba(15, 61, 62, 0.7) 50%,
            rgba(15, 61, 62, 0.95) 100%);
    z-index: 1;
}

.shop-hero .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.shop-hero .main-heading {
    color: #fff;
    /* White text */
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* Add a subtle gold underline element */
    border-bottom: 2px solid rgba(207, 170, 86, 0.5);
    padding-bottom: 15px;
    display: inline-block;
}

.shop-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
    letter-spacing: 0.5px;
    line-height: 1.8;
}

/* Sidebar Filters */
.filter-group {
    border-bottom: 1px solid rgba(15, 61, 62, 0.1);
    padding-bottom: 25px;
    margin-bottom: 25px;
}

.filter-group:last-child {
    border-bottom: none;
}

details.filter-group-details>summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 15px;
}

details.filter-group-details>summary::-webkit-details-marker {
    display: none;
}

details.filter-group-details>summary::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 300;
}

details.filter-group-details[open]>summary::after {
    content: '-';
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 5px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-light);
    transition: color 0.3s;
}

.filter-label:hover {
    color: var(--color-primary);
}

.filter-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-checkbox:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.filter-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: #fff;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Price Range */
.price-range-slider {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.price-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-weight: 500;
}

/* Sort Bar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.product-count {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.sort-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 30px 8px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: transparent;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-primary);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
}

/* Product Grid Override/Reuse */
.shop-product-grid {
    display: grid;
    /* Mobile: 1 column as requested */
    grid-template-columns: 1fr;
    /* Smaller gap for mobile */
    gap: 20px 10px;
}

@media (min-width: 576px) {
    .shop-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (min-width: 768px) {
    .shop-product-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 cols on tablet/desktop */
    }
}

@media (min-width: 992px) {
    .shop-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Product Card - Shop Version */
.product-card-shop {
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    /* Added "Frame" look */
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
}

.product-card-shop:hover {
    border-color: var(--color-accent);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.product-img-wrapper {
    position: relative;
    aspect-ratio: 1/1;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.7s ease;
}

.product-card-shop:hover .product-img-wrapper img {
    transform: scale(1.08);
    /* Gentle zoom */
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-accent);
    /* Gold */
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
    z-index: 2;
}

.add-to-cart-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    color: var(--color-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Fallback for icon */
.add-to-cart-btn i {
    font-style: normal;
}

.add-to-cart-btn:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.product-card-shop:hover .add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
}

.product-info-shop {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-main);
    transition: color 0.3s;
}

.product-card-shop:hover .product-name {
    color: var(--color-accent);
}

.product-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 5px;
}

/* Load More */
.load-more-wrapper {
    margin-top: 60px;
    text-align: center;
}

/* Mobile text adjustments for 2-col grid */
@media (max-width: 576px) {
    .product-name {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 0.9rem;
    }

    .product-card-shop {
        padding: 8px;
        /* Slightly tighter padding on mobile */
    }
}

/* =========================================
   11. MOBILE FILTER DRAWER
   ========================================= */

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile specific styling */
@media (max-width: 991px) {
    #mobile-filter-toggle {
        display: flex !important;
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 300px;
        max-width: 85%;
        background: #fff;
        z-index: 1050;
        padding: 20px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .shop-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header-mobile {
        display: flex !important;
    }

    .desktop-only-title {
        display: none;
    }
}