/* 3_recommend.css - Completely Overhauled */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

.rec-sec {
    padding: 30px 0;
    background-color: #090A10;
    position: relative;
    font-family: 'Pretendard', sans-serif;
}

/* Header Area */
.section-title-wrap {
    text-align: left;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.recommend-badge {
    display: flex;
    align-items: center;
    color: #FF1F23;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.recommend-badge::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background-color: #FF1F23;
    margin-right: 8px;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.3;
}

.section-title span {
    color: #FFFFFF;
    /* Match the title */
}

.section-title-wrap::after {
    content: "게이밍부터 전문가 작업용까지 — 검증된 구성으로 바로 주문하세요";
    display: block;
    color: #8C8F9E;
    font-size: 16px;
    font-weight: 500;
    margin-top: 16px;
}

/* Tabs Area */
.rec-tabs {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    background-color: #101118;
    padding: 5px;
    border-radius: 40px;
    margin-bottom: 24px;
    gap: 4px;
}

.rec-tab {
    background: transparent;
    border: none;
    border-radius: 40px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #616472;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rec-tab:hover {
    color: #E2E4EB;
}

.rec-tab.active {
    background-color: #FF1F23;
    color: #FFFFFF;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background-color: #111218;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
    border: 1px solid #1E2028;
    position: relative;
    padding-bottom: 72px;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #3F4452;
}

/* Top Badge - 제거 (컴팩트 레이아웃) */
.product-card::before {
    display: none;
}

.product-delivery {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: rgba(35, 58, 45, 0.4);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: #4ADE80;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    width: fit-content;
}

.product-delivery svg {
    width: 11px;
    height: 11px;
}

/* Image */
.product-img-wrap {
    width: 100%;
    height: 140px;
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Text and Specs */
.product-info-wrapper {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 17px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 5px;
    letter-spacing: -0.02em;
}

.spec-badge {
    color: #8C8F9E;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 14px;
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    line-height: 1.5;
}

/* Performance Pills */
.game-perf-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.game-perf-item {
    background-color: rgba(255, 62, 66, 0.04);
    border: 1px solid rgba(255, 62, 66, 0.2);
    border-radius: 4px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-perf-name {
    color: #C0C3CC;
    font-size: 11px;
    font-weight: 600;
}

.game-perf-name svg {
    display: none;
    /* Hide icon to match design */
}

.game-perf-fps {
    color: #FF1F23;
    font-size: 11px;
    font-weight: 700;
}

/* Bottom Price & Button */
.product-price-wrap {
    position: absolute;
    bottom: 16px;
    left: 16px;
}

.price-label {
    display: block;
    font-size: 12px;
    color: #6D707D;
    margin-bottom: 2px;
    font-weight: 500;
}

.product-price {
    font-size: 20px;
    font-weight: 800;
    color: #FF1F23;
    display: flex;
    align-items: baseline;
    letter-spacing: -0.01em;
}

.product-price::before {
    content: '₩';
    margin-right: 2px;
    font-size: 22px;
}

.product-price span {
    display: none;
    /* Hide "원" */
}

.product-btn-group {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
}

.btn-cart {
    background-color: #FF1F23;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    border: none;
}

.btn-cart:hover {
    background-color: #F01015;
}

.btn-cart svg {
    display: none;
    /* Hide icon */
}

/* Hide the consult button to match the 1-button layout in the image */
.btn-consult {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 100%) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .rec-sec {
        padding: 48px 0;
    }

    .section-title {
        font-size: 32px !important;
        word-break: keep-all;
    }
}

@media (max-width: 768px) {
    .rec-sec {
        padding: 40px 0;
    }

    .section-title {
        font-size: 28px !important;
    }

    .section-title-wrap::after {
        font-size: 13px !important;
        margin-top: 10px !important;
    }
    
    .recommend-badge {
        font-size: 12px !important;
    }

    .rec-tabs {
        width: 100%;
        overflow-x: auto;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px;
    }

    .rec-tab {
        font-size: 13px;
        padding: 8px 16px;
        white-space: nowrap;
    }

    .rec-tabs::-webkit-scrollbar {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        padding: 16px;
        padding-bottom: 74px;
    }

    .product-img-wrap {
        height: 180px;
    }

    .product-title {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
        word-break: break-all;
    }
    
    .spec-badge {
        font-size: 11px !important;
        margin-bottom: 10px !important;
    }
    
    .game-perf-name, .game-perf-fps {
        font-size: 10px !important;
    }

    .price-label {
        font-size: 11px !important;
    }

    .product-price {
        font-size: 16px !important;
    }

    .product-price::before {
        font-size: 16px !important;
    }

    .btn-cart {
        font-size: 12px !important;
        padding: 8px 14px !important;
    }

    .product-desc {
        display: none;
        /* 핵심만 남기기 위해 감춤 */
    }

    /* 모바일에서 요소 수를 크게 줄이기 위해 5번째 카드부터 감춤 */
    .product-card:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-img-wrap {
        height: 180px;
    }
}