.banner{
    min-height: 500px;
    display: flex;
    margin-top: 5rem;
    align-items: center;
    gap: 1rem;
}
.banner h1{
    margin-bottom: 1rem;
}
.para-banner{
    flex: 5;
}
.banner video{
    width: 100%;
    height: 500px;
    object-fit: cover;
    flex: 7;
}
/* 탭 메뉴 */
.category-tabs {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    gap: 3rem; 
    margin-bottom: 1.5rem; 
    overflow-x: auto;
    padding-bottom: .5rem;
}

.tab { 
    background: none; 
    border: none; 
    padding: 0.7rem 0; 
    cursor: pointer; 
    font-size: 1rem; 
    color: #666; 
    position: relative; 
    /* flex: 1; */
    flex-shrink: 0;
}

.tab.active { 
    color: #000; 
    font-weight: bold; 
}

.tab.active::after { 
    content: ''; 
    position: absolute; 
    bottom: -1px; 
    left: 0; 
    width: 100%; 
    height: 2px; 
    background: #000; 
}

/* 필터 바 */
.filter-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.5rem; 
    font-size: .8rem; 
}

/* ⭐ 4열 그리드 설정 ⭐ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(300px, 1fr));
    gap: 1rem 1rem;
    margin-bottom: 6rem;
}

/* 상품 카드 스타일 */
.product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #C8C8C8;
    box-sizing: border-box;
    padding: 2rem 1.3rem;
    gap: 1rem;
}

.img-box { 
    width: 100%; 
    background: #fff; 
    margin-bottom: 1rem; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
.img-box img{
    max-height: 280px;
    object-fit: cover;
}
.info-box { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    /* height: 220px; */
}
.info-box2{
    height: 70px;
}
.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-bottom: 1px solid #C8C8C8;
    padding-bottom: 1.75rem;
}
.product-desc { 
    font-size: .8rem; 
    color: #666; 
    margin-bottom: .6rem; 
    line-height: 100%;
}
.price {
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    margin-top: 2rem;
}
.info-box .price.on {
    color: var(--pt-blue)
}
/* 버튼 스타일 */
.btn-cart {
    width: 100%;
    padding: .6rem 0;
    background: #fff;
    border: 1px solid var(--main-color);
    border-radius: 1.5rem;
    cursor: pointer;
    font-size: .9rem;
    transition: 0.2s;
    text-align: center;
}
.btn-cart:hover { background: #000; color: #fff; }

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 0;
    margin-bottom: 1rem;
}

.sort-container {
    position: relative;
}

/* 정렬기준 버튼 스타일 */
.sort-button {
    background: none;
    border: none;
    font-size: .8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .4rem;
    font-family: inherit;
}

/* 화살표 아이콘 (닫힘: 아래 방향) */
.arrow-icon {
    width: 12px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 4 5-4' stroke='%23000' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    transition: 0.3s; /* 부드러운 회전 효과 */
}

/* active 상태일 때 화살표 회전 (열림: 위 방향) */
.sort-container.active .arrow-icon {
    transform: rotate(180deg);
}

/* 드롭다운 리스트 스타일 */
.sort-list {
    position: absolute;
    top: 100%;
    right: 0;
    width: 140px;
    background: #fff;
    list-style: none;
    padding: .5rem 0;
    margin-top: .4rem;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    z-index: 10;
    
    /* 기본적으로 숨김 상태 */
    display: none;
}

/* active 상태일 때만 보이기 */
.sort-container.active .sort-list {
    display: block;
}

.sort-list li {
    padding: .5rem 1rem;
    font-size: .7rem;
    text-align: right;
    cursor: pointer;
}

.sort-list li:hover {
    font-weight: bold;
    background-color: var(--pt-blue);
    color: #fff;
}
@media (max-width:1440px){
    .banner {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 5rem;
    }
    .para-banner {
        align-self: flex-start;
        padding-top: 2rem;
        flex: auto;
    }
    .banner video {
        object-fit: cover;
        flex: auto;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width:1024px){
    .banner {
        gap: 1rem;
    }
    .product-grid {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
    }
}
@media (max-width:768px){
    .banner {
        min-height: 350px;
    }
    .banner video{
        height: 300px;
    }
    .product-grid {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }
    .img-box img{
        min-height: 280px;
        object-fit: cover;
    }
    
}
@media (max-width:400px){
    .product-grid {
        grid-template-columns: repeat(1,minmax(10px,1fr));
    }
    .category-tabs {
        justify-content: flex-start;
    }
    .price {
        margin-top: 1rem;
    }
    .product-card {
        padding: 1rem;
    }
    .product-name {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
}