/**
 * Fresh Air - Giao diện Danh mục Sản phẩm
 * Phiên bản Việt hóa hoàn toàn
 * Màu sắc: Kế thừa từ theme (--primary-color, --secondary-color)
 * Font: Kế thừa từ Flatsome theme
 */

/* Reset cho section này */
.fresh-product-page * {
    box-sizing: border-box;
}

.fresh-product-page {
    background: #f5f8f8;
    padding: 0 0 4rem;
    font-family: inherit;
}

/* Ẩn Breadcrumb Flatsome mặc định */
.shop-page-title,
.woocommerce-breadcrumb,
.page-title-inner,
.category-page-title,
.archive-page-header {
    display: none !important;
}

/* Container chính */
.fresh-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Page Header */
.fresh-page-header {
    background: #fff;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

/* Custom Breadcrumb */
.fresh-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: #666;
}

.fresh-breadcrumb a {
    color: var(--primary-color, #004A99);
    text-decoration: none;
    transition: all 0.2s ease;
}

.fresh-breadcrumb a:hover {
    text-decoration: underline;
}

.fresh-breadcrumb .separator {
    color: #ccc;
}

.fresh-breadcrumb .current {
    font-weight: 600;
    color: #333;
}

.fresh-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.fresh-page-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Main Layout */
.fresh-main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Sidebar - Blauberg Industrial */
.fresh-filter-sidebar {
    background: #fff;
    border-radius: 0;
    padding: 0;
    border: 1px solid #d1d5db;
    position: sticky;
    top: 6rem;
    overflow: hidden;
}

/* Sidebar Header - Navy Block */
.fresh-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color, #004A99);
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: none;
    min-height: auto;
}

.fresh-filter-title-main {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fresh-filter-title-main i,
.fresh-filter-title-main .material-symbols-outlined {
    font-size: 1.1rem;
    color: #fff;
}

.fresh-clear-all {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.fresh-clear-all:hover {
    color: #fff;
}

.fresh-filter-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f5f5f5;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    line-height: 1;
}

.fresh-filter-group {
    margin-bottom: 0;
    padding: 1.5rem;
    border-bottom: 1px solid #e6e6e6;
}

.fresh-filter-group:last-child {
    border-bottom: none;
}

.fresh-filter-title {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-color, #004A99);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.fresh-filter-title i {
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.fresh-filter-group.collapsed .fresh-filter-title i {
    transform: rotate(-90deg);
}

.fresh-filter-group.collapsed .fresh-filter-options {
    display: none;
}

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

.fresh-filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.fresh-filter-option:hover {
    background: rgba(0, 166, 81, 0.05);
}

.fresh-filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary-color, #004A99);
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    transition: all 0.3s ease;
}

.fresh-filter-option input[type="checkbox"]:checked {
    background-color: var(--primary-color, #004A99);
    border-color: var(--primary-color, #004A99);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.fresh-filter-option label {
    flex: 1;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.fresh-filter-option:hover label {
    color: var(--primary-color, #004A99);
}

.fresh-count {
    font-size: 0.75rem;
    color: #666;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Price Slider */
.fresh-price-slider {
    padding: 1.5rem 0 0.5rem;
}

.fresh-slider-track {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    position: relative;
}

.fresh-slider-fill {
    position: absolute;
    left: 20%;
    right: 30%;
    height: 100%;
    background: var(--primary-color, #004A99);
    border-radius: 2px;
}

.fresh-slider-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #111;
    border: 2px solid var(--primary-color, #004A99);
    border-radius: 50%;
    cursor: pointer;
}

.fresh-slider-handle:first-child {
    left: 20%;
}

.fresh-slider-handle:last-child {
    right: 30%;
    left: auto;
    transform: translate(50%, -50%);
}

.fresh-slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

/* Promo Banner in Sidebar */
.fresh-promo-banner {
    background: linear-gradient(135deg, var(--primary-color, #004A99) 0%, #003D7E 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius-md, 12px);
    color: #fff;
    margin-top: 1rem;
}

.fresh-promo-banner h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #fff;
}

.fresh-promo-banner p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.fresh-promo-btn {
    display: block;
    width: 100%;
    background: #fff !important;
    color: var(--primary-color, #004A99) !important;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fresh-promo-btn:hover {
    background: #111 !important;
    color: #fff !important;
}

/* Products Area */
.fresh-products-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fresh-products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.fresh-result-count {
    font-weight: 500;
    font-size: 0.875rem;
    color: #666;
}

.fresh-result-count strong {
    color: var(--primary-color, #004A99);
}

.fresh-sort-select {
    height: 50px;
    padding: 0 2.5rem 0 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 1rem center;
    background-size: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    min-width: 180px;
}

.fresh-sort-select:focus {
    outline: none;
    border-color: var(--primary-color, #004A99);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.15);
}

/* Mobile Filter Button */
.fresh-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color, #004A99);
    color: #fff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* Product Grid */
.fresh-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Product Card - Global Link */
.fresh-product-card {
    background: #fff;
    border-radius: var(--border-radius-md, 2px);
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.fresh-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color, #004A99);
    transform: translateY(-2px);
}

/* Card Link Overlay */
.fresh-product-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.fresh-product-image {
    position: relative;
    padding-top: 100%;
    background: #f9fafb;
    overflow: hidden;
}

.fresh-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.fresh-product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    letter-spacing: 0.5px;
}

.fresh-product-badge--bestseller {
    background: rgba(0, 166, 81, 0.15);
    color: var(--primary-color, #004A99);
}

.fresh-product-badge--new {
    background: #17a2b8;
    color: #fff;
}

.fresh-product-badge--sale {
    background: var(--secondary-color, #E30613);
    color: #fff;
}

.fresh-product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 2;
}

.fresh-product-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.25rem;
}

.fresh-product-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.fresh-product-name a {
    color: #111;
    text-decoration: none;
    transition: all 0.3s ease;
}

.fresh-product-name a:hover {
    color: var(--primary-color, #004A99);
}

.fresh-product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color, #004A99);
    white-space: nowrap;
    margin-top: auto;
    margin-bottom: 0.75rem;
}

.fresh-product-desc {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

/* Product Meta/Attributes */
.fresh-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.fresh-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #333;
}

.fresh-meta-item .material-symbols-outlined {
    font-size: 14px;
    color: #666;
}

/* Buttons Container */
.fresh-product-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0;
    position: relative;
    z-index: 3;
}

/* Primary Button - Xem chi tiết (Blauberg Red) */
.fresh-btn-detail {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--btn-primary-bg, #E30613);
    color: #fff;
    padding: 10px 16px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: inherit;
    line-height: 1;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.fresh-btn-detail:hover {
    background: var(--btn-primary-hover, #C40511);
    color: #fff;
}

/* Secondary Button - Tư vấn (Blauberg Blue) */
.fresh-btn-consult {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--btn-secondary-bg, #004A99);
    color: #fff;
    padding: 10px 16px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: inherit;
    line-height: 1;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.fresh-btn-consult:hover {
    background: var(--btn-secondary-hover, #003D7E);
    color: #fff;
}

.fresh-btn-consult .material-symbols-outlined,
.fresh-btn-detail .material-symbols-outlined {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

/* Loading State */
.fresh-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #666;
    font-size: 1rem;
}

.fresh-loading .material-symbols-outlined {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* No Results */
.fresh-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.fresh-no-results .material-symbols-outlined {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: #ddd;
}

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

.fresh-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fresh-pagination-btn:hover {
    background: rgba(0, 166, 81, 0.1);
    border-color: var(--primary-color, #004A99);
}

.fresh-pagination-btn.active {
    background: var(--primary-color, #004A99);
    border-color: var(--primary-color, #004A99);
    color: #fff;
}

.fresh-pagination-ellipsis {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* Load More */
.fresh-load-more {
    text-align: center;
    margin-top: 2rem;
}

.fresh-load-more-btn {
    background: #fff;
    border: 2px solid var(--primary-color, #004A99);
    color: var(--primary-color, #004A99);
    padding: 0.875rem 2.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.fresh-load-more-btn:hover {
    background: var(--primary-color, #004A99);
    color: #fff;
}

/* Mobile Filter Button */
.fresh-mobile-filter-btn {
    display: none;
    background: var(--primary-color, #004A99);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

/* Overlay */
.fresh-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.fresh-filter-overlay.active {
    display: block;
}

/* Mobile Close Button */
.fresh-filter-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

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

@media (max-width: 1200px) {
    .fresh-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .fresh-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .fresh-main-layout {
        grid-template-columns: 1fr;
    }

    .fresh-filter-sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: 300px;
        z-index: 1000;
        border-radius: 0;
        transition: all 0.3s ease;
        overflow-y: auto;
        border: none;
        border-right: 1px solid #e0e0e0;
    }

    .fresh-filter-sidebar.open {
        left: 0;
    }

    .fresh-filter-close {
        display: block;
    }

    .fresh-mobile-filter-btn {
        display: inline-flex;
    }
}

@media (max-width: 640px) {
    .fresh-product-page {
        padding: 0 0 2rem;
    }

    .fresh-container {
        padding: 0 0.75rem;
    }

    .fresh-page-header {
        padding: 1rem 0;
    }

    .fresh-page-title {
        font-size: 1.25rem;
    }

    .fresh-page-subtitle {
        font-size: 0.85rem;
    }

    .fresh-breadcrumb {
        font-size: 0.75rem;
    }

    /* Toolbar mobile */
    .fresh-products-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .fresh-toolbar-actions {
        width: 100%;
    }

    .fresh-sort-select {
        width: 100%;
        min-width: auto;
        height: 44px;
    }

    .fresh-result-count {
        text-align: center;
        order: -1;
    }

    /* Product grid mobile */
    .fresh-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .fresh-product-info {
        padding: 0.75rem;
    }

    .fresh-product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .fresh-product-name {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .fresh-product-price {
        font-size: 0.9rem;
    }

    .fresh-product-desc {
        display: none;
    }

    .fresh-product-meta {
        display: none;
    }

    .fresh-product-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .fresh-btn-detail,
    .fresh-btn-consult {
        padding: 0.6rem;
        font-size: 0.75rem;
    }

    .fresh-pagination {
        gap: 0.25rem;
    }

    .fresh-pagination-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Animation */
@keyframes freshFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fresh-product-card {
    animation: freshFadeInUp 0.4s ease forwards;
}

.fresh-product-card:nth-child(1) {
    animation-delay: 0.05s;
}

.fresh-product-card:nth-child(2) {
    animation-delay: 0.1s;
}

.fresh-product-card:nth-child(3) {
    animation-delay: 0.15s;
}

.fresh-product-card:nth-child(4) {
    animation-delay: 0.2s;
}

.fresh-product-card:nth-child(5) {
    animation-delay: 0.25s;
}

.fresh-product-card:nth-child(6) {
    animation-delay: 0.3s;
}

/* =========================================
   PREMIUM CTA BLOCK - Project Inquiry
   ========================================= */
.fresh-cta-block {
    background: var(--primary-color, #004A99);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    margin-top: 1.5rem;
}

/* Decorative overlay square */
.fresh-cta-block::before {
    content: '';
    position: absolute;
    top: -2rem;
    right: -2rem;
    width: 6rem;
    height: 6rem;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.fresh-cta-block:hover::before {
    transform: rotate(45deg) scale(1.1);
}

.fresh-cta-title {
    font-size: 1.25rem;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.fresh-cta-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.fresh-cta-btn {
    display: block;
    width: 100%;
    background: var(--secondary-color, #E30613);
    color: #fff;
    padding: 0.875rem 1.5rem;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.2s ease;
}

.fresh-cta-btn:hover {
    background: #fff;
    color: var(--primary-color, #004A99);
}

/* Price Slider with Red Bar */
.fresh-slider-fill {
    background: var(--secondary-color, #E30613) !important;
}

.fresh-slider-handle {
    border-color: var(--primary-color, #004A99) !important;
}