/* 제품 갤러리 스타일 */
.product-gallery-container {
    background: #ffffff;
    padding: 40px 0;
    min-height: 100vh;
}

/* 상단 필터 영역 */
.gallery-filters {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 브랜드 필터 컨테이너 */
.brand-filter-container {
    margin-bottom: 30px;
}

.brand-filter-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.brand-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.brand-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    min-height: 50px;
}

.brand-tab:hover {
    border-color: #f9ba02;
    background: #fffbf0;
}

.brand-tab.active {
    border-color: #f9ba02;
    background: #f9ba02;
    color: #ffffff;
}

.brand-tab .brand-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.brand-tab.active .brand-text {
    color: #ffffff;
}

.brand-tab .brand-logo {
    max-height: 30px;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.brand-tab.active .brand-logo {
    filter: none;
    opacity: 1;
}

.brand-tab:hover .brand-logo {
    filter: none;
}

/* 분류 탭 - 테두리 스타일 */
.category-tabs {
    display: flex;
    background: #ffffff;
    border-radius: 0;
    padding: 0;
    margin: 0 0 40px 0;
    border: 1px solid #e0e0e0;
    justify-content: stretch;
    gap: 0;
    position: relative;
    width: 100%;
}

.category-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    z-index: 1;
}

.category-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #141B54;
    padding: 20px 30px;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    outline: none !important;
    box-shadow: none !important;
    border-right: 1px solid #e0e0e0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.category-tab:last-child {
    border-right: none;
}

.category-tab:first-child {
    border-radius: 0;
}

.category-tab:last-child {
    border-radius: 0;
}

.category-tab.active {
    background: #ffffff;
    color: #141B54;
    border-bottom: 3px solid #f9ba02;
    z-index: 10;
    position: relative;
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #f9ba02;
    z-index: 11;
}

.category-tab:hover:not(.active) {
    background: #f8f9fa;
    color: #141B54;
}

/* 탭 중간선 추가 - 더 명확한 분리선 */
.category-tabs::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60%;
    background: #d0d0d0;
    z-index: 2;
}

.category-checkbox-item {
    font-size: 15px;
}


/* 카테고리 필터 체크박스 */
.category-filters {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 0;
    margin-bottom: 20px;
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-checkbox-item:hover {
    border-color: #ffc107;
    background: #fffbf0;
}

.filter-checkbox-item.selected {
    border-color: #ffc107;
    background: #fffbf0;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.filter-checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #ffc107;
}

.filter-checkbox-item label {
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
    flex: 1;
}

/* 검색바 */
.search-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.search-btn {
    padding: 12px 30px;
    background: #141B54;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
}

/* 갤러리 그리드 */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* 제품 카드 */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
}

.brand-logo-image {
    max-width: 60px;
    max-height: 20px;
    object-fit: contain;
}

.brand-name-fallback {
    display: inline-block;
    padding: 4px 12px;
    background: #ffc107;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-image-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

.product-name-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name-link:hover {
    color: #4299e1;
    text-decoration: none;
}

.product-features {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 0;
}

/* 로딩 상태 */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffc107;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .brand-tab {
        padding: 10px 15px;
        min-width: 70px;
        min-height: 45px;
    }

    .brand-tab .brand-text {
        font-size: 13px;
    }

    .brand-tab .brand-logo {
        max-width: 35px;
        max-height: 25px;
    }

    .brand-filter-tabs {
        gap: 10px;
    }

    .category-tab {
        padding: 15px 20px;
        font-size: 14px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 모바일에서 중간선 높이 조정 */
    .category-tabs::before {
        height: 50%;
        top: 25%;
    }
}

@media (max-width: 576px) {
    .brand-tab {
        padding: 8px 12px;
        min-width: 60px;
        min-height: 40px;
    }

    .brand-tab .brand-text {
        font-size: 12px;
    }

    .brand-tab .brand-logo {
        max-width: 30px;
        max-height: 20px;
    }

    .brand-filter-tabs {
        gap: 8px;
    }

    .category-tab {
        padding: 12px 16px;
        font-size: 13px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 소형 모바일에서 중간선 높이 조정 */
    .category-tabs::before {
        height: 45%;
        top: 27.5%;
    }
}

@media (max-width: 1200px) {
    .product-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .category-filters {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-filters {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .category-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .category-tab {
        border-radius: 0;
        border-right: 2px solid #e9ecef;
    }
    
    .category-tab:first-child {
        border-radius: 8px 8px 0 0;
    }
    
    .category-tab:last-child {
        border-radius: 0 0 8px 8px;
        border-right: 2px solid #e9ecef;
    }
    
    .category-filters {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .search-input {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .category-filters {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        grid-template-columns: 1fr;
    }
    
    .filter-checkbox-item {
        padding: 8px 12px;
    }
    
    .filter-checkbox-item label {
        font-size: 13px;
    }
}
