@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400&family=Rubik:wght@500&display=swap');

/* 슬라이드 전체 프레임 */
.slider-viewport {
    overflow: hidden;
    position: relative;
}

/* 트랙(슬라이드들을 감싸는 부모) */
.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible !important;
}

/* 각 슬라이드 그룹(그리드) */
.slider-slide {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 100%;
    display: none;
    opacity: 0;
    z-index: 10;
    background: transparent;
    overflow: visible !important;
    transition: opacity 0.5s, transform 0.5s;
}
.slider-slide.active {
    display: grid;
    z-index: 1000 !important;
    opacity: 1;
    transform: translateX(0);
}

/* 오른쪽에서 들어오는 애니메이션 */
.slider-slide.slide-in.from-right {
    display: grid;
    z-index: 1500;
    opacity: 1;
    transform: translateX(100%);
    animation: slide-in-right 0.5s forwards;
}
@keyframes slide-in-right {
    from { transform: translateX(100%); opacity: 1;}
    to   { transform: translateX(0);   opacity: 1;}
}
/* 왼쪽에서 들어오는 애니메이션 */
.slider-slide.slide-in.from-left {
    display: grid;
    z-index: 1500;
    opacity: 1;
    transform: translateX(-100%);
    animation: slide-in-left 0.5s forwards;
}
@keyframes slide-in-left {
    from { transform: translateX(-100%); opacity: 1;}
    to   { transform: translateX(0);     opacity: 1;}
}
/* 왼쪽으로 나가기 */
.slider-slide.slide-out-left {
    display: grid;
    z-index: 900;
    opacity: 1;
    transform: translateX(0);
    animation: slide-out-left 0.5s forwards;
}
@keyframes slide-out-left {
    from { transform: translateX(0);     opacity: 1;}
    to   { transform: translateX(-100%); opacity: 0;}
}
/* 오른쪽으로 나가기 */
.slider-slide.slide-out-right {
    display: grid;
    z-index: 900;
    opacity: 1;
    transform: translateX(0);
    animation: slide-out-right 0.5s forwards;
}
@keyframes slide-out-right {
    from { transform: translateX(0);     opacity: 1;}
    to   { transform: translateX(100%);  opacity: 0;}
}

/* 카드(상품 하나) */
.wp-hc-product-card {
    pointer-events: auto;
    width: 254px !important;
    min-width: 254px !important;
    max-width: 254px !important;
    height: 330px !important;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    background: #F8F8F8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow: visible; /* 그림자 안잘리게 */
    position: relative;
    transition: box-shadow 0.22s cubic-bezier(0.32, 0.12, 0.33, 1.3);
    z-index: 10;
}
.wp-hc-product-card:hover {
    box-shadow: 12px 12px 28px -4px rgba(44,62,80,0.13);
    z-index: 9999 !important;
    position: relative !important;
}
.wp-hc-product-card.empty-card {
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

/* 이미지 영역 */
.prod-image-wrap {
    width: 254px;
    height: 170px;
    background: #CBCBCB;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.prod-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 제목/내용(고정 158px) */
.prod-info {
    width: 254px;
    height: 158px;
    background: #F8F8F8;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 14.5px 17.5px;
    box-sizing: border-box;
}
.prod-code {
    font-family: 'Rubik', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 20px;
    line-height: 24px;
    color: #000;
    margin-bottom: 8px;
}
.prod-summary {
    font-family: 'Noto Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    line-height: 24px;
    color: #4A4A4A;
    margin: 0;
    max-width: 214px;
    max-height: 96px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* 페이지네이션 */
.wp-hc-pagination {
    margin: 24px 0 0 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.wp-hc-pagination a,
.wp-hc-pagination .current {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 50%;
    background: #E1E1E1;
    text-indent: -9999px;
    border: none;
    margin: 0 2px;
    box-shadow: none;
    transition: background 0.15s;
    cursor: pointer;
}
.wp-hc-pagination .current {
    background: #333;
    border: 2px solid #333;
}
.wp-hc-pagination a:hover {
    background: #aaa;
}

/* 반응형(선택 적용) */
@media (max-width: 1024px) {
    .slider-viewport { width: 100% !important; }
    .wp-hc-product-card { width: 100% !important; }
    .prod-image-wrap,
    .prod-info { width: 100%; }
}
@media (max-width: 600px) {
    .slider-viewport { width: 100% !important; }
    .wp-hc-product-card { width: 100% !important; }
    .prod-image-wrap,
    .prod-info { width: 100%; }
}

.wp-hc-product-card.active-hover {
    position: absolute !important;
    left: 0;
    top: 0;
    /* 좌표계산 필요시 JS로 정확히 위치 지정 */
    z-index: 9999 !important;
    box-shadow: 12px 12px 28px -4px rgba(44,62,80,0.13);
}
