/* 메인 페이지 전용 스타일 */

/* 카테고리 탭 컨테이너 */
.tab-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #eee;
}

/* 카테고리 탭 리스트 */
.tab-list {
    flex: 1;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding:15px 0;
    /* padding: 12px 8px; */
    gap: 8px;
    cursor: grab;
    user-select: none;
}
.tab-list:active {
    cursor: grabbing;
}
.tab-list::-webkit-scrollbar {
    display: none;
}
.tab-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 마우스 드래그 중 텍스트 선택 방지 */
.tab-list.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}
.tab-list.dragging .tab-item {
    pointer-events: none;
}

/* 화살표 버튼 */
.tab-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 40px;
    background: linear-gradient(to right, #fff 70%, transparent);
    border: none;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s;
}
.tab-arrow--left {
    background: linear-gradient(to left, transparent, #fff 30%);
}
.tab-arrow--right {
    background: linear-gradient(to right, transparent, #fff 30%);
}
.tab-arrow svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    transition: stroke 0.2s;
}
.tab-arrow:hover svg {
    stroke: var(--primary-color);
}
.tab-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}
.tab-arrow:disabled svg {
    stroke: #ccc;
}

/* 화살표 숨김 상태 (스크롤 불필요 시) */
.tab-arrow.hidden {
    display: none;
}

/* 배너 슬라이드 */
.banner-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}
.banner-list {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.banner-item {
    min-width: 100%;
    aspect-ratio: 16/9;
}
.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-indicator {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.banner-indicator__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s;
}
.banner-indicator__dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}
.banner-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

/* 서브 카테고리 스타일 */
.sub-category-wrap {
    padding: 8px 16px 12px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
}
.sub-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sub-category-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.sub-category-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.sub-category-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
/* 메인 카테고리에 서브 표시 화살표 */
.tab-item.has-sub::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.6;
}

/* 로딩 더보기 */
.load-more {
    display: flex;
    justify-content: center;
    padding: 20px;
}
.load-more__spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #eee;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 빈 상태 아이콘 */
.empty-state__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state__icon svg {
    width: 40px;
    height: 40px;
    stroke: #ccc;
}
