/* ============================================================
   FICHERO A EDITAR: /var/www/Belnou/public/tema/teasers.css
   Reemplazar TODO el contenido por lo siguiente.
   Tarjetas de producto (teasers) - modernizado, granate, tokens.
   Adaptado a las clases REALES de public/mod/teasers/teaser.tpl.php:
     .teaser > #idPrecio2{ref}>.dtopor , .contenedorimg>.divetiqueta>(.etiqueta/.etiqueta2)+img.img ,
     span.tit2 (FAM=' ') , span.tit , (.precio comentado en tpl) , button.vermas>span
   ============================================================ */

/* -------- Contenedor de la rejilla --------
   Tres tarjetas por fila; dos en tablet y una en móvil. La tarjeta se estira
   con la rejilla pero NUNCA pasa de 430px, y la fila queda siempre pegada a la
   izquierda (justify-content:start): si sobra sitio, se nota a la derecha, no
   se reparte ni se centra.
   La imagen se ajusta sola porque su alto sale de la proporción
   (aspect-ratio: 1/1) y no de un número.
   Nota: filtros.js pone display:inline-block a mano en .teaser para filtrar.
   Dentro de una rejilla eso no estorba —el ítem se comporta como bloque— y el
   display:none con el que oculta sigue funcionando igual. */
.listadoteasers{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 430px));
    justify-content: start;
    gap: 0px 12px;
    width: 100%;
    padding: 0 10px;
    margin: 32px 0 0;
    text-align: left;
    overflow: hidden;
    font-family: var(--font-main);
}

/* -------- Tarjeta -------- */
.teaser{
    position: relative;
    display: block;
    vertical-align: top;
    width: 100%;
    max-width: 430px;
    margin: 0;
    margin-bottom: 20px;

    text-align: left;
    text-decoration: none !important;
    background: var(--color-white) !important;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.4,0,.2,1),
                box-shadow .3s cubic-bezier(.4,0,.2,1),
                border-color .3s ease;
}
.teaser:hover{
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-principal-20);
}

/* -------- Imagen -------- */
/* Cuadrada y proporcional al ancho de la tarjeta. No hace falta tope de altura:
   la tarjeta no pasa de 430px, así que la imagen tampoco. */
.teaser .contenedorimg{
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    overflow: hidden;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.teaser .img{
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.teaser:hover .img{ transform: scale(1.05); }

/* -------- Cuerpo de la tarjeta -------- */
.teaser .teaser-cuerpo{
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}

/* -------- Descripción (2 líneas) -------- */
.teaser .desc{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 4px;
    color: var(--color-text-light);
    font-size: 13.5px;
    line-height: 1.5;
}

/* -------- Iconos de los atributos -------- */
.teaser .teaser-atributos{
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 14px 0 4px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}
.teaser .teaser-atributo{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1 1 60px;
    max-width: 84px;
    color: var(--color-principal);
}
.teaser .teaser-atributo svg{
    width: 30px;
    height: 30px;
    display: block;
}
.teaser .teaser-atributo em{
    font-style: normal;
    font-size: 9.5px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: .2px;
    text-align: center;
    text-transform: uppercase;
    color: var(--color-text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* -------- Familia (FAM = ' ' en public: actua como espaciador) -------- */
.teaser .tit2{
    display: block;
    margin: 0;
    padding: 0;
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-decoration: none;
}

/* -------- Titulo (recorte a 2 lineas) -------- */
.teaser .tit{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 8px;
    color: var(--color-text);
    font-weight: 700;
    font-size: 20px;
    line-height: 26px;
    letter-spacing: -.2px;
    text-decoration: none;
}

/* -------- Ver ficha (enlace de texto) -------- */
.teaser .vermas{
    display: inline-block;
    width: auto;
    margin: 14px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--color-principal);
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .8px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color .2s ease;
}
.teaser:hover .vermas{
    color: var(--color-principal-hover);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* -------- Contenedor de badges (arriba-izquierda, apilados) -------- */
.teaser .divetiqueta{
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: auto;
    pointer-events: none;
}

/* -------- Badges pill (resetea float/circulo antiguos) -------- */
.teaser .etiqueta,
.teaser .etiqueta2{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 5px 10px;
    background: var(--color-principal);
    color: var(--color-white);
    font-weight: 700;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .6px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Colores por tipo (todos granate; agotado neutro por semantica) */
.teaser .agotado     { background: var(--color-complementary); }
.teaser .oferta      { display: none; }               /* oculto (comportamiento actual) */
.teaser .campanya    { background: var(--color-principal); }
.teaser .liquidacion { background: var(--color-principal); }
.teaser .new         { background: var(--color-principal); }
.teaser .destacado   { background: var(--color-principal); }
.teaser .masvendido  { background: var(--color-principal); }
.teaser .outlet      { background: var(--color-principal); }

/* Textos de los badges (se conservan) */
.teaser .agotado::after     { content: "SIN STOCK"; }
.teaser .oferta::after      { content: "OFERTA"; }
.teaser .liquidacion::after { content: "LIQUIDACIÓN"; }
.teaser .new::after         { content: "NUEVO"; }
.teaser .destacado::after   { content: "DESTACADO"; }
.teaser .masvendido::after  { content: "MÁS VENDIDO"; }
.teaser .outlet::after      { content: "OUTLET"; }

/* -------- % descuento (JS lo inyecta en #idPrecio2 > .dtopor) -------- */
.teaser .dtopor{
    display: none;                 /* lo activa teasers.js */
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    float: none;
    width: auto;
    height: auto;
    margin: 0;
    padding: 5px 10px;
    background: var(--color-principal);
    color: var(--color-white);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .3px;
    white-space: nowrap;
    text-align: center;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transform: none;               /* elimina el "lazo" rotado antiguo */
}
.teaser .dtopor span{
    font-size: 12px;
    font-weight: 800;
}

/* -------- Precio (comentado en la plantilla; listo si se activa) -------- */
.teaser .precio{
    display: none;                 /* lo controla teasers.js */
    margin: 0;
    padding: 0 14px 4px 14px;
    color: var(--color-text);
    text-decoration: none;
}
.teaser .precio .pvp{
    display: inline-block;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-principal);
    letter-spacing: -.3px;
    vertical-align: middle;
}
.teaser .precio span{
    display: inline-block;
    color: var(--color-principal);
    font-size: 15px;
}
.teaser .precio .descuento{
    display: none;                 /* JS lo pone inline-block si hay descuento */
    margin-left: 8px;
    font-size: 13px;
    vertical-align: middle;
}
.teaser .precio .descuento .pvpant{
    text-decoration: line-through;
    color: var(--color-text-light);
    opacity: .7;
    font-weight: 500;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Tablet: dos por fila. */
@media all and (max-width:1100px){
    .listadoteasers{ grid-template-columns: repeat(2, minmax(0, 430px)); gap: 22px 14px; }
    .teaser .tit{ font-size: 18px; line-height: 24px; }
    .teaser .teaser-cuerpo{ padding: 16px 16px 18px; }
}

@media all and (max-width:650px){ /* Móvil: una por fila */
    .listadoteasers{ grid-template-columns: minmax(0, 430px); gap: 18px; }
    .teaser .teaser-cuerpo{ padding: 14px 14px 16px; }
    .teaser .tit{ font-size: 17px; line-height: 22px; }
    .teaser .desc{ font-size: 13px; }
    /* Los atributos, en dos columnas y con el icono al lado del texto.
       Repartidos en cuatro columnas de 75px el nombre no cabía: quedaba en
       9,5px, cortado a dos líneas y con las columnas pegadas unas a otras.
       En dos columnas cada uno tiene el doble de sitio y el texto se lee. */
    .teaser .teaser-atributos{ gap: 12px 10px; margin-top: 14px; padding-top: 14px; }
    .teaser .teaser-atributo{
        flex: 1 1 calc(50% - 5px);
        max-width: none;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        min-width: 0;
    }
    .teaser .teaser-atributo svg{ width: 26px; height: 26px; flex: 0 0 26px; }
    .teaser .teaser-atributo em{
        font-size: 11px;
        line-height: 1.3;
        text-align: left;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    /* «Ver ficha» es el enlace de la tarjeta: con 15px de alto hay poco donde
       pulsar. */
    .teaser .vermas{
        margin-top: 12px;
        padding: 9px 0;
        font-size: 13.5px;
    }
    .teaser .divetiqueta{ top: 8px; left: 8px; gap: 5px; }
    .teaser .dtopor{ top: 8px; right: 8px; }
    .teaser .precio .pvp{ font-size: 19px; }
}

@media all and (max-width:380px){ /* Moviles muy estrechos */
    .teaser .etiqueta,
    .teaser .etiqueta2,
    .teaser .dtopor{ font-size: 9px; padding: 4px 8px; }
    .teaser .tit{ font-size: 13px; }
    .teaser .precio .pvp{ font-size: 17px; }
}