/* ========================================
   NERDVANA - PRODUCTO DEL DÍA
   LIENZO 1920 x 500
======================================== */

/*
 * Este elemento es el que controla la altura.
 * Se comporta igual que una imagen 1920x500.
 */

.nv-daily-slide {
    position: relative;

    width: 100%;
    aspect-ratio: 1920 / 500;

    overflow: hidden;
    background-image: url("https://staging.nerdvana.club/wp-content/uploads/2025/11/Fondo_nerdvanamania.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* ========================================
   PRODUCTO
======================================== */

/*
 * IMPORTANTE:
 * absolute hace que el contenido interior
 * NO pueda aumentar la altura del slide.
 */

.nv-daily-product {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    padding: 4% 9%;

    display: grid;
    grid-template-columns: 42% 58%;
    align-items: center;

    gap: 5%;

    box-sizing: border-box;

    color: #fff;
}


/* ========================================
   IMAGEN
======================================== */

.nv-daily-product__image {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    min-height: 0;
}

.nv-daily-product__image img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 82%;
    max-height: 100%;

    object-fit: contain;

    border-radius: 4px;
}


/* ========================================
   CONTENIDO
======================================== */

.nv-daily-product__content {
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* ========================================
   PRODUCTO DEL DÍA
======================================== */

.nv-daily-product__label {
    margin-bottom: 1%;

    font-size: clamp(20px, 1.75vw, 34px);
    line-height: 1.05;
    font-weight: 800;

    color: #fff;

    text-transform: uppercase;
}


/* ========================================
   SUBTÍTULO
======================================== */

.nv-daily-product__subtitle {
    margin-bottom: 2%;

    font-size: clamp(13px, 1vw, 19px);
    line-height: 1.2;
    font-weight: 600;

    color: rgba(255,255,255,.9);
}


/* ========================================
   CONTADOR
======================================== */

.nv-daily-countdown {
    width: 100%;
    max-width: 760px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    margin-bottom: 2%;

    background: rgba(255,255,255,.13);

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;

    backdrop-filter: blur(3px);

    overflow: hidden;
}

.nv-daily-countdown__item {
    position: relative;

    padding: 2% 1%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* divisores */

.nv-daily-countdown__item:not(:last-child)::after {
    content: "";

    position: absolute;

    right: 0;
    top: 20%;
    bottom: 20%;

    width: 1px;

    background: rgba(255,255,255,.2);
}


/* número */

.nv-daily-countdown__item span {
    display: block;

    font-size: clamp(20px, 1.75vw, 34px);
    line-height: 1;
    font-weight: 700;

    color: #fff;
}


/* horas / minutos / segundos */

.nv-daily-countdown__item small {
    display: block;

    margin-top: 4px;

    font-size: clamp(8px, .58vw, 11px);
    line-height: 1;
    font-weight: 600;

    color: rgba(255,255,255,.8);
}


/* ========================================
   INFORMACIÓN
======================================== */

.nv-daily-product__info {
    width: 100%;
    max-width: 760px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 1%;
}

.nv-daily-product__info h2 {
    min-width: 0;
    flex: 1;

    margin: 0;

    font-size: clamp(17px, 1.25vw, 24px);
    line-height: 1.15;
    font-weight: 700;

    color: #fff;
}


/* ========================================
   PRECIO
======================================== */

.nv-daily-product__price {
    display: flex;
    align-items: baseline;

    gap: 7px;

    white-space: nowrap;
}

.nv-daily-product__price del {
    font-size: clamp(12px, .9vw, 17px);
    font-weight: 600;

    color: rgba(255,255,255,.65);
}

.nv-daily-product__price strong {
    font-size: clamp(18px, 1.35vw, 26px);
    line-height: 1;
    font-weight: 800;

    color: #fff;
}


/* ========================================
   STOCK
======================================== */

.nv-daily-product__stock {
    margin: 0 0 2%;

    font-size: clamp(10px, .73vw, 14px);
    font-weight: 600;

    color: rgba(255,255,255,.85);
}


/* ========================================
   BOTÓN
======================================== */

.nv-daily-product__button {
    width: fit-content;

    min-width: 150px;

    padding: clamp(9px, .73vw, 14px)
             clamp(18px, 1.35vw, 26px);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border-radius: 8px;

    background: #e3262e;

    color: #fff !important;

    font-size: clamp(11px, .73vw, 14px);
    line-height: 1;
    font-weight: 700;

    text-decoration: none !important;

    transition:
        transform .2s ease,
        background-color .2s ease;
}

.nv-daily-product__button:hover {
    background: #c91e26;

    color: #fff !important;

    transform: translateY(-2px);
}


/* ========================================
   OFERTA FINALIZADA
======================================== */

.nv-daily-product--expired .nv-daily-product__button {
    pointer-events: none;
    opacity: .5;
}

/* ========================================
   PRODUCTO VENDIDO
======================================== */

.nv-daily-product__stock--sold {
    font-weight: 800;
    text-transform: uppercase;
}

.nv-daily-product__button--sold {
    pointer-events: none;
    cursor: default;

    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);

    color: #fff !important;

    opacity: .8;

    transform: none !important;
}

.nv-daily-product__button--sold:hover {
    background: rgba(255,255,255,.18);
    transform: none;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 1024px) {

    /*
     * En tablet abandonamos el formato
     * ultrapanorámico 1920x500.
     */

    .nv-daily-slide {
        aspect-ratio: auto;
        overflow: visible;
    }

    .nv-daily-product {
        position: relative;
        inset: auto;

        height: auto;

        padding: 25px 30px;

        grid-template-columns: 38% 62%;

        gap: 25px;
    }

    .nv-daily-product__image {
        height: 280px;
    }

    .nv-daily-product__image img {
        max-width: 280px;
        max-height: 280px;
    }

}


/* ========================================
   MÓVIL
======================================== */


/* ========================================
   NERDVANA - PRODUCTO DEL DÍA
   MÓVIL COMPACTO
======================================== */

@media (max-width: 767px) {

    .nv-daily-slide {
        aspect-ratio: auto;
    }

    .nv-daily-product {
        position: relative;
        inset: auto;

        width: 100%;
        height: auto;
        padding: 16px 18px 20px;

        display: grid;
        grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 8px;
        align-items: center;

        box-sizing: border-box;
        text-align: center;
    }

    /*
     * Permite posicionar los elementos
     * internos sin cambiar el HTML.
     */

    .nv-daily-product__content,
    .nv-daily-product__info {
        display: contents;
    }

    /* ENCABEZADO */

    .nv-daily-product__label {
        grid-column: 1 / -1;
        grid-row: 1;

        margin: 0;
        font-size: 20px;
        line-height: 1.1;
        text-align: center;
    }

    /* IMAGEN IZQUIERDA */

    .nv-daily-product__image {
        grid-column: 1;
        grid-row: 2 / 5;

        width: 100%;
        height: 145px;

        display: flex;
        align-items: center;
        justify-content: center;

        min-width: 0;
    }

    .nv-daily-product__image img {
        display: block;
        width: 100%;
        height: 100%;
        max-width: 145px;
        max-height: 145px;
        object-fit: contain;
    }

    /* NOMBRE DERECHA */

    .nv-daily-product .nv-daily-product__info h2 {
        grid-column: 2;
        grid-row: 2;

        width: 100%;
        min-width: 0;
        margin: 0;

        font-size: 14px !important;
        line-height: 1.2 !important;
        font-weight: 700;
        text-align: left;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* SUBTÍTULO */

    .nv-daily-product__subtitle {
        grid-column: 2;
        grid-row: 3;

        margin: 0;
        font-size: 10px;
        line-height: 1.2;
        text-align: left;
    }

    /* CONTADOR COMPACTO */

    .nv-daily-countdown {
        grid-column: 2;
        grid-row: 4;

        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;

        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nv-daily-countdown__item {
        min-width: 0;
        padding: 7px 2px;
    }

    .nv-daily-countdown__item span {
        font-size: 19px;
        line-height: 1;
    }

    .nv-daily-countdown__item small {
        font-size: 8px;
        margin-top: 3px;
    }

    /* PRECIO DEBAJO DE AMBAS COLUMNAS */

    .nv-daily-product__price {
        grid-column: 1 / -1;
        grid-row: 5;

        width: 100%;
        min-width: 0;

        display: flex;
        align-items: baseline;
        justify-content: center;
        flex-wrap: wrap;
        gap: 7px;

        white-space: normal;
    }

    .nv-daily-product__price del {
        font-size: 12px;
    }

    .nv-daily-product__price strong {
        font-size: 21px;
        line-height: 1.1;
    }

    /* STOCK */

    .nv-daily-product__stock {
        grid-column: 1 / -1;
        grid-row: 6;

        margin: 0;
        font-size: 11px;
        text-align: center;
    }

    /* BOTÓN */

    .nv-daily-product__button {
        grid-column: 1 / -1;
        grid-row: 7;

        width: 100%;
        max-width: none;
        min-width: 0;
        min-height: 40px;
        margin: 0;

        font-size: 12px;
    }
}


/* ========================================
   BANNER GENÉRICO - FIN DE CAMPAÑA
======================================== */

.nv-daily-fallback {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4% 9%;

    box-sizing: border-box;

    color: #fff;
}

.nv-daily-fallback__content {
    width: 100%;
    max-width: 760px;

    text-align: center;
}

.nv-daily-fallback__label {
    margin-bottom: 12px;

    font-size: clamp(20px, 1.75vw, 34px);
    line-height: 1.05;
    font-weight: 800;

    text-transform: uppercase;
}

.nv-daily-fallback__title {
    margin: 0 0 10px;

    font-size: clamp(24px, 2vw, 38px);
    line-height: 1.1;
    font-weight: 800;

    color: #fff;
}

.nv-daily-fallback__text {
    margin: 0 0 22px;

    font-size: clamp(14px, 1vw, 18px);
    line-height: 1.4;

    color: rgba(255,255,255,.9);
}

.nv-daily-fallback .nv-daily-product__button {
    margin: 0 auto;
}

@media (max-width: 767px) {

    .nv-daily-fallback {
        position: relative;

        min-height: 360px;

        padding: 30px 20px;
    }

    .nv-daily-fallback__label {
        font-size: 22px;
    }

    .nv-daily-fallback__title {
        font-size: 25px;
    }

    .nv-daily-fallback__text {
        font-size: 14px;
    }

}

/* ========================================
   BANNER PRÓXIMAMENTE
======================================== */

.nv-daily-upcoming {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4% 9%;

    box-sizing: border-box;

    color: #fff;
}

.nv-daily-upcoming__content {
    width: 100%;
    max-width: 760px;

    text-align: center;
}

@media (max-width: 767px) {

    .nv-daily-slide--upcoming {
        aspect-ratio: auto;
        height: 480px;
    }

    .nv-daily-upcoming {
        position: absolute;
        inset: 0;

        width: 100%;
        height: 100%;

        min-height: 0;

        padding: 30px 20px;

        display: flex;
        align-items: center;
        justify-content: center;
    }

}


/* ========================================
   PRODUCTO DEL DÍA - AJUSTE MÓVIL FINAL
======================================== */

@media (max-width: 767px) {

    .nv-daily-product {
        padding: 27px 18px 18px;
        row-gap: 6px;
    }

    /* Encabezado más pequeño */
    .nv-daily-product__label {
        font-size: 17px;
        margin-bottom: 0;
    }

    /* Imagen compacta */
    .nv-daily-product__image {
        height: 125px;
    }

    .nv-daily-product__image img {
        max-width: 125px;
        max-height: 125px;
    }

    /* Contador */
    .nv-daily-countdown__item {
        padding: 5px 2px;
    }

    .nv-daily-countdown__item span {
        font-size: 18px;
    }

    /* Ocultar stock solo cuando hay disponibilidad */
    .nv-daily-product__stock:not(
        .nv-daily-product__stock--sold
    ) {
        display: none;
    }

    /* Precio */
    .nv-daily-product__price strong {
        font-size: 20px;
    }

    /* Botón */
    .nv-daily-product__button {
        min-height: 38px;
    }
}