/* 카테고리 상단 배너 */
.category-banner-section {
    width: auto;
    text-align: center;
    margin: 25px 0;
}

.category-top-banner {
    width: auto;
    max-width: 100%;
    max-height: 400px;
}

@media (max-width: 768px) {
    .category-top-banner {
        max-height: 200px;
    }
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-badges .badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 3px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-custom {
    background: #252223;
    color: #fff;
}

.badge-new {
    background: #252223;
    color: #fff;
}

.badge-sale {
    background: #dc3545;
    color: #fff;
}

.badge-best {
    background: #ffc107;
    color: #000;
}

.product-title {
    font-size: 13px;
    margin: 8px 0;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
}

.product-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--default-color);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
}

.product-title a:hover {
    color: var(--accent-color);
}

.product-category {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #252223;
}

.product-price .original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 6px;
}

.sidebar .form-check {
    padding-left: 0;
    margin-bottom: 10px;
}

.sidebar .form-check-input {
    display: none;
}

.sidebar .form-check-label {
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    line-height: 20px;
    transition: color 0.2s;
}

.sidebar .form-check-label:hover {
    color: #252223;
}

.sidebar .form-check-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    background: #fff;
    transition: all 0.3s;
}

.sidebar .category-checkbox + label::before {
    border-radius: 4px;
}

.sidebar input[type="radio"] + label::before {
    border-radius: 50%;
}

.sidebar .form-check-input:checked + label::before {
    background: #252223;
    border-color: #252223;
}

.sidebar .form-check-label::after {
    content: '';
    position: absolute;
    display: none;
}

.sidebar .category-checkbox:checked + label::after {
    display: block;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.sidebar input[type="radio"]:checked + label::after {
    display: block;
    left: 6px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.sidebar .form-check-input:hover:not(:checked) + label::before {
    border-color: #252223;
}

.sidebar .form-check-input:focus + label::before {
    box-shadow: 0 0 0 3px rgba(37, 34, 35, 0.1);
}

.sidebar .subcategory-list .form-check-label {
    font-size: 13px;
    font-weight: 400;
}

.sidebar .fw-bold {
    font-weight: 600 !important;
}

.widget-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #252223;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #252223;
}

.btn-primary,
.search-btn {
    background: #252223;
    border-color: #252223;
    color: #fff;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.search-btn:hover {
    background: #1a1819;
    border-color: #1a1819;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 34, 35, 0.3);
}

.btn-primary:active,
.search-btn:active {
    background: #0d0c0d;
    border-color: #0d0c0d;
    transform: translateY(0);
}

.btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
    background: #fff;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #f8f9fa;
    border-color: #252223;
    color: #252223;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.form-control,
.form-select {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #252223;
    box-shadow: 0 0 0 3px rgba(37, 34, 35, 0.1);
    outline: none;
}

.input-group .form-control:focus {
    z-index: 3;
}

.input-group-text {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.page-link {
    color: #252223;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 0 4px;
    padding: 8px 14px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #f8f9fa;
    border-color: #252223;
    color: #252223;
}

.page-item.active .page-link {
    background: #252223;
    border-color: #252223;
    color: #fff;
}

.page-item.disabled .page-link {
    background: #fff;
    border-color: #dee2e6;
    color: #adb5bd;
}

.active-filters-widget .filter-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #495057;
}

.filter-tag .filter-remove {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-tag .filter-remove:hover {
    background: #dee2e6;
    color: #252223;
}

.products-toolbar {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.products-toolbar label {
    font-weight: 500;
}

.product-card .action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #252223;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-card .action-btn:hover {
    background: #252223;
    color: #fff;
    transform: scale(1.1);
}

.filter-actions .btn {
    border-radius: 6px;
    font-size: 13px;
    padding: 6px 16px;
}

.price-inputs .input-group-text {
    font-size: 13px;
    padding: 6px 10px;
}

.price-inputs .form-control {
    font-size: 13px;
    padding: 6px 10px;
}

/* 상품 카드 이미지 확대 */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.product-card .product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card .product-image .main-image {
    position: absolute;
    top: 0;
    left: 0;
}

.product-card .product-image .hover-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image .hover-image {
    opacity: 1;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .product-details {
    padding: 12px 14px 16px;
}

.product-card .product-category {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-card .product-meta {
    margin-top: 8px;
}

.product-card .product-price {
    font-size: 15px;
    font-weight: 700;
    color: #252223;
}

/* 상단 필터 바 */
.filter-bar-container {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 0;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.filter-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #252223;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    background: #1a1819;
}

.filter-toggle-btn.active {
    background: #dc3545;
}

.filter-toggle-btn i {
    font-size: 16px;
}

.filter-count {
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.active-filter-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 12px;
    color: #495057;
}

.active-tag i {
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

.active-tag i:hover {
    color: #dc3545;
}

.search-inline {
    display: flex;
    align-items: center;
}

.search-inline .form-control {
    width: 200px;
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.search-inline .btn {
    border-radius: 0 8px 8px 0;
}

.sort-controls {
    display: flex;
    gap: 8px;
}

.sort-controls .form-select {
    width: auto;
    min-width: 100px;
}

/* 펼침형 필터 패널 */
.filter-panel {
    display: none;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 24px 0;
    animation: slideDown 0.3s ease;
}

.filter-panel.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-panel-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.filter-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #252223;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #252223;
}

.filter-section-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.filter-checkbox-item,
.filter-radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-checkbox-item.sub-category {
    padding-left: 16px;
    font-size: 13px;
}

.filter-checkbox-item .form-check-input,
.filter-radio-item .form-check-input {
    margin: 0;
    cursor: pointer;
}

.filter-checkbox-item .form-check-label,
.filter-radio-item .form-check-label {
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

.type-filter-inline {
    flex-direction: row;
    gap: 16px;
}

.price-filter-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-separator {
    color: #6c757d;
    font-weight: 600;
}

.filter-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    grid-column: 1 / -1;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    margin-top: 8px;
}

/* 상품 카드 색상 스와치 및 사이즈 표시 (이미지 바로 아래) */
.product-color-swatch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    min-height: 38px;
    gap: 8px;
}

.color-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    flex: 1;
}

.color-swatch-item {
    width: 16px;
    height: 16px;
    border-radius: 1px;
    display: inline-block;
    cursor: default;
    flex-shrink: 0;
}

.color-swatch-item.light {
    border: 1px solid #ddd;
}

.size-range-badge {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 반응형 */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-bar-left,
    .filter-bar-right {
        justify-content: space-between;
    }

    .search-inline .form-control {
        width: 100%;
        flex: 1;
    }

    .filter-panel-content {
        grid-template-columns: 1fr;
    }

    .category-filter-grid {
        grid-template-columns: 1fr;
    }

    .type-filter-inline {
        flex-direction: column;
        gap: 8px;
    }

    .price-filter-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .price-separator {
        text-align: center;
    }

    .color-swatch-item {
        width: 16px;
        height: 16px;
    }

    .size-range-badge {
        font-size: 12px;
    }
}
