/* ==========================================================================
   AgroPets — Shop Page (woocommerce/archive-product.php)
   ========================================================================== */

/* Shop Layout (.shop-hero, .breadcrumbs, .shop-section → main.css) */
.shop-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; align-items: start; }

/* Sidebar */
.shop-sidebar {
    background-color: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.8rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 130px;
    z-index: 5;
}
.sidebar-widget { margin-bottom: 2rem; }
.sidebar-widget:last-child { margin-bottom: 0; }
.sidebar-widget h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-dark-green);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}
.filter-options { display: flex; flex-direction: column; gap: 0.8rem; }

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    gap: 0.6rem;
    color: var(--text-primary);
}
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark {
    height: 20px;
    width: 20px;
    min-width: 20px;
    background-color: var(--bg-alt);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: inline-block;
    position: relative;
    transition: var(--transition-fast);
}
.custom-checkbox:hover input ~ .checkmark { border-color: var(--brand-green); }
.custom-checkbox input:checked ~ .checkmark { background-color: var(--brand-green); border-color: var(--brand-green); }
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.custom-checkbox input:checked ~ .checkmark:after { display: block; }
.label-text i { color: var(--brand-green); width: 18px; text-align: center; }

/* Price Slider */
.price-range-container { display: flex; flex-direction: column; gap: 0.8rem; }
#price-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--border-color);
    outline: none;
    transition: background .3s;
    cursor: pointer;
}
#price-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-green);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(86,183,40,.3);
    transition: transform .1s ease;
}
#price-range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
#price-range-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-green); cursor: pointer; border: none; }
.price-range-labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* Toolbar */
#mobile-filter-btn { display: none; }
.shop-main-content { display: flex; flex-direction: column; gap: 1.5rem; }
.shop-toolbar {
    background-color: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1rem 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}
.products-count { font-size: 0.95rem; color: var(--text-body); }
.products-count strong { color: var(--brand-dark-green); }
.sorting-selector { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }
.sorting-selector select {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    font-weight: 600;
    transition: border-color var(--transition-fast);
}
.sorting-selector select:focus { border-color: var(--brand-green); }

/* Products Grid */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Empty / No Results */
.shop-no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.shop-no-results i { font-size: 3rem; margin-bottom: 1rem; display: block; opacity: .4; }
.shop-no-results p { font-size: 1rem; line-height: 1.6; }

/* Responsive */
@media (max-width: 992px) {
    .shop-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .shop-sidebar {
        position: static;
        display: none;
        margin-bottom: 0.5rem;
    }
    .shop-sidebar.active {
        display: block;
        animation: slideDown 0.3s ease-out forwards;
    }
    .shop-products-grid { grid-template-columns: repeat(2, 1fr); }
    
    #mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background-color: var(--bg-surface);
        border: 2px solid var(--border-color);
        padding: 0.6rem 1.2rem;
        border-radius: var(--radius-md);
        font-weight: 700;
        color: var(--brand-dark-green);
        cursor: pointer;
        transition: var(--transition-fast);
        font-size: 0.9rem;
    }
    #mobile-filter-btn:hover {
        border-color: var(--brand-green);
        color: var(--brand-green);
    }
    #mobile-filter-btn.active {
        background-color: var(--brand-green);
        color: #fff;
        border-color: var(--brand-green);
    }
    .shop-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: center;
        justify-content: space-between;
    }
}
@media (max-width: 640px) {
    .shop-products-grid { grid-template-columns: 1fr; }
    .shop-toolbar { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .sorting-selector { width: 100%; justify-content: space-between; }
    #mobile-filter-btn { width: 100%; justify-content: center; }
    .products-count { width: 100%; text-align: center; order: 3; font-size: 0.88rem; color: var(--text-muted); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
