/**
 * Advanced Filters CSS
 * Styles for product filtering sidebar and results
 */

.livora-advanced-filters-sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    position: sticky;
    top: 20px;
}

.livora-filters-title {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2271b1;
    color: #2271b1;
    font-size: 20px;
}

.livora-filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.livora-filter-group:last-child {
    border-bottom: none;
}

.livora-filter-group h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

/* Price Filter */
.livora-price-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.livora-price-filter input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.livora-price-filter span {
    text-align: center;
    color: #666;
}

.livora-apply-price-btn {
    background: #2271b1;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.livora-apply-price-btn:hover {
    background: #135e96;
}

/* Checkbox Filters */
.livora-filter-checkbox,
.livora-filter-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
    padding-right: 10px;
}

.livora-filter-checkbox:hover,
.livora-filter-radio:hover {
    background: #f0f6fc;
}

.livora-filter-checkbox input,
.livora-filter-radio input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.livora-filter-count {
    color: #999;
    font-size: 12px;
    margin-right: auto;
}

/* Sort Select */
.livora-sort-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Reset Button */
.livora-reset-filters-btn {
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 20px;
}

.livora-reset-filters-btn:hover {
    background: #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    .livora-advanced-filters-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 20px;
    }
    
    .livora-filter-group {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
}

/* Loading State */
.livora-filters-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.livora-filters-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2271b1;
    border-top-color: transparent;
    border-radius: 50%;
    animation: livoraSpin 0.6s linear infinite;
}

@keyframes livoraSpin {
    to { transform: rotate(360deg); }
}

/* Product Fade In Animation */
.livora-product-fade-in {
    opacity: 0;
    animation: livoraFadeInUp 0.5s ease-out forwards;
}

@keyframes livoraFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Product Cards in Filters */
.livora-filtered-products .product {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.livora-filtered-products .product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.livora-filtered-products .product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.livora-filtered-products .product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f8f8f8;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.livora-filtered-products .product:hover .product-image {
    transform: scale(1.05);
}

.livora-view-product-btn {
    width: 100%;
    text-align: center;
    margin-top: 15px;
    transition: all 0.3s;
}

.livora-view-product-btn:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 94, 150, 0.3);
}

/* No Products Message */
.livora-filtered-products .no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.livora-filtered-products .no-products p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Smooth Filter Transitions */
.livora-advanced-filters-sidebar {
    transition: all 0.3s;
}

.livora-filter-group {
    transition: background 0.3s, padding 0.3s;
}

/* Enhanced Checkbox/Radio Styles */
.livora-filter-checkbox input[type="checkbox"],
.livora-filter-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2271b1;
}

.livora-filter-checkbox input[type="checkbox"]:checked,
.livora-filter-radio input[type="radio"]:checked {
    background: #2271b1;
    border-color: #2271b1;
}

/* Filter Count Badge */
.livora-filter-count {
    display: inline-block;
    padding: 2px 8px;
    background: #e0e0e0;
    border-radius: 12px;
    font-size: 11px;
    margin-right: auto;
    margin-left: 8px;
}

.livora-filter-checkbox input:checked ~ .livora-filter-count,
.livora-filter-radio input:checked ~ .livora-filter-count {
    background: #2271b1;
    color: white;
}

