/* =============================================
   BESTSELLERS SECTION — Productos Más Vendidos
   ============================================= */

/* --- Sección --- */
.bestsellers-section {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8edf3 50%, #f5f7fa 100%);
    position: relative;
    overflow: hidden;
}

.bestsellers-section::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: rgba(37, 99, 235, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

/* --- Header de sección --- */
.bestsellers-section .section-header {
    position: relative;
}

.section-badge--fire {
    background: linear-gradient(135deg, #ef4444, #f97316) !important;
    color: #fff !important;
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-badge--fire i {
    margin-right: 6px;
}

/* --- Card del producto --- */
.bestseller-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.bestseller-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* --- Visual / Imagen --- */
.bestseller-card__visual {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bestseller-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.4s ease;
}

.bestseller-card:hover .bestseller-card__visual img {
    transform: scale(1.08);
}

/* Ranking badge */
.bestseller-card__rank {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Overlay al hover */
.bestseller-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-decoration: none;
}

.bestseller-card__overlay span {
    background: #fff;
    color: #1e293b;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.bestseller-card__overlay span i {
    margin-right: 6px;
    color: #2563eb;
}

.bestseller-card:hover .bestseller-card__overlay {
    opacity: 1;
}

.bestseller-card:hover .bestseller-card__overlay span {
    transform: translateY(0);
}

/* --- Contenido --- */
.bestseller-card__content {
    padding: 20px 20px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Categoría */
.bestseller-card__category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    padding: 4px 12px;
    border-radius: 50px;
    width: fit-content;
    margin-bottom: 10px;
}

/* Título */
.bestseller-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bestseller-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bestseller-card__title a:hover {
    color: #2563eb;
}

/* Descripción */
.bestseller-card__desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Especificaciones / Características */
.bestseller-card__specs {
    list-style: none;
    padding: 0;
    margin: 0 0 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bestseller-card__specs li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
}

.bestseller-card__specs li i {
    font-size: 0.7rem;
    color: #94a3b8;
}

.bestseller-card__specs .spec--available {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
}

.bestseller-card__specs .spec--available i {
    color: #16a34a;
}

.bestseller-card__specs .spec--unavailable {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

.bestseller-card__specs .spec--unavailable i {
    color: #dc2626;
}

/* --- Footer --- */
.bestseller-card__footer {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

/* Pricing */
.bestseller-card__pricing {
    display: flex;
    flex-direction: column;
}

.bestseller-card__pricing .price-main {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.bestseller-card__pricing .price-promo {
    font-size: 0.78rem;
    color: #16a34a;
    font-weight: 600;
}

/* Botón de detalles */
.bestseller-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.bestseller-card__btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Botón alternativo "Ver todo" */
.btn-view-all--alt {
    background: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-view-all--alt:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablets */
@media (max-width: 991px) {
    .bestseller-card__visual {
        height: 190px;
    }

    .bestseller-card__content {
        padding: 16px 16px 0;
    }

    .bestseller-card__footer {
        padding: 14px 16px;
    }

    .bestseller-card__title {
        font-size: 0.9rem;
    }
}

/* Mobile */
@media (max-width: 575px) {
    .bestsellers-section {
        padding: 2.5rem 0;
    }

    .bestsellers-section .section-heading {
        font-size: 1.4rem;
    }

    .bestseller-card__visual {
        height: 200px;
    }

    .bestseller-card__content {
        padding: 14px 14px 0;
    }

    .bestseller-card__footer {
        padding: 12px 14px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .bestseller-card__pricing {
        flex-direction: row;
        gap: 10px;
        align-items: baseline;
        justify-content: center;
    }

    .bestseller-card__btn {
        justify-content: center;
    }

    .bestseller-card__specs {
        justify-content: center;
    }
}
