/* Category Page Styles */

/* Breadcrumbs */
.breadcrumbs {
    background-color: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb-list a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
    color: #8b7355;
}

.breadcrumb-list .current {
    color: #333;
    font-weight: 500;
}

/* Category Header */
.category-header {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.category-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.category-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.category-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.category-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #8b7355;
}

.separator {
    color: #dee2e6;
}

.category-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* Filters Section */
.filters-section {
    padding: 1.5rem 0;
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.filters-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-toggle-btn {
    display: none;
    background: #8b7355;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-toggle-btn:hover {
    background: #6d5940;
}

.filter-toggle-btn i {
    margin-right: 0.5rem;
}

.active-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.active-filter {
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.active-filter .remove {
    cursor: pointer;
    color: #6c757d;
}

.filters-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-dropdown label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.view-btn {
    background: white;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.view-btn.active {
    background: #8b7355;
    color: white;
}

.view-btn:hover:not(.active) {
    background: #f8f9fa;
}

/* Main Layout */
.main-content {
    padding: 2rem 0;
}

.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Sidebar Filters */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 160px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    position: relative;
}

.filter-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 3px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.filter-option input[type="checkbox"]:checked + .checkmark {
    background: #8b7355;
    border-color: #8b7355;
}

.filter-option input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.filter-option .count {
    margin-left: auto;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Price Range */
.price-range {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-inputs input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

.price-separator {
    color: #6c757d;
    font-weight: 500;
}

.price-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b7355;
    cursor: pointer;
}

.price-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b7355;
    cursor: pointer;
    border: none;
}

/* Color Filters */
.color-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.color-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.color-option input[type="checkbox"] {
    display: none;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-option input[type="checkbox"]:checked + .color-swatch {
    border-color: #8b7355;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #8b7355;
}

/* Filter Actions */
.filter-actions {
    padding-top: 1rem;
}

.clear-filters-btn {
    width: 100%;
    background: transparent;
    color: #8b7355;
    border: 1px solid #8b7355;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: #8b7355;
    color: white;
}

/* Products Grid */
.products-section {
    min-height: 600px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.products-grid.list-view .product-image {
    width: 200px;
    flex-shrink: 0;
}

.products-grid.list-view .product-info {
    flex: 1;
    text-align: left;
}

/* Product Card Enhancements */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: white;
    color: #333;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    background: #8b7355;
    color: white;
}

.wishlist-btn-product {
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wishlist-btn-product:hover,
.wishlist-btn-product.active {
    background: #e74c3c;
    color: white;
}

.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.new {
    background: #27ae60;
    color: white;
}

.badge.sale {
    background: #e74c3c;
    color: white;
}

.product-info {
    padding: 1.5rem;
    text-align: center;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-category {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.stars i {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.8rem;
    color: #6c757d;
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #8b7355;
}

.original-price {
    font-size: 1rem;
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-colors {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.color-dot:hover {
    transform: scale(1.2);
}

.add-to-cart-btn {
    width: 100%;
    background: #8b7355;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #6d5940;
    transform: translateY(-1px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    background: white;
    color: #8b7355;
    border: 1px solid #8b7355;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #8b7355;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    background: white;
    color: #6c757d;
    border: 1px solid #dee2e6;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-number:hover {
    background: #f8f9fa;
}

.pagination-number.active {
    background: #8b7355;
    color: white;
    border-color: #8b7355;
}

.pagination-dots {
    color: #6c757d;
    padding: 0 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .category-layout {
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .category-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .category-content h1 {
        font-size: 2rem;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filters-right {
        justify-content: space-between;
    }
    
    .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .category-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .filters-sidebar.active {
        left: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .category-content h1 {
        font-size: 1.75rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
}

/* Filter Sidebar Overlay */
.filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filters-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Loading States */
.products-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    font-size: 1.1rem;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8b7355;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.no-products {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-products h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.no-products p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.no-products .clear-filters-btn {
    display: inline-block;
    width: auto;
    padding: 0.75rem 2rem;
}

/* Animations */
.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Stagger animation for product cards */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }