/* Ceramic Product Filter Styles */

/* Salient 테마 호환성 - 강제 리셋 */
.ceramic-product-filter * {
    box-sizing: border-box;
}

.ceramic-product-filter {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto;
    padding: 40px 60px;
    box-sizing: border-box;
    clear: both;
    overflow: visible;
}

/* 필터 및 제품 컨텐츠 래퍼 */
.filter-content-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 40px;
    width: 100%;
    align-items: flex-start !important;
    clear: both;
    max-width: 1920px;
    margin: 0 auto;
}

/* 필터 사이드바 */
.filter-sidebar {
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    float: none !important;
}

.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 15px;
}

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

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    cursor: pointer;
    user-select: none;
}

.filter-title span {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.filter-title.collapsed span {
    transform: rotate(-90deg);
}

.filter-options {
    display: block;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-options.collapsed {
    max-height: 0;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #333;
}

.filter-option label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.filter-option:hover label {
    color: #333;
}

/* 제품 컨테이너 */
.products-container {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.products-count {
    font-size: 14px;
    color: #666;
}

/* 제품 그리드 */
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* 정확히 4칸 */
    gap: 40px;
    margin-bottom: 40px;
    width: 100%;
    list-style: none !important;
    padding: 0 !important;
}

/* 제품 링크 */
.product-item-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.product-item {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    list-style: none !important;
}

.product-item-link:hover .product-item {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    padding-top: 66.67%; /* 3:2 비율 (2/3 = 0.6667) */
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
}

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

.product-item-link:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.product-tag {
    font-size: 11px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* 로딩 상태 */
.products-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.products-loading.active {
    display: block;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* 제품 없음 */
.no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #999;
}

/* 페이지네이션 */
.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-button {
    min-width: 40px;
    height: 40px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-button:hover:not(:disabled) {
    background: #333;
    color: #fff;
    border-color: #333;
}

.pagination-button.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.pagination-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 반응형 */
@media (max-width: 1400px) {
    .ceramic-product-filter {
        padding: 30px 50px;
    }
    
    .filter-content-wrapper {
        gap: 35px;
    }
    
    .products-grid {
        gap: 35px;
    }
}

@media (max-width: 1200px) {
    .ceramic-product-filter {
        padding: 30px 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3칸으로 */
        gap: 30px;
    }
}

@media (max-width: 900px) {
    .ceramic-product-filter {
        padding: 25px 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2칸으로 */
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .ceramic-product-filter {
        padding: 20px;
    }
    
    .filter-content-wrapper {
        flex-direction: column !important;
        gap: 30px;
    }
    
    .filter-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    .products-container {
        width: 100% !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    
    .filter-group {
        margin-bottom: 20px;
    }
    
    .filter-title {
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .ceramic-product-filter {
        padding: 15px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .product-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
}

