/* ========================================
   히어로 광고 슬라이드 스타일
   ======================================== */

/* 슬라이더 컨테이너 */
.banner-slider-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* 슬라이더 트랙 */
.banner-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 개별 슬라이드 */
.banner-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.banner-slide img {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    /* 16:6 컨테이너에 이미지를 꽉 채워서 표시 */
}

/* 광고 페이지네이션 */
.hero-pagination {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
}

/* 모바일 히어로 섹션 */
@media (max-width: 767px) {
    .hero-pagination {
        bottom: 12px;
        right: 12px;
        padding: 3px 8px;
        font-size: 11px;
    }
}

/* 일시정지/재생 버튼 */
.pause-button {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.pause-button:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

/* 재생 중 상태 (일시정지 아이콘 ||) */
.pause-button.playing .pause-icon-bar {
    display: block;
    width: 3px;
    height: 14px;
    background: white;
    border-radius: 1px;
    pointer-events: none; /* 자식 요소 클릭 방지 */
}

/* 일시정지 상태 (재생 아이콘 ▶) */
.pause-button.paused .pause-icon-bar {
    display: none;
}

.pause-button.paused::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 10px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    position: absolute;
    left: 17px;
}

/* 특가 상품 컨테이너 - 반응형 그리드 */
.special-deals-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* 울트라와이드 화면 - 7개 열 */
@media (min-width: 1921px) {
    .special-deals-container {
        grid-template-columns: repeat(7, 1fr);
    }
    /* 8번째 이후 카드 숨기기 (7개만 표시) */
    .special-deals-container .deal-card:nth-child(n+8) {
        display: none;
    }
}

/* 와이드 화면 - 6개 열 */
@media (min-width: 1600px) and (max-width: 1920px) {
    .special-deals-container {
        grid-template-columns: repeat(6, 1fr);
    }
    /* 7번째 이후 카드 숨기기 (6개만 표시) */
    .special-deals-container .deal-card:nth-child(n+7) {
        display: none;
    }
}

/* 데스크탑 화면 - 5개 열 */
@media (min-width: 1200px) and (max-width: 1599px) {
    .special-deals-container {
        grid-template-columns: repeat(5, 1fr);
    }
    /* 6번째 이후 카드 숨기기 (5개만 표시) */
    .special-deals-container .deal-card:nth-child(n+6) {
        display: none;
    }
}

/* 태블릿 - 1줄 가로 스크롤 */
@media (max-width: 1199px) and (min-width: 768px) {
    .special-deals-container {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        /* 컨테이너를 왼쪽 끝까지 확장 - 스크롤 시 여백 없이 이동 */
        margin-left: -24px;
        width: calc(100% + 24px);
        padding-right: 24px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* scroll-snap 제거 - 초기 자동 스크롤 방지 */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .special-deals-container::-webkit-scrollbar {
        display: none;
    }

    .special-deals-container .deal-card {
        width: 240px;
        min-width: 240px;
        flex: 0 0 auto;
    }

    /* 첫 번째 카드에 좌측 마진 - 타이틀과 시작점 정렬 */
    .special-deals-container .deal-card:first-of-type {
        margin-left: 24px;
    }
}

/* 모바일 - 1줄 가로 스크롤 */
@media (max-width: 767px) {
    .special-deals-container {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        /* 컨테이너를 왼쪽 끝까지 확장 - 스크롤 시 여백 없이 이동 */
        margin-left: -16px;
        width: calc(100% + 16px);
        padding-right: 16px;
        padding-bottom: 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* scroll-snap 제거 - 초기 자동 스크롤 방지 */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .special-deals-container::-webkit-scrollbar {
        display: none;
    }

    .special-deals-container .deal-card {
        width: calc((100vw - 52px) / 2.5);
        min-width: calc((100vw - 52px) / 2.5);
        flex: 0 0 auto;
    }

    /* 첫 번째 카드에 좌측 마진 - 타이틀과 시작점 정렬 */
    .special-deals-container .deal-card:first-of-type {
        margin-left: 16px;
    }
}

/* 상품 카드 스타일 */
.deal-card {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deal-card-image {
    width: 100%;
    aspect-ratio: 1/1;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #F7F7F7;
}

.deal-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0.04) 100%), #F7F7F7;
    background-size: cover;
    background-position: center;
    background-image: inherit;
    transition: transform 0.3s ease;
}

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

.deal-heart-icon {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deal-heart-icon svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.deal-heart-icon svg path {
    fill: none;
    stroke: white;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.deal-heart-icon:hover svg path {
    fill: #FE6769;
    stroke: #FE6769;
}

.deal-heart-icon.active svg path {
    fill: #FE6769;
    stroke: #FE6769;
}

/* AI Brain Icon Styles */
.ai-brain-icon {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.ai-brain-icon svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ai-brain-icon svg path {
    transition: all 0.3s ease;
}

.ai-brain-icon:hover svg ellipse:nth-of-type(1) {
    stroke: #9c40ff;
}

.ai-brain-icon:hover svg ellipse:nth-of-type(2) {
    stroke: #ffaa40;
}

.ai-brain-icon:hover svg ellipse:nth-of-type(3) {
    stroke: #ff6b6b;
}

.ai-brain-icon.active svg ellipse:nth-of-type(1) {
    stroke: #9c40ff;
}

.ai-brain-icon.active svg ellipse:nth-of-type(2) {
    stroke: #ffaa40;
}

.ai-brain-icon.active svg ellipse:nth-of-type(3) {
    stroke: #ff6b6b;
}

.deal-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0px 0px 12px 0px;
}

.deal-text-info {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

.deal-title {
    color: black;
    font-size: 13px;
    font-family: Pretendard;
    font-weight: 500;
    margin-bottom: 3px;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

.deal-location {
    color: #9E9E9E;
    font-size: 13px;
    font-family: Pretendard;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

.deal-price-section {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

.deal-current-price {
    color: #363636;
    font-size: 16px;
    font-family: Pretendard;
    font-weight: 600;
    line-height: 24px;
    padding: 0;
    margin: 0;
}

.deal-original-price {
    color: #555555;
    font-size: 14px;
    font-family: Pretendard;
    font-weight: 400;
    text-decoration: line-through;
    padding: 0;
    margin: 0;
    line-height: 20px;
}

.deal-discount {
    color: #FF4D4F;
    font-size: 14px;
    font-family: Pretendard;
    font-weight: 600;
}

/* ========================================
   프로모션 뱃지 - 반려동물 뱃지와 통일된 스타일
   ======================================== */
.promotion-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-family: Pretendard;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 1px solid #FF8A65;
    max-width: fit-content;
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* 불꽃 아이콘 */
.promotion-badge .fire-icon {
    display: inline-block;
    font-size: 11px;
}

/* "특가" 텍스트 */
.promotion-badge .promo-text {
    color: #E65100;
    font-weight: 600;
}

/* 호버 효과 */
.promotion-badge:hover {
    transform: translateY(-0.5px);
    filter: drop-shadow(0 2px 4px rgba(255, 107, 107, 0.3));
    background: linear-gradient(135deg, #FFE0B2 0%, #FFCC80 100%);
}

/* 모바일 최적화 */
@media (max-width: 767px) {
    .promotion-badge {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 10px;
    }

    .promotion-badge .fire-icon {
        font-size: 10px;
    }
}

/* 상품 수 쉬머 효과 - Shimmer Sweep (Text Shadow 방식) */
.product-count-shimmer {
    display: inline-block;
    color: #9E9E9E;
    font-weight: 500;
    background: linear-gradient(
        90deg,
        #9E9E9E 0%,
        #9E9E9E 30%,
        #333 50%,
        #9E9E9E 70%,
        #9E9E9E 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-position: 150% 0;
    animation: shimmer-sweep 3s ease-in-out infinite;
}

@keyframes shimmer-sweep {
    0% {
        background-position: 150% 0;
    }
    33% {
        background-position: -50% 0;
    }
    100% {
        background-position: -50% 0;
    }
}

/* AI Score 애니메이션 효과 - Number Ticker + Animated Gradient */
.ai-score-number {
    display: inline-block;
    font-weight: 500;
    background: linear-gradient(
        90deg,
        #9c40ff 0%,
        #ffaa40 50%,
        #ff6b6b 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 3s ease-in-out infinite;
}

@keyframes gradient-flow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}
