/* Shop AJAX Styles */
.sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar__item {
    margin-bottom: 30px;
}

.sidebar__item h4 {
    color: #3A7D44;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 1.1rem;
}

.sidebar__item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar__item ul li {
    margin-bottom: 8px;
}

.sidebar__item ul li a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.sidebar__item ul li a:hover,
.sidebar__item ul li a.active {
    color: #3A7D44;
    font-weight: bold;
    background: rgba(58, 125, 68, 0.1);
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    border-radius: 25px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #3A7D44;
    box-shadow: 0 0 0 0.2rem rgba(58, 125, 68, 0.25);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-suggestions:not(:empty) {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background: #f8f9fa;
    color: #3A7D44;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Filter Loading */
.filter-loading {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

.filter-loading .spinner-border {
    color: #3A7D44;
}

/* Category Menu */
.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item.has-subcategories > a {
    cursor: pointer;
    position: relative;
}

.category-item.has-subcategories > a .fas {
    transition: transform 0.3s ease;
}

.category-item.has-subcategories.open > a .fas {
    transform: rotate(180deg);
}

.subcategories {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
    border-left: 3px solid #3A7D44;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.subcategories li a {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Price Slider */
.price-range-wrap {
    padding: 10px 0;
}

#price-slider {
    margin: 20px 0;
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.noUi-target {
    background: #e9ecef;
    border-radius: 10px;
    border: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.noUi-connect {
    background: linear-gradient(90deg, #3A7D44, #2D5A35);
}

.noUi-handle {
    border: 3px solid #3A7D44;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    width: 20px;
    height: 20px;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

.noUi-handle:hover {
    transform: scale(1.1);
}

/* Filter Item */
.filter__item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter__sort select {
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s ease;
}

.filter__sort select:focus {
    border-color: #3A7D44;
    box-shadow: 0 0 0 0.2rem rgba(58, 125, 68, 0.25);
}

.filter__option span {
    cursor: pointer;
    margin-left: 15px;
    font-size: 20px;
    color: #666;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 5px;
}

.filter__option span.active,
.filter__option span:hover {
    color: #3A7D44;
    background: rgba(58, 125, 68, 0.1);
}

/* Product Cards */
.product__item {
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: white;
}

.product__item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product__item__pic {
    position: relative;
    height: 280px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.product__item__pic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(58, 125, 68, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product__item:hover .product__item__pic::before {
    opacity: 1;
}

.product__hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.product__item:hover .product__hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

.product__hover li {
    display: inline-block;
    margin: 0 8px;
}

.product__hover a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.product__hover a:hover {
    background: #3A7D44;
    color: white;
    transform: scale(1.1);
}

/* Product Labels */
.label {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.label.sale {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.label.new {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.label.featured {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: #333;
}

.label.bestseller {
    background: linear-gradient(45deg, #17a2b8, #6f42c1);
}

/* Product Text */
.product__item__text {
    padding: 20px;
}

.product__item__text h6 {
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.product__item__text h6 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product__item__text h6 a:hover {
    color: #3A7D44;
}

.product__price {
    color: #3A7D44;
    font-weight: bold;
    font-size: 18px;
    margin: 10px 0;
}

.product__price .old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
    margin-right: 8px;
    font-weight: normal;
}

.product__price .new-price {
    color: #3A7D44;
}

.rating {
    color: #ffc107;
    margin: 8px 0;
    font-size: 14px;
}

.rating-count {
    color: #666;
    font-size: 12px;
    margin-left: 5px;
}

.stock-status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stock-status.in_stock {
    background: #d4edda;
    color: #155724;
}

.stock-status.out_of_stock {
    background: #f8d7da;
    color: #721c24;
}

.stock-status.low_stock {
    background: #fff3cd;
    color: #856404;
}

/* List View */
.list-view .product-item {
    width: 100%;
    margin-bottom: 25px;
}

.list-view .product__item {
    display: flex;
    align-items: center;
    height: 220px;
    padding: 0;
}

.list-view .product__item__pic {
    width: 220px;
    height: 220px;
    margin-right: 25px;
    flex-shrink: 0;
    border-radius: 15px 0 0 15px;
}

.list-view .product__item__text {
    flex: 1;
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Loading Overlay */
#loading-overlay {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
}

#loading-overlay .spinner-border {
    color: #3A7D44;
    width: 3rem;
    height: 3rem;
}

/* Active Filters */
#active-filters {
    min-height: 40px;
}

#active-filters .badge {
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 20px;
}

#active-filters .btn-close {
    font-size: 10px;
    margin-left: 5px;
}

/* Pagination */
.product__pagination .pagination {
    margin: 0;
}

.product__pagination .page-link {
    color: #3A7D44;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.product__pagination .page-link:hover {
    background: #3A7D44;
    color: white;
    border-color: #3A7D44;
}

.product__pagination .page-item.active .page-link {
    background: #3A7D44;
    border-color: #3A7D44;
}

/* Quick View Modal */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 2px solid #f8f9fa;
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.product-gallery img {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.product-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .filter__item {
        padding: 15px;
    }
    
    .product__item__pic {
        height: 220px;
    }
    
    .list-view .product__item {
        flex-direction: column;
        height: auto;
    }
    
    .list-view .product__item__pic {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
        border-radius: 15px 15px 0 0;
    }
    
    .list-view .product__item__text {
        padding: 20px;
    }
    
    .product__hover a {
        width: 40px;
        height: 40px;
    }
    
    .search-box input {
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .product__item__pic {
        height: 200px;
    }
    
    .product__item__text {
        padding: 15px;
    }
    
    .filter__item {
        padding: 12px;
    }
    
    .sidebar {
        padding: 12px;
    }
    
    .sidebar__item h4 {
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

/* Focus States */
button:focus,
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 125, 68, 0.25);
}

/* Scrollbar Styling */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #3A7D44;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #2D5A35;
}