/* =============================================
   CATEGORY / PRODUCT LIST PAGE
   ============================================= */

/* Breadcrumb */
.breadcrumb-bar {
    background: #f2f4f5;
    border-bottom: 1px solid #e4e7e9;
    padding: 14px 18vw;
    border-radius: 4px;
}

.breadcrumb-inner {
    /* max-width: 1440px; */
    /* margin: 0 auto; */
    /*padding: 12px 18vw;*/
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-500);
}

.bc-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--gray-600);
    transition: color .15s;
}

.bc-link:hover { color: var(--blue-main); }

.bc-sep { color: var(--gray-300); }

.bc-current { color: var(--blue-main); font-weight: 500; }

/* ===== Layout ===== */
.category-page {
    /* background: #f2f4f5; */
    min-height: calc(100vh - 144px);
    padding-bottom: 40px;
}

.category-layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 48px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* ===== Sidebar ===== */
.filter-sidebar {
    width: 228px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e4e7e9;
    padding: 0 0 8px;
}

.filter-group {
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 16px 12px;
}

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

.filter-group-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-700);
    padding: 2px 0;
    transition: color .15s;
}

.filter-option:hover { color: var(--gray-900); }

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

.radio-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #c0c8cc;
    flex-shrink: 0;
    position: relative;
    transition: border-color .15s;
}

.filter-option.selected .radio-dot,
.filter-option input[type="radio"]:checked ~ .radio-dot {
    border-color: var(--primary-500);
    background: var(--primary-500);
    box-shadow: inset 0 0 0 3px #fff;
}

.filter-option.selected .option-label {
    color: var(--primary-500);
    font-weight: 500;
}

/* ===== Product Section ===== */
.product-section {
    flex: 1;
    min-width: 0;
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.product-card {
    background: #fff;
    border: 1px solid #e4e7e9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.product-img-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform .3s;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.04);
}

.product-img-placeholder {
    color: #c8d0d4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-info {
    padding: 10px 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-900);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
}

.price-sale {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-500);
}

.price-original {
    font-size: 11px;
    color: var(--gray-300);
    text-decoration: line-through;
}

/* ===== No Products ===== */
.no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 300px;
    color: var(--gray-300);
    font-size: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e4e7e9;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    background: #fff;
    border: 1px solid #e4e7e9;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    padding: 0 10px;
}

.page-btn:hover:not(.active):not(.disabled) {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.page-btn.active {
    background: var(--primary-500);
    color: #fff;
    border-color: var(--primary-500);
    cursor: default;
}

.page-btn.disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}

.page-prev, .page-next {
    padding: 0 8px;
}

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

@media (max-width: 900px) {
    .category-layout {
        flex-direction: column;
        padding: 16px 16px;
    }

    .filter-sidebar {
        width: 100%;
    }

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

    .breadcrumb-inner {
        padding: 0 16px;
    }
}

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