/**
* 2007-2026 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    David Escudero Digital Studio <contacto@davidescudero.com>
*  @copyright 2007-2026 David Escudero Digital Studio
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*/

.destop {
    --destop-max: 1440px;
    --destop-edge: 30px;
    --destop-gap: 20px;
    --destop-accent: #1440ff;
    /* Sangría lateral: alinea la 1ª/última card al contenedor (content-box). */
    --destop-gutter: calc(var(--destop-edge) + max(0px, (100% - var(--destop-max)) / 2));

    width: 100%;
    box-sizing: border-box;
    padding: 32px 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    overflow-x: clip;
}

.destop *,
.destop *::before,
.destop *::after {
    box-sizing: border-box;
}

.destop img {
    -webkit-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

.destop__inner {
    max-width: var(--destop-max);
    margin: 0 auto;
    padding: 0 var(--destop-edge);
}

/* ── Header / título ─────────────────────────────────────── */
.destop__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /* Separación de 24px respecto al slide. */
    margin-bottom: 24px;
}

.destop__title {
    margin: 0;
    font-family: inherit;
    font-weight: 500;
    font-size: 24px;
    line-height: 36px;
    color: rgba(15, 20, 26, 1);
}

.destop__nav {
    display: flex;
    gap: 10px;
}

.destop__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #eef0f4;
    color: rgba(15, 20, 26, 1);
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.destop__arrow:hover {
    background: var(--destop-accent);
    color: #fff;
    transform: translateY(-2px);
}

.destop__arrow[disabled] {
    opacity: 0.35;
    cursor: default;
    transform: none;
    background: #eef0f4;
    color: rgba(15, 20, 26, 1);
}

/* ── Carrusel ────────────────────────────────────────────── */
.destop__viewport {
    /* A sangre completa (ancho de pantalla) para que las cards asomen hasta el
       borde derecho. La sangría izq/der real la ponen el gutter y el ::after. */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow-x: clip;
    overflow-y: visible;
    padding: 6px 0;
}

/* ≤1440px: el breakout con 100vw incluye la barra de scroll y desalinea la
   sangría. Debajo del ancho del contenedor rompemos SOLO el padding del __inner
   con margen negativo (layout, sin vw): 1ª card en sangría izq. y última en la
   derecha, exactas y alineadas con header/menú. */
@media (max-width: 1440px) {
    .destop__viewport {
        width: auto;
        margin-inline: calc(-1 * var(--destop-edge));
    }
}

.destop__track {
    display: flex;
    gap: var(--destop-gap);
    /* Sangría izquierda como padding (cuenta en scrollWidth); la derecha con un
       espaciador ::after porque el padding final del flex no cuenta en scrollWidth. */
    padding-left: var(--destop-gutter);
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    cursor: grab;
    touch-action: pan-y;
}

/* Espaciador final: garantiza la sangría derecha al llegar a la última card. */
.destop__track::after {
    content: "";
    flex: 0 0 var(--destop-gutter);
    margin-left: calc(-1 * var(--destop-gap));
    align-self: stretch;
}

.destop__track.is-dragging {
    cursor: grabbing;
    transition: none;
}

/* Cuando todo cabe (no hace falta slider): sin arrastre, sin flechas ni dots. */
.destop.is-static .destop__track {
    cursor: default;
}

.destop.is-static .destop__nav,
.destop.is-static .destop__dots {
    display: none;
}

.destop-card {
    flex: 0 0 425px;
    width: 425px;
}

/* ── Card 425 × 141 ──────────────────────────────────────── */
.destop-card__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 425px;
    height: 141px;
    padding: 0 18px;
    background: rgba(243, 244, 246, 1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all ease 0.3s;
}
.destop-card__link:hover{
    box-shadow: 0px 0px 4px #00000096;
}
/* Insignia de ranking (triángulo esquina superior izquierda). */
.destop-card__rank {
    position: absolute;
    top: 0;
    left: 0;
    width: 90px;
    height: 90px;
    z-index: 3;
    pointer-events: none;
}

.destop-card__tri {
    position: absolute;
    inset: 0;
    /* SVG inline: relleno con degradado y arista curva cóncava (hacia dentro),
       sin borde. Con clip-path no se puede pintar borde, por eso se dibuja la
       forma como imagen. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='68' viewBox='0 0 68 68'%3E%3Cdefs%3E%3ClinearGradient id='destopTri' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%231440ff'/%3E%3Cstop offset='1' stop-color='%230e2071'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0,0 L68,0 Q20,20 0,68 Z' fill='url(%23destopTri)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: top left;
    background-size: 90px 90px;
}

/* Número de ranking dibujado como SVG (contorno blanco + relleno degradado),
   más fiable que background-clip:text + text-stroke. El tamaño del dígito ≈
   alto del SVG × 105/150. */
.destop-card__num {
    position: absolute;
    top: 0;
    left: 8px;
    width: 24px;
    height: 46px;
    overflow: visible;
    pointer-events: none;
}

/* Imagen 114 × 114. */
.destop-card__img {
    flex: 0 0 114px;
    width: 114px;
    height: 114px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.destop-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Nombre + precio (gap 12px). */
.destop-card__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.destop-card__name {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: rgba(37, 54, 64, 1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 40px;
}

.destop-card__price {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 30px;
    color: rgba(37, 54, 64, 1);
}

/* ── Dots ────────────────────────────────────────────────── */
.destop__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.destop__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #9aa2b1;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.destop__dot.is-active {
    opacity: 1;
    background: var(--destop-accent);
    transform: scale(1.25);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 992px) {
    .destop { --destop-edge: 15px; }
}

/* Móvil/tablet: la card debe CABER en el viewport (con flex-basis, no solo
   width, si no el flex sigue usando los 425px y se desborda → hueco a la
   derecha y un dot de más). min(425px, 86vw) deja además un pequeño peek. */
@media (max-width: 768px) {
    .destop-card {
        flex: 0 0 min(425px, 86vw);
        width: min(425px, 86vw);
    }
    .destop-card__link {
        width: 100%;
    }
}
@media (max-width: 576px){
    .destop__head{
        margin-bottom:4px;
    }
    .destop__title{
        font-size:20px;
    }
    .destop-card__name{
        font-size:14px;
    }
    .destop{
        padding-block:24px;
    }
    .destop-card__price{
        font-size:20px;
    }
}