/* 부티몰 카테고리 집중 브라우징 추천 시스템 CSS */

/* 추천 컨테이너 */
.bootimall-recommend {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 15px;
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

.recommend-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.recommend-header::before,
.recommend-header::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: linear-gradient(to right, transparent, #d4af37, transparent);
}

.recommend-header::before {
    left: 0;
}

.recommend-header::after {
    right: 0;
}

.recommend-title {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    letter-spacing: 1px;
    padding: 0 15px;
    background: #fff;
    position: relative;
}

.recommend-subtitle {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 카드 그리드 */
.recommend-grid {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 개별 카드 */
.recommend-card {
    flex: 1;
    max-width: 220px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    /* 슬라이드 애니메이션 */
    opacity: 0;
    transform: translateX(100%);
    animation: slideInCard 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.recommend-card:nth-child(1) { animation-delay: 0s; }
.recommend-card:nth-child(2) { animation-delay: 0.15s; }
.recommend-card:nth-child(3) { animation-delay: 0.3s; }

.recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* 슬라이드 애니메이션 키프레임 */
@keyframes slideInCard {
    0% {
        opacity: 0;
        transform: translateX(60px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 리프레시 시 재애니메이션 */
.recommend-card.refreshing {
    animation: slideInCard 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 썸네일 */
.recommend-thumb {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9f9f9;
}

.recommend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommend-card:hover .recommend-thumb img {
    transform: scale(1.05);
}

/* 카드 정보 영역 */
.recommend-info {
    padding: 12px;
}

.recommend-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 36px;
    margin-bottom: 8px;
}

.recommend-price-wrap {
    margin-bottom: 8px;
}

.recommend-original-price {
    font-size: 11px;
    color: #bbb;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.recommend-sale-price {
    font-size: 15px;
    font-weight: 700;
    color: #c62828;
}

.recommend-reason {
    font-size: 11px;
    color: #8d6e2e;
    line-height: 1.4;
    padding-top: 8px;
    border-top: 1px solid #f5f0e5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 버튼 영역 */
.recommend-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.recommend-btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.recommend-btn-more {
    background: linear-gradient(135deg, #d4af37, #c49b2a);
    color: #fff;
    box-shadow: 0 2px 8px rgba(212,175,55,0.3);
}

.recommend-btn-more:hover {
    background: linear-gradient(135deg, #c49b2a, #b38b1e);
    box-shadow: 0 4px 12px rgba(212,175,55,0.4);
    transform: translateY(-1px);
}

.recommend-btn-stop {
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
}

.recommend-btn-stop:hover {
    color: #666;
    border-color: #bbb;
}

/* 로딩 */
.recommend-loading {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 13px;
}

.recommend-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: recommendSpin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes recommendSpin {
    to { transform: rotate(360deg); }
}

/* 페이드아웃 애니메이션 */
.recommend-fadeout {
    animation: fadeOutRecommend 0.3s ease forwards;
}

@keyframes fadeOutRecommend {
    to {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .bootimall-recommend {
        margin: 20px auto;
        padding: 0 10px;
    }

    .recommend-header::before,
    .recommend-header::after {
        width: 20%;
    }

    .recommend-grid {
        gap: 8px;
    }

    .recommend-card {
        max-width: none;
    }

    .recommend-thumb {
        aspect-ratio: 1;
    }

    .recommend-info {
        padding: 8px;
    }

    .recommend-name {
        font-size: 11px;
        height: 30px;
    }

    .recommend-sale-price {
        font-size: 13px;
    }

    .recommend-original-price {
        font-size: 10px;
    }

    .recommend-reason {
        font-size: 10px;
    }

    .recommend-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}
