/* =============================================================================
   HERO CAROUSEL — hero-carousel.css
   ============================================================================= */

/* Contenedor principal */
.hero__carousel-wrap {
    position: relative;
    width: 100%;
    max-width: 460px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-self: center;
}

/* Viewport — corta lo que sobresalga */
.hc-viewport {
    overflow: hidden;
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
}

/* Track */
.hc-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    /* Crucial: el track no debe ser más ancho que su viewport */
    width: 100%;
    max-width: 100%;
}

/* Loading */
.hc-loading {
    width: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
}

.hc-spinner {
    width: 28px; height: 28px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Slide — ocupa exactamente el ancho del viewport */
.hc-slide {
    flex: 0 0 100%;       /* no crecer, no encoger, exactamente 100% */
    min-width: 0;          /* permite que flex respete el límite */
    width: 100%;
    max-width: 100%;
    padding: 2px;
    box-sizing: border-box;
}

/* Tarjeta */
.hc-card {
    background: rgba(255,255,255,0.97);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
    width: 100%;          /* tarjeta ocupa todo el slide */
    box-sizing: border-box;
}

/* Zona de imagen */
.hc-card__img-wrap {
    position: relative;
    background: linear-gradient(135deg, #f0faf0 0%, #e8f5e9 100%);
    width: 100%;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hc-card__img-wrap img {
    max-width: 80%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.hc-card:hover .hc-card__img-wrap img { transform: scale(1.04); }

/* Badges */
.hc-card__badge {
    position: absolute;
    top: 10px; left: 10px;
    background: #2E7D32;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.hc-card__badge--stock {
    background: #e53935;
    left: auto; right: 10px;
}

/* Cuerpo */
.hc-card__body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hc-card__stars { color: #F59E0B; font-size: 0.78rem; display: flex; align-items: center; gap: 4px; }
.hc-card__stars span { color: #6B7280; font-size: 0.72rem; }

.hc-card__name {
    font-size: 0.95rem; font-weight: 700; color: #1a1a1a; line-height: 1.3; margin: 0;
}

.hc-card__desc {
    font-size: 0.78rem; color: #555; line-height: 1.4; margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hc-card__footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; margin-top: 0.4rem;
}

.hc-card__price { font-size: 1.4rem; font-weight: 800; color: #2E7D32; line-height: 1; }

.hc-card__price-old {
    display: block; font-size: 0.75rem; color: #9CA3AF; text-decoration: line-through;
}

.hc-card__buy-btn {
    background: #2E7D32; color: #fff; border: none; border-radius: 50px;
    padding: 0.55rem 1.1rem; font-size: 0.82rem; font-weight: 700;
    cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; gap: 5px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(46,125,50,0.35);
    white-space: nowrap;
}

.hc-card__buy-btn:hover {
    background: #1B5E20;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(46,125,50,0.45);
}

.hc-card__buy-btn:active { transform: translateY(0); }

/* Controles */
.hc-controls { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }

.hc-btn {
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #fff; width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s, border-color 0.2s; flex-shrink: 0;
}

.hc-btn:hover { background: rgba(255,255,255,0.32); border-color: rgba(255,255,255,0.7); }
.hc-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.hc-dots { display: flex; gap: 6px; align-items: center; }

.hc-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.35); border: none; cursor: pointer; padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.hc-dot.is-active { background: #fff; transform: scale(1.25); }

/* ─── RESPONSIVE — solo ajustes de tamaño de texto en móvil pequeño ─── */
/* El layout de móvil se maneja desde home.css con selectores más específicos */
@media (max-width: 480px) {
    .hc-card__body { padding: 0.85rem 1rem 1rem; }
    .hc-card__desc { display: none; }
    .hc-card__price { font-size: 1.2rem; }
    .hc-card__buy-btn { padding: 0.45rem 0.9rem; font-size: 0.78rem; }
}