/* ==========================================================================
   Recommended Showcase Styles (Xiaomi Style)
   ========================================================================== */

.rec-showcase-section {
    padding: 36px 0 24px 0;
    background-color: #f7f7f7 !important;
}

.rec-section-title {
    font-size: 30px;
    font-weight: 700;
    color: #111111;
    text-align: center;
    margin: 0 0 22px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Tabs Navigation */
.rec-tabs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 0 0 24px 0;
    padding: 0;
    list-style: none;
    border: none;
}

.rec-tab-item {
    font-size: 15px;
    font-weight: 500;
    color: #333333;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 4px 4px 10px 4px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    text-decoration: none !important;
    outline: none;
    white-space: nowrap;
}

.rec-tab-item:hover {
    color: #ff6900;
}

.rec-tab-item.active {
    color: #ff6900;
    font-weight: 700;
    border-bottom-color: #ff6900;
}

/* White Box Wrapper */
.rec-white-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.03);
}

/* Tab Panes */
.rec-tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.rec-tab-pane.active {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   Hero Featured Card (Top Row)
   ========================================================================== */
.rec-hero-card {
    display: flex;
    flex-direction: row;
    background: #f7f7f7;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    min-height: 380px;
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rec-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.rounded-circle {
    border-radius: 25% !important;
}

.rec-hero-media {
    flex: 0 0 50%;
    max-width: 50%;
    position: relative;
    background: #f7f7f7;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.rec-hero-img-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f7f7f7;
}

.rec-hero-img {
    width: 60%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: multiply;
    transition: transform 0.5s ease;
}

.rec-hero-card:hover .rec-hero-img {
    transform: scale(1.05);
}

.rec-hero-content {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 32px;
    background: #f7f7f7;
}

.rec-hero-title-link {
    text-decoration: none !important;
    color: inherit;
}

.rec-hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 10px 0;
    letter-spacing: -0.4px;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.rec-5g-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #111111;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    padding: 1px 5px;
    line-height: 1.1;
    vertical-align: middle;
}

.rec-hero-discount-badge {
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    margin-bottom: 8px;
}

.rec-hero-subtitle {
    font-size: 14px;
    color: #666666;
    margin-bottom: 16px;
    max-width: 85%;
    line-height: 1.4;
}

.rec-hero-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.rec-hero-price {
    font-size: 18px;
    font-weight: 700;
    color: #111111;
}

.rec-from-label {
    font-size: 14px;
    font-weight: 400;
    color: #666666;
    margin-right: 2px;
}

.rec-hero-old-price {
    font-size: 14px;
    color: #999999;
    text-decoration: line-through;
}

.rec-pill-btn {
    display: inline-block;
    background: #000000;
    color: #ffffff !important;
    border: 1.5px solid #000000;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 34px;
    border-radius: 24px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rec-pill-btn:hover {
    background: #ffffff;
    color: #000000 !important;
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Bottom Grid Cards (4 items in a row)
   ========================================================================== */
.rec-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rec-grid-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #f7f7f7;
    border-radius: 6px;
    padding: 24px 16px 20px;
    text-decoration: none !important;
    color: inherit;
    border: none;
    box-shadow: none;
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.rec-grid-card:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.rec-grid-img-wrap {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: #f7f7f7;
    transition: background-color 0.25s ease;
}

.rec-grid-card:hover .rec-grid-img-wrap {
    background: #f0f0f0;
}

.rec-grid-img {
    max-height: 140px;
    max-width: 85%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.3s ease;
}

.rec-grid-card:hover .rec-grid-img {
    transform: scale(1.05);
}

.rec-grid-title {
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    margin: 0 0 8px 0;
    line-height: 1.35;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-grid-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.rec-grid-price {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
}

.rec-grid-old-price {
    font-size: 13px;
    color: #999999;
    text-decoration: line-through;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
    .rec-section-title {
        font-size: 26px;
    }
    
    .rec-hero-card {
        min-height: 320px;
    }
    
    .rec-hero-title {
        font-size: 22px;
    }
    
    .rec-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 767px) {
    .rec-showcase-section {
        padding: 24px 0 16px 0;
    }

    .rec-section-title {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .rec-tabs-nav {
        gap: 16px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 15px 6px 15px;
        margin-bottom: 18px;
        scrollbar-width: none; /* Firefox */
    }
    
    .rec-tabs-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .rec-tab-item {
        font-size: 14px;
        padding-bottom: 6px;
    }
    
    .rec-hero-card {
        flex-direction: column;
        min-height: auto;
        margin-bottom: 12px;
    }
    
    .rec-hero-media {
        flex: 0 0 100%;
        max-width: 100%;
        height: 220px;
    }
    
    .rec-hero-content {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 22px 16px 20px 16px;
    }
    
    .rec-hero-title {
        font-size: 19px;
    }
    
    .rec-hero-subtitle {
        font-size: 13px;
        max-width: 100%;
    }
    
    .rec-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .rec-grid-card {
        padding: 16px 10px 14px 10px;
        border-radius: 12px;
    }
    
    .rec-grid-img-wrap {
        height: 110px;
        margin-bottom: 8px;
    }
    
    .rec-grid-img {
        max-height: 95px;
    }
    
    .rec-grid-title {
        font-size: 13px;
        min-height: 34px;
        margin-bottom: 6px;
    }
    
    .rec-grid-price {
        font-size: 13px;
    }
    
    .rec-grid-old-price {
        font-size: 11px;
    }
}
