/**
 * Archive Products Page Styles for Titan Fitnes Theme
 * 
 * @package Titan_Fitnes
 * @since 1.0.0
 */

/* ============================
   CATEGORY/BRAND DESCRIPTION SECTION (Bottom of page)
   ============================ */

   .archive-description-section {
    background-color: #000;
    padding: 80px 200px;
    position: relative;
}

.archive-description-container {
    max-width: 100%;
    margin: 0 auto;
}

.archive-description-content {
    position: relative;
    min-height: 300px;
}

/* Description Text */
.archive-description-text {
    max-width: 60%;
    color: #fff;
    position: relative;
    z-index: 2;
}

.description-content {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.description-content p {
    margin-bottom: 20px;
}

.description-content p:last-child {
    margin-bottom: 0;
}

/* Company Logo Background - Right side */
.archive-description-section .about-logo-bg {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    background-image: url('../images/titan-fitness-logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 1;
}

/* ============================
   BREADCRUMB & HEADER SECTION
   ============================ */

.archive-header-section {
    background-color: #000;
    padding: 40px 0 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.archive-header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 75px;
}

/* Breadcrumbs */
.archive-breadcrumbs {
    margin-bottom: 20px;
}

.archive-breadcrumbs .woocommerce-breadcrumb {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.archive-breadcrumbs .woocommerce-breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.archive-breadcrumbs .woocommerce-breadcrumb a:hover {
    color: var(--titan-primary);
}

/* Page Title */
.archive-page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* Archive Description */
.term-description {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
    line-height: 1.6;
}

/* ============================
   PRODUCTS SECTION WITH SIDEBAR
   ============================ */

.archive-products-section {
    background-color: #000;
    padding: 60px 0 100px 0;
    min-height: 100vh;
}

.archive-products-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 75px;
}

.archive-content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
}

/* ============================
   SIDEBAR FILTERS
   ============================ */

.archive-sidebar {
    position: sticky;
    top: 120px;
    align-self: start;
}

.archive-filters {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 25px;
}

.filter-toggle {
    display: none;
    width: 100%;
    padding: 15px;
    background-color: var(--titan-primary);
    color: #000;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-toggle:hover {
    background-color: #a3cc00;
}

.filter-toggle svg {
    stroke: #000;
}

/* Clear Filters Button */
.filter-clear-section {
    margin-bottom: 20px;
}

.btn-clear-filters {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-family: 'Sofia Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear-filters:hover {
    background-color: #3a3a3a;
    border-color: var(--titan-primary);
    color: var(--titan-primary);
}

.btn-clear-filters svg {
    width: 14px;
    height: 14px;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 15px 0;
}

/* Filter List */
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-list li:last-child {
    margin-bottom: 0;
}

/* Custom Checkbox */
.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 0;
}

.filter-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.filter-checkbox .filter-label {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    padding-left: 30px;
    position: relative;
    flex: 1;
    transition: color 0.3s ease;
}

.filter-checkbox .filter-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.filter-checkbox .filter-label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.filter-checkbox input[type="checkbox"]:checked + .filter-label::before {
    background-color: var(--titan-primary);
    border-color: var(--titan-primary);
}

.filter-checkbox input[type="checkbox"]:checked + .filter-label::after {
    transform: translateY(-50%) scale(1);
}

.filter-checkbox input[type="checkbox"]:checked + .filter-label {
    color: var(--titan-primary);
}

.filter-checkbox:hover .filter-label {
    color: var(--titan-primary);
}

.filter-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: auto;
}

/* Price Filter */
.price-filter-wrapper {
    padding: 10px 0;
}

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

.price-input {
    flex: 1;
    padding: 10px 12px;
    background-color: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    font-family: 'Sofia Sans', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.price-input:focus {
    outline: none;
    border-color: var(--titan-primary);
}

.price-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.price-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.btn-apply-price {
    width: 100%;
    padding: 10px;
    background-color: var(--titan-primary);
    color: #000;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-apply-price:hover {
    background-color: #a3cc00;
}

/* Submit Filters Button */
.filter-submit-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.btn-apply-filters {
    width: 100%;
    padding: 10px;
    background-color: var(--titan-primary);
    color: #000;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-apply-filters svg {
    width: 16px;
    height: 16px;
}

.btn-apply-filters:hover {
    background-color: #a3cc00;
}

/* Color Swatches Filter */
.color-swatches-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch-label {
    position: relative;
    cursor: pointer;
}

.color-swatch-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.color-swatch-box {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.color-swatch-label input[type="checkbox"]:checked + .color-swatch-box {
    border-color: var(--titan-primary);
    border-width: 3px;
    box-shadow: 0 0 0 2px #1a1a1a, 0 0 0 4px var(--titan-primary);
}

.color-swatch-label:hover .color-swatch-box {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ============================
   MAIN CONTENT AREA
   ============================ */

.archive-main-content {
    flex: 1;
}

/* Toolbar */
.archive-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 8px;
}

.results-count {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.results-count strong {
    color: var(--titan-primary);
    font-weight: 600;
}

/* Sorting Dropdown */
.archive-sorting .woocommerce-ordering {
    margin: 0;
}

.archive-sorting .orderby {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 15px;
    padding: 10px 35px 10px 15px;
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C6FF0A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.3s ease;
}

.archive-sorting .orderby:hover {
    border-color: var(--titan-primary);
}

.archive-sorting .orderby option {
    background-color: #000;
    color: #fff;
}

/* ============================
   PRODUCTS GRID
   ============================ */

.archive-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.archive-product-item {
    opacity: 1;
    animation: fadeInUp 0.5s ease;
}

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

/* ============================
   PAGINATION
   ============================ */

.archive-pagination {
    margin-top: 50px;
}

.archive-pagination .woocommerce-pagination {
    text-align: center;
}

.archive-pagination .woocommerce-pagination ul {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
}

.archive-pagination .woocommerce-pagination ul li {
    margin: 0;
}

.archive-pagination .woocommerce-pagination ul li a,
.archive-pagination .woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-pagination .woocommerce-pagination ul li a:hover,
.archive-pagination .woocommerce-pagination ul li span.current {
    background-color: var(--titan-primary);
    color: #000;
    border-color: var(--titan-primary);
}

/* ============================
   LOADING OVERLAY
   ============================ */

.products-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--titan-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.archive-products-grid.loading {
    position: relative;
    min-height: 500px;
}

/* ============================
   NO PRODUCTS FOUND
   ============================ */

.no-products-found {
    text-align: center;
    padding: 80px 20px;
}

.no-products-found .woocommerce-info {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-products p {
    font-family: 'Sofia Sans', sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    margin: 0;
}

/* ============================
   RESPONSIVE DESIGN
   ============================ */

@media (max-width: 1200px) {
    .archive-content-wrapper {
        grid-template-columns: 250px 1fr;
        gap: 40px;
    }
    
    .archive-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .archive-header-container,
    .archive-products-container {
        padding: 0 50px;
    }
    
    .archive-page-title {
        font-size: 40px;
    }
    
    .archive-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .archive-sidebar {
        position: static;
    }
    
    .filter-toggle {
        display: flex;
    }
    
    .filters-wrapper {
        display: none;
    }
    
    .filters-wrapper.active {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 1024px) {
    /* Archive Description Section - Tablet */
    .archive-description-section {
        padding: 60px 40px;
    }
    
    .archive-description-section .about-logo-bg {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    /* Archive Description Section - Responsive */
    .archive-description-section {
        padding: 50px 20px;
    }
    
    .archive-description-content {
        min-height: auto;
    }
    
    .archive-description-text {
        max-width: 100%;
    }
    
    .archive-description-section .about-logo-bg {
        width: 200px;
        height: 200px;
        opacity: 0.3;
    }
    
    .description-content {
        font-size: 15px;
    }
    
    .archive-header-section {
        padding: 30px 0 20px 0;
    }
    
    .archive-header-container,
    .archive-products-container {
        padding: 0 20px;
    }
    
    .archive-page-title {
        font-size: 32px;
    }
    
    .archive-products-section {
        padding: 40px 0 60px 0;
    }
    
    .archive-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 15px;
    }
    
    .results-count {
        font-size: 14px;
    }
    
    .archive-sorting {
        width: 100%;
    }
    
    .archive-sorting .orderby {
        width: 100%;
    }
    
    .archive-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .archive-filters {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    /* Archive Description Section - Mobile */
    .archive-description-section {
        padding: 40px 20px;
    }
    
    .archive-description-section .about-logo-bg {
        display: none;
    }
    
    .description-content {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .archive-page-title {
        font-size: 28px;
    }
    
    .results-count {
        font-size: 13px;
    }
    
    .archive-sorting .orderby {
        font-size: 14px;
        padding: 8px 30px 8px 12px;
    }
}

