/**
 * Modern Minimal Archive Styles for Novoshop
 * Category & Archive Pages Design
 */

/* ========================================
   Archive Page Container
======================================== */
.novoshop-archive-page {
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

/* ========================================
   Category Banner
======================================== */
.category-banner {
    position: relative;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 50px;
}

.category-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-banner .category-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.category-banner .category-description {
    font-size: 16px;
    color: #f0f0f0;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   Minimal Header
======================================== */
.archive-header.minimal-header {
    padding: 60px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.archive-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.archive-title {
    font-size: 42px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px;
}

.archive-description {
    font-size: 16px;
    color: #666666;
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   Archive Toolbar
======================================== */
.archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-count {
    font-size: 15px;
    color: #666666;
    font-weight: 500;
}

/* Filter Toggle Button */
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.filter-toggle-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.filter-toggle-btn svg {
    transition: transform 0.3s ease;
}

.filter-toggle-btn.active svg {
    transform: rotate(90deg);
}

/* View Mode Switcher */
.view-mode-switcher {
    display: flex;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 4px;
}

.view-mode {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.view-mode:hover {
    background: #f5f5f5;
    color: #333;
}

.view-mode.active {
    background: #1a1a1a;
    color: #ffffff;
}

/* Archive Ordering */
.archive-ordering select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.archive-ordering select:hover {
    border-color: #bbb;
}

.archive-ordering select:focus {
    outline: none;
    border-color: #1a1a1a;
}

/* ========================================
   Filters Panel
======================================== */
.filters-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.filters-panel.active {
    right: 0;
}

.filters-inner {
    padding: 0;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

.filters-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.close-filters {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-filters:hover {
    background: #f5f5f5;
}

.filters-content {
    padding: 20px 30px;
}

/* Filter Group */
.filter-group {
    margin-bottom: 35px;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

/* Price Filter */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
}

.price-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.price-separator {
    color: #999;
    font-size: 14px;
}

.price-slider-container {
    padding: 10px 0;
}

#price-slider {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.filter-checkbox:hover {
    padding-right: 5px;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a1a1a;
}

.filter-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.filter-count {
    font-size: 13px;
    color: #999;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.apply-filters-btn,
.reset-filters-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-filters-btn {
    background: #1a1a1a;
    color: #ffffff;
}

.apply-filters-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.reset-filters-btn {
    background: #f5f5f5;
    color: #666;
}

.reset-filters-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* Filters Overlay */
.filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* ========================================
   Products Grid
======================================== */
.archive-products-wrapper {
    padding: 20px 0;
}

.products-grid {
    display: grid;
    grid-gap: 20px;
    margin-bottom: 50px;
}

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

.products-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.products-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.products-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.products-grid.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* List View */
.products-grid.list-mode {
    grid-template-columns: 1fr !important;
}

.products-grid.list-mode .product-card {
    display: grid;
    grid-template-columns: 250px 1fr auto;
    gap: 25px;
    padding: 25px;
}

/* ========================================
   No Products Found
======================================== */
.no-products-found {
    text-align: center;
    padding: 80px 20px;
}

.no-products-icon {
    margin-bottom: 25px;
    opacity: 0.3;
}

.no-products-icon svg {
    width: 80px;
    height: 80px;
    color: #666;
}

.no-products-found h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.no-products-found p {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-back-shop {
    display: inline-block;
    padding: 14px 32px;
    background: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back-shop:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* ========================================
   Pagination
======================================== */
.archive-pagination {
    padding: 40px 0;
    text-align: center;
}

.archive-pagination .woocommerce-pagination {
    border-top: 1px solid #e0e0e0;
    padding-top: 30px;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    gap: 8px;
}

.archive-pagination .page-numbers li {
    list-style: none;
}

.archive-pagination .page-numbers a,
.archive-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.archive-pagination .page-numbers a:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
    transform: translateY(-2px);
}

.archive-pagination .page-numbers .current {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1200px) {
    .products-grid.columns-6 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .products-grid.columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .category-banner {
        height: 280px;
    }
    
    .category-banner .category-title {
        font-size: 36px;
    }
    
    .archive-title {
        font-size: 32px;
    }
    
    .products-grid.columns-4,
    .products-grid.columns-5,
    .products-grid.columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .archive-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-center,
    .toolbar-right {
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .filters-panel {
        width: 100%;
        right: -100%;
    }
    
    .category-banner {
        height: 220px;
    }
    
    .category-banner .category-title {
        font-size: 28px;
    }
    
    .archive-title {
        font-size: 26px;
    }
    
    .products-grid.columns-3,
    .products-grid.columns-4,
    .products-grid.columns-5,
    .products-grid.columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid.list-mode .product-card {
        grid-template-columns: 1fr;
    }
    
    .view-mode-switcher {
        order: -1;
    }
}

@media (max-width: 480px) {
    .archive-header.minimal-header {
        padding: 40px 0 30px;
    }
    
    .archive-title {
        font-size: 22px;
    }
    
    .category-banner {
        height: 180px;
    }
    
    .products-grid {
        grid-gap: 15px;
    }
    
    .products-grid.columns-2,
    .products-grid.columns-3,
    .products-grid.columns-4,
    .products-grid.columns-5,
    .products-grid.columns-6 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Loading State
======================================== */
.products-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

