/* --- Modern React Shop CSS --- */

:root {
    --gp-primary: #2d5a27;
    --gp-accent: #8A9A5B;
    --gp-bg-soft: #f9fbf8;
    --gp-white: #ffffff;
    --gp-text: #333333;
    --gp-text-light: #666666;
    --gp-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --gp-radius: 16px;
}

#gp-modern-shop-root {
    font-family: 'Inter', sans-serif;
    color: var(--gp-text);
    padding: 40px 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.shop-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 0 4vw;
}

/* Sidebar Styling */
.shop-sidebar {
    background: var(--gp-white);
    padding: 30px;
    border-radius: var(--gp-radius);
    box-shadow: var(--gp-shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 35px;
}

.filter-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #2d5a27;
    border: none;
    padding: 0;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-item {
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 15px;
    border-radius: 12px;
    color: #444;
    font-size: 16px;
    font-weight: 500;
}

.category-item:hover {
    background: #f8f9fa;
    color: #2d5a27;
}

.category-item.active {
    background: #f4f6f8;
    color: #2d5a27;
    font-weight: 700;
}

.category-count {
    font-size: 12px;
    background: #EBEDF0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #888;
    font-weight: 600;
    flex-shrink: 0;
}

.category-item.active .category-count {
    background: #E1E4E8;
    color: #666;
}

/* Price Slider Styling */
.price-slider-wrap {
    padding: 15px 0;
}

.price-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #eef2ed;
    border-radius: 10px;
    outline: none;
    margin: 15px 0;
    transition: all 0.3s ease;
}

/* Webkit Track */
.price-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #eef2ed;
    border-radius: 10px;
}

/* Webkit Thumb */
.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--gp-primary);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(45, 90, 39, 0.2);
    margin-top: -6px;
    /* (track-height/2 - thumb-height/2) */
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.price-slider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(45, 90, 39, 0.3);
}

/* Moz Track */
.price-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #eef2ed;
    border-radius: 10px;
}

/* Moz Thumb */
.price-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--gp-primary);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(45, 90, 39, 0.2);
    transition: all 0.2s ease;
}

.price-slider:hover::-moz-range-thumb {
    transform: scale(1.1);
}

.price-inputs {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
}

/* Main Content Area */
.shop-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gp-white);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--gp-shadow);
    margin-bottom: 10px;
}

.result-count span {
    font-weight: 700;
    color: var(--gp-primary);
}

.mobile-top-filters {
    display: none;
}

.sort-by-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-label {
    font-weight: 700;
    color: #111;
    font-size: 14px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-option:hover {
    color: var(--gp-primary);
}

.sort-option.active {
    color: #3866df;
    font-weight: 600;
}

/* Mobile Sort Select */
.sort-select-mobile {
    display: none;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--gp-text);
    outline: none;
    cursor: pointer;
}

.sort-options-desktop {
    display: flex;
    gap: 20px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Responsive Grid Adjustments */
@media (min-width: 1600px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 2000px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Premium Product Card */
.gp-product-card {
    background: var(--gp-white);
    border-radius: var(--gp-radius);
    padding: 20px;
    box-shadow: var(--gp-shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gp-product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-image-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f1f1;
    margin-bottom: 20px;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gp-product-card:hover .product-image-wrap img {
    transform: scale(1.1);
}

.sale-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff4757;
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
    text-transform: uppercase;
}

.product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-cat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gp-accent);
    margin-bottom: 5px;
    font-weight: 700;
}

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
    line-height: 1.3;
}

.product-description {
    font-size: 14px;
    color: var(--gp-text-light);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    color: #ffb800;
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.price-add-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price,
.product-price .woocommerce-Price-amount {
    font-weight: 800;
    font-size: 20px;
    color: var(--gp-primary);
}

.product-price.is-range,
.product-price.is-range .woocommerce-Price-amount {
    font-weight: 700;
}

.product-price del,
.product-price del .woocommerce-Price-amount {
    font-size: 14px;
    color: #999;
    margin-right: 5px;
    font-weight: 400;
}

.action-btns-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.buy-now-btn {
    background: var(--gp-primary);
    color: white;
    border: none;
    height: 36px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buy-now-btn:hover {
    background: #1d3a19;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.2);
}

.quick-add-btn {
    background: #111;
    color: white;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-add-btn:hover {
    background: var(--gp-primary);
    transform: rotate(90deg);
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    #gp-modern-shop-root {
        padding: 0 0 5px 0;
    }

    .shop-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .shop-main {
        max-width: 100%;
        overflow-x: hidden;
        min-width: 0;
        gap: 8px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        width: 100%;
    }

    .gp-product-card {
        padding: 6px;
        border-radius: 12px;
        min-width: 0;
    }

    .product-image-wrap {
        margin-bottom: 6px;
    }

    .product-title {
        font-size: 14px;
        font-weight: 800;
        margin-bottom: 2px;
        height: auto;
        max-height: 3em;
        line-height: 1.25;
        overflow: hidden;
    }

    .product-description {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 11px;
        line-height: 1.35;
        margin-bottom: 6px;
        color: #666;
    }

    .product-rating {
        font-size: 14px;
        margin-bottom: 4px;
        letter-spacing: 1px;
    }

    .price-add-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .product-price {
        font-size: 16px;
        margin-top: 0;
        font-weight: 800;
    }

    .product-price.is-range,
    .product-price.is-range .woocommerce-Price-amount {
        font-size: 15px !important;
        font-weight: 700 !important;
    }

    .action-btns-wrap {
        width: 100%;
        display: flex;
        gap: 6px;
        margin-top: 4px;
    }

    .buy-now-btn {
        flex-grow: 1;
        padding: 8px 10px;
        font-size: 11px;
        border-radius: 8px;
    }

    .quick-add-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .shop-sidebar {
        display: none;
    }

    .mobile-top-filters {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: transparent;
        padding: 10px 0 0;
        border-radius: 0;
        margin-bottom: 0px;
        border: none;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .mobile-filter-header {
        font-size: 11px;
        font-weight: 700;
        color: var(--gp-primary);
        margin-bottom: 2px;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0.9;
    }

    .mobile-cat-scroll {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding: 0 0 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mobile-cat-scroll::-webkit-scrollbar {
        display: none;
    }

    .mobile-cat-btn {
        flex-shrink: 0;
        padding: 6px 14px;
        border-radius: 50px;
        border: 1px solid rgba(255, 255, 255, 0.5);
        background: rgba(255, 255, 255, 0.9);
        font-size: 12px;
        font-weight: 700;
        color: #555;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .mobile-cat-btn.active {
        background: var(--gp-primary);
        color: white;
        border-color: var(--gp-primary);
        box-shadow: 0 4px 12px rgba(45, 90, 39, 0.2);
    }

    .mobile-cat-count {
        font-size: 11px;
        opacity: 0.7;
        background: rgba(0, 0, 0, 0.05);
        padding: 2px 6px;
        border-radius: 10px;
    }

    .mobile-cat-btn.active .mobile-cat-count {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }
}

@media (max-width: 768px) {
    .sort-select-mobile {
        display: block;
    }

    .sort-options-desktop {
        display: none;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 12px;
        margin-bottom: 5px;
    }

    .sort-by-wrap {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sort-select-mobile {
        flex-grow: 1;
        max-width: 200px;
    }
}