﻿/* ============================================================
   HOMEPAGE.CSS  –  TiendaOnline
   ============================================================ */

/* ── BASE ── */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Parche para evitar scroll horizontal por el uso de 100vw en el hero */
body {
    overflow-x: clip; /* ← cambia hidden por clip */
}

/* ============================================================
   HERO  —  full-width, pegado al header
   ============================================================ */

/*
   El hero DEBE romper cualquier container del _Layout.
   Añade esto también en _Layout.cshtml alrededor del @RenderBody():
       <div class="page-content">@RenderBody()</div>
   y NO pongas padding/margin en ese wrapper.
*/

.hero-wrapper {
    max-width: 2600px; /* ANTES ESTABA EN 1400px, subiendo esto se hace todo más grande */
    margin: 0 auto;
    padding: 0;
}

.home-hero {
    width: calc(100% - 1rem); /* Le damos un chin de margen a los lados para que no choque */
    border-radius: 16px;
    overflow: hidden;
    margin-top: 0.8rem; /* 🔥 Aquí le damos la separación del header */
    touch-action: pan-y pinch-zoom;
}

.hero-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.hero-slide {
    width: 100%;
    aspect-ratio: 16 / 5.8; /* ≈ 1920x700 */
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Imagen dentro del slide para mejor control */
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s ease;
}

.hero-overlay {
    background: rgba(0,0,0,0.05); /* o bórralo completo */
    position: absolute;
    inset: 0;
    display: none;
}

/* ============================================================
   🎯 FLECHAS ESTILO PREMIUM FLOTANTE (TAMAÑO REDUCIDO Y FINO)
   ============================================================ */

/* El botón contenedor de la flecha */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 36px !important; /* 🔥 PC: Antes 50px, ahora 36px (Mucho más sutil) */
    width: 36px !important; /* 🔥 PC: Antes 50px, ahora 36px */
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    z-index: 20 !important;
    transition: all 0.3s ease !important;
    margin: 0 20px !important;
}

/* MAGIA: Aparecen cuando el mouse entra al banner */
#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next {
    opacity: 1 !important;
}

/* Efecto al poner el mouse directamente sobre la flecha */
#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
    background: #ffffff !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* Las flechitas de adentro */
#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
    width: 1rem !important; /* 🔥 PC: Antes 1.5rem, ahora 1rem (Flechita fina) */
    height: 1rem !important; /* 🔥 PC: Antes 1.5rem, ahora 1rem */
    filter: invert(1) grayscale(100) brightness(0) !important;
}

/* 📱 AJUSTES PARA CELULARES (Pantallas menores a 768px) */
@media (max-width: 768px) {
    #heroCarousel .carousel-control-prev,
    #heroCarousel .carousel-control-next {
        height: 28px !important; /* 🔥 CELULAR: Súper discretas, antes 38px */
        width: 28px !important;
        margin: 0 10px !important;
    }

    #heroCarousel .carousel-control-prev-icon,
    #heroCarousel .carousel-control-next-icon {
        width: 0.75rem !important; /* 🔥 CELULAR: Flechita chiquita y nítida */
        height: 0.75rem !important;
    }

    /* ── FIX OFFER CARDS: texto más compacto en móvil ── */
    .offer-name {
        font-size: 0.8rem !important;
        margin: 0 0 0.1rem !important;
        line-height: 1.15 !important;
        /* Limitar a 2 líneas */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .offer-sub {
        font-size: 0.68rem !important;
        line-height: 1.2 !important;
        /* Limitar a 2 líneas */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .offer-caption {
        padding: 0.5rem 0.6rem 0.6rem !important;
    }

    .offer-badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.5rem !important;
        top: 6px !important;
        left: 6px !important;
    }

    /* ── offer tag + timer apilados en móvil ── */
    .hp-offer-tag {
        font-size: 0.6rem !important;
        font-weight: 700 !important;
        display: block !important; /* ← su propia línea */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
    }

    .offer-timer {
        display: flex;
        flex-direction: column;
        margin: 0 0 4px 0;
        line-height: 1.3;
        gap: 1px;
    }

    /* DESPUÉS — reemplaza ambas instancias por esto */
    .timer-text {
        font-variant-numeric: tabular-nums;
        font-size: 0.7rem !important;
        font-weight: 600;
        color: #dc3545;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        display: block; /* ← block, no inline-block */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}

/* Flechas del hero — siempre visibles */
.home-hero-arrow {
    width: 32px !important;
    height: 32px !important;
    background: rgba(255,255,255,0.7) !important; /* 🔥 gris/blanco limpio */
    border: 1px solid rgba(0,0,0,0.08) !important;
}

    .home-hero-arrow:hover {
        background: rgba(255,255,255,0.38) !important;
        border-color: white !important;
    }

.carousel:hover .home-hero-arrow {
    opacity: 1 !important;
}

.home-hero-arrow-icon {
    font-size: 1rem;
    color: #111;
}
/* Dots del hero */
.home-hero-dots {
    position: absolute !important;
    bottom: 10px !important;
    margin: 0 !important;
}

.carousel-indicators {
    position: absolute !important;
    bottom: 10px !important; /* 🔥 dentro de la imagen */
    left: 50%;
    transform: translateX(-50%);
    margin: 0 !important; /* ❌ elimina ese espacio raro */
    padding: 0 !important;
    background: transparent !important; /* ❌ quita el negro */
}


.home-hero-dots [data-bs-target] {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important; /* 🔥 redondos */
    background: rgba(255,255,255,0.6) !important;
    border: none !important;
    margin: 0 4px !important;
    transition: all 0.25s ease;
}

.home-hero-dots .active {
    background: #ffffff !important;
    transform: scale(1.2);
}
/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.home-main {
    padding: 0; /* 🔥 las secciones manejan su propio espaciado */
    background: transparent;
}

.home-container {
    max-width: 2600px; /* ANTES ESTABA EN 1400px */
    margin: 0 auto;
    padding: 0 2rem;
}
/* ── Section ── */
.home-section {
    margin-bottom: 0; /* ❌ lo manejamos con padding */
    padding: 2.5rem 0; /* 🔥 espaciado uniforme arriba y abajo */
    border-radius: 0;
    background: transparent;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.view-all {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: opacity 0.2s;
    white-space: nowrap;
}

    .view-all:hover {
        text-decoration: underline;
        opacity: 0.75;
    }

.view-all--red {
    color: #dc2626;
}

.view-all--blue {
    color: #2563eb;
}

.view-all--purple {
    color: #9333ea;
}

.view-all--green {
    color: #16a34a;
}

.view-all--gray {
    color: #374151;
}

/* ============================================================
   CAROUSEL TRACKS
   — flex horizontal, overflow hidden, translateX para deslizar
   ============================================================ */

.carousel-track-wrap {
    position: relative;
    overflow: hidden; /* 🔑 oculta lo que sale */
    padding: 0; /* 🔥 Quitamos el padding para que vaya de extremo a extremo */
}

.cards-track {
    display: flex; /* 🔑 flex, NO grid */
    flex-wrap: nowrap; /* 🔑 todo en una sola fila */
    gap: 1rem;
    width: 100%; /* 🔥 Obliga al contenedor a medir exactamente el ancho visible */
    transition: transform 0.4s ease;
    will-change: transform;
    padding: 0.5rem 0;
    touch-action: pan-y pinch-zoom;
}

.track-item {
    flex: 0 0 calc(25% - 0.75rem); /* 🔑 4 items = 25% c/u, menos el gap proporcional */
    min-width: 0;
}

/* ── Botones prev / next ── */
.track-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: background 0.2s, box-shadow 0.2s;
    padding: 0;
}

    .track-btn:hover {
        background: #f3f4f6;
        box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    }

    .track-btn.prev {
        left: 0.25rem;
    }

    .track-btn.next {
        right: 0.25rem;
    }

/* ── Dots ── */
.track-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 0.75rem;
}

.track-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.2s;
}

    .track-dot.active {
        background: #6b7280;
        transform: scale(1.25);
    }

.empty-state {
    background: #f3f4f6;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

/* ============================================================
   OFFER CARDS
   ============================================================ */
.offer-card {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background: #fff;
    height: auto;
    touch-action: pan-y pinch-zoom;
}

    .offer-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(0,0,0,0.14);
    }

.offer-img-wrap {
    position: relative;
    /* 🔥 FORZAMOS A QUE SEAN CUADRADAS COMO EN EL FIGMA */
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
}

    .offer-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }

.offer-card:hover .offer-img-wrap img {
    transform: scale(1.07);
}

.offer-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 50%, transparent 100% );
}

/* 🔥 Badge sin "OFF" — solo el número, controlado desde el HTML */
.offer-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2626;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(220,38,38,0.4);
    z-index: 3;
}

.offer-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.1rem 1.1rem;
    z-index: 3;
}

.offer-name {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.2rem;
    line-height: 1.25;
}

.offer-sub {
    color: #e5e7eb;
    font-size: 0.82rem;
    opacity: 0.9;
    margin: 0;
}
/* ============================================================
   HOME PRODUCT CARDS  (_HomeProductCard)
   ============================================================ */
.hp-card {
    background: #ffffff;
    border-radius: 0.6rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .hp-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.13);
    }

.hp-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

    .hp-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        transition: transform 0.32s ease;
    }

.hp-card:hover .hp-card-img img {
    transform: scale(1.08);
}

.hp-badge {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.22rem 0.6rem;
    border-radius: 0.3rem;
    color: #fff;
    z-index: 2;
}

.hp-badge--fire {
    background: #dc2626;
}

.hp-badge--star {
    background: #d97706;
}

.hp-badge--new {
    background: #16a34a;
}

.hp-discount-badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    background: #fff;
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    z-index: 2;
}

/* 🔥 EL DESCUENTO VUELVE A SU LUGAR Y MÁS MODERNO */
.hp-discount-badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem; /* ¡Lo devolvemos a la esquina! */
    background: #dc2626; /* Fondo rojo premium */
    color: #fff; /* Letras blancas para que resalte */
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 0.3rem;
    box-shadow: 0 2px 5px rgba(220, 38, 38, 0.3);
    z-index: 2;
}



/* 🔥 CARRITO MÁS MODERNO Y PREMIUM */
.hp-cart-btn {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    background: #111827; /* Fondo oscuro elegante */
    color: #ffffff; /* Icono blanco */
    border: none;
    border-radius: 50%; /* Totalmente circular */
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 5;
    transition: all 0.3s ease;
}

/* Efecto al pasar el mouse por la tarjeta */
.hp-card:hover .hp-cart-btn {
    opacity: 1;
    transform: translateY(-3px); /* Pequeño salto al aparecer */
}

/* Efecto al poner el mouse directo en el botón */
.hp-cart-btn:hover {
    background: #0d6efd; /* Cambia a azul (o ponle el color de tu marca) */
    transform: scale(1.1) translateY(-3px);
}

.hp-out-of-stock {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    letter-spacing: 0.03em;
}

.hp-card-body {
    padding: 0.85rem 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.hp-product-name {
    font-size: 1.1rem; /* 🔥 AQUÍ AGRANDAS EL NOMBRE (antes estaba en 0.95rem) */
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.2rem 0; /* 🔥 AQUÍ LO AGRUPAS (antes era 0.5rem abajo) */
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Rating */
.hp-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0.2rem; /* 🔥 Más pegadito al precio (antes era 0.5rem) */
}
.hp-stars {
    color: #f1c40f;
    font-size: 1.1rem; /* 🔥 AQUÍ AGRANDAS LAS ESTRELLAS (antes estaba en 0.85rem) */
    letter-spacing: -1px;
}

    /* Esto hará que las estrellas se vean grandes y potentes */
    .hp-stars .star {
        font-size: 1.3rem !important; /* Subimos a 1.3, ajusta a tu gusto */
        margin-right: 1px;
        display: inline-block;
        transition: transform 0.2s;
    }

/* Un efectito extra: que se muevan un chin cuando pasas el mouse por la tarjeta */
.hp-card:hover .hp-stars .star {
    transform: scale(1.1);
}

        .hp-stars .star.filled {
            color: #fbbf24;
        }

        .hp-stars .star.half {
            color: #fbbf24;
            opacity: 0.6;
        }

        .hp-stars .star.empty {
            color: #d1d5db;
        }

.hp-review-count {
    font-size: 0.8rem; /* Un chin más grande el número de reviews si quieres */
    color: #7f8c8d;
}
/* Precio */
.hp-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.1rem;
}

.hp-price-old {
    font-size: 0.8rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.hp-price-final {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.hp-offer-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.1rem;
    display: block; /* ← block, no inline-block */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.category-card {
    border-radius: 0.6rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    cursor: pointer;
    background: #e5e7eb;
    height: 100%;
    touch-action: pan-y pinch-zoom;
}

    .category-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.14);
    }

.category-img-wrap {
    position: relative;
    /* 🔥 CÁMBIALO A 1 / 1 PARA QUE SEAN CUADRADAS COMO LAS OFERTAS Y PRODUCTOS */
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

    .category-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        transition: transform 0.32s ease;
    }

.category-card:hover .category-img-wrap img {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 55%);
}

.category-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem 0.95rem;
}

.category-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.1rem;
    line-height: 1.2;
}

.category-count {
    color: #e5e7eb;
    font-size: 0.8rem;
    margin: 0;
}

.clickable-card {
    cursor: pointer;
}

/* ============================================================
   RESPONSIVE (¡NUEVO 100% FLUIDO Y LIMPIO!)
   ============================================================ */

/* ── TABLETS (hasta 1024px) ── */
@media (max-width: 1024px) {
    .track-item {
        flex: 0 0 calc(33.333% - 0.66rem);
    }

    .hero-slide {
        aspect-ratio: 16 / 7;
    }
}

/* ── MÓVILES (hasta 768px) ── */
@media (max-width: 768px) {
    .home-container {
        padding: 0 0.8rem;
    }

    .home-section {
        padding: 1.2rem 0;
    }

    .section-header {
        margin-bottom: 1rem;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .section-title {
        font-size: 1.1rem;
        margin: 0;
    }

    /* Banner despegado del header y con bordes redonditos en móvil */
    .home-hero {
        border-radius: 12px;
        margin-top: 0.8rem; /* 🔥 Aquí le damos la separación del header */
        width: calc(100% - 1rem); /* Le damos un chin de margen a los lados para que no choque */
        margin-left: auto;
        margin-right: auto;
    }

    .hero-slide {
        height: auto !important;
        aspect-ratio: auto !important;
    }

    .hero-img {
        height: auto !important;
        width: 100%;
        object-fit: contain !important;
        display: block;
        border-radius: 8px;
    }

    /* 🔥 CARDS FIX: Un solo elemento y mismo alto */
    .cards-track {
        gap: 1rem;
        align-items: stretch !important; /* Obliga a que todas tengan el mismo alto */
    }

    .track-item {
        /* 🔥 Muestra 2 tarjetas por fila exactas */
        flex: 0 0 calc(50% - 0.5rem);
    }

    .hp-card, .category-card {
        height: 100% !important; /* Todas ocupan el alto máximo de la fila */
    }

    .hp-card-body {
        padding: 0.8rem;
        gap: 0.2rem;
    }

    .hp-product-name {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 0.2rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hp-price-final {
        font-size: 1rem;
    }

    .hp-price-old {
        font-size: 0.8rem;
    }

    .hp-stars {
        font-size: 0.9rem;
    }

        .hp-stars .star {
            font-size: 1rem !important;
        }

    /* 🏹 Flechas en móvil */
    .track-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 1.2rem !important;
        opacity: 0.8;
    }

        .track-btn.prev {
            left: 2px !important;
        }

        .track-btn.next {
            right: 2px !important;
        }

    /* Botones Ver Todos en Celular */
    .btn-view-all {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
    }
}

/* ── MÓVILES PEQUEÑOS (hasta 480px) ── */
@media (max-width: 480px) {
    .hp-product-name {
        font-size: 0.85rem;
    }

    .btn-view-all {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
    }

    .hp-offer-tag {
        font-size: 0.6rem !important;
    }

    .timer-text {
        font-size: 0.55rem !important;
    }
}

/* ============================================================
   COMPONENTES GLOBALES Y MAGIA DE ALINEACIÓN
   ============================================================ */

/* 🔥 MAGIA: Esto asegura que el precio y el carrito siempre se vayan al fondo,
   haciendo que las tarjetas se vean simétricas sin importar el texto arriba */
.hp-price-row {
    margin-top: auto !important;
}

/* ⏳ FIX TIMER: SUTIL, PEQUEÑO Y SIN PARPADEO */
.offer-timer {
    display: flex;
    flex-direction: column;
    margin: 0 0 4px 0;
    line-height: 1.3;
    gap: 2px;
}

/* DESPUÉS — reemplaza ambas instancias por esto */
.timer-text {
    font-variant-numeric: tabular-nums;
    font-size: 0.7rem !important;
    font-weight: 600;
    color: #dc3545;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 🟢 BOTÓN "VER TODOS" */
.btn-view-all {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-view-all:hover {
        background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
        box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
        transform: scale(1.05);
        color: white;
    }

.category-section .btn-view-all {
    background: linear-gradient(135deg, #6f42c1 0%, #4e227a 100%);
    box-shadow: 0 4px 10px rgba(111, 66, 193, 0.3);
}


/* ============================================================
   ⏳ FIX TIMER: SUTIL, PEQUEÑO Y SIN PARPADEO
   ============================================================ */
.offer-timer {
    display: flex; /* ← flex en lugar de block */
    flex-direction: column; /* ← apila verticalmente */
    margin: 0 0 4px 0;
    line-height: 1.3;
    gap: 1px;
}

.timer-text {
    /* Mantiene el ancho fijo para que no parpadee */
    font-variant-numeric: tabular-nums;
    font-size: 0.7rem !important; /* Bien pequeñito y elegante */
    font-weight: 600; /* Un poco en negrita pero no tan tosco */
    color: #dc3545; /* Un rojo sutil (tipo Bootstrap) */
    /* Quitamos todo lo que lo hacía ver como una caja gigante */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: inline-block;
    white-space: nowrap;
}

.btn-view-all {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px; /* Estilo píldora, bien moderno */
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-view-all:hover {
        background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
        box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
        transform: scale(1.05);
        color: white;
    }

/* Si quieres que el de categorías resalte más, puedes añadirle un color distinto */
.category-section .btn-view-all {
    background: linear-gradient(135deg, #6f42c1 0%, #4e227a 100%); /* Un morado pro */
    box-shadow: 0 4px 10px rgba(111, 66, 193, 0.3);
}

/* ============================================================
   AJUSTE DE ETIQUETAS (TOP / DESCUENTO) EN MÓVILES
   ============================================================ */

/* ── MÓVILES Y TABLETS PEQUEÑAS (hasta 768px) ── */
@media (max-width: 768px) {
    /* Etiqueta izquierda (TOP, Nuevo, Fuego) */
    .hp-badge {
        font-size: 0.6rem !important; /* Letra más fina */
        padding: 0.15rem 0.4rem !important; /* Menos bulto de relleno */
        top: 0.4rem !important; /* Lo pegamos un poco más al borde */
        left: 0.4rem !important;
        border-radius: 4px !important;
    }

    /* Etiqueta derecha (Descuento) */
    .hp-discount-badge {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.4rem !important;
        top: 0.4rem !important;
        right: 0.4rem !important;
        border-radius: 4px !important;
    }

    /* Etiqueta grande de las Ofertas Especiales (por si acaso) */
    .offer-badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.6rem !important;
        top: 8px !important;
        left: 8px !important;
    }
}

/* ── MÓVILES PEQUEÑOS (hasta 480px) ── */
@media (max-width: 480px) {
    /* Reducción milimétrica para que en pantallas súper estrechas no estorben nada */
    .hp-badge {
        font-size: 0.55rem !important;
        padding: 0.1rem 0.35rem !important;
    }

    .hp-discount-badge {
        font-size: 0.6rem !important;
        padding: 0.1rem 0.35rem !important;
    }
}

