/**
* 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)
*/

.desme {
    --desme-max: 1440px;
    /* Separación entre cards. Al estar el vecino anclado hacia el activo
       (transform-origin), este gap se mantiene constante y no crece con el escalado. */
    --desme-gap: 20px;
    /* Padding lateral del layout (desktop 30px, ≤992px 15px). */
    --desme-edge: 30px;
    /* Principal: ancho del contenedor (100% − padding a cada lado), tope 1380px. */
    --desme-slide: min(1380px, calc(100% - var(--desme-edge) * 2));
    --desme-side-scale: 0.86;
    --desme-radius: 18px;
    --desme-accent: #1440FF;
    --desme-accent-2: #5A6473;
    --desme-card-bg: #F3F4F6;
    --desme-card-bg-2: #d8dadc;
    --desme-text: #f3f4fb;
    --desme-muted: #5A6473;
    width: 100%;
    box-sizing: border-box;
    padding: 32px 0;
    /* Permite que el viewport salga a sangre completa sin provocar scroll horizontal. */
    overflow-x: clip;
}

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

/* Evita que al arrastrar el carrusel se "coja" la imagen (drag fantasma nativo). */
.desme img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

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

/* ── Header ─────────────────────────────────────────────── */
.desme__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.desme__title {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
    line-height: 36px;
    letter-spacing: 0.3px;
}

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

.desme__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--desme-card-bg-2);
    color: var(--desme-text);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.desme__arrow:hover {
    background: var(--desme-accent);
    transform: translateY(-2px);
}

.desme__arrow[disabled] {
    opacity: 0.35;
    cursor: default;
    transform: none;
    background: var(--desme-card-bg-2);
}

/* ── Slider track (modo centrado / peek) ────────────────── */
.desme__viewport {
    /* Rompe SOLO el padding del __inner (margen negativo = -edge, layout-based,
       NO 100vw) para ocupar el ancho de contenido del sitio. Así el slide activo
       (= contenedor − 60px) queda centrado a 30/15px del borde, alineado con el
       resto del sitio en cualquier anchura (con o sin barra de scroll). */
    width: auto;
    margin-inline: calc(-1 * var(--desme-edge));
    overflow-x: clip;
    overflow-y: visible;
    padding: 20px 0;
}

.desme__track {
    display: flex;
    align-items: center;
    gap: var(--desme-gap);
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    cursor: grab;
    touch-action: pan-y;
}

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

.desme-slide {
    flex: 0 0 var(--desme-slide);
    min-width: 0;
    transform: scale(var(--desme-side-scale));
    opacity: 0.55;
    cursor: pointer;
    user-select: none;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.45s ease;
}

/* El vecino se escala anclado hacia el slide activo para quedar pegado (sin hueco). */
.desme-slide.is-prev {
    transform-origin: right center;
}

.desme-slide.is-next {
    transform-origin: left center;
}

.desme-slide.is-active {
    transform: scale(1);
    opacity: 1;
    cursor: default;
    position: relative;
    z-index: 2;
}

/* ── Un solo producto: ocupa el contenedor central, sin carrusel ── */
.desme--single .desme__viewport {
    width: auto;
    overflow: visible;
    padding: 0;
    margin: 0;
}

.desme--single .desme__track {
    transform: none !important;
}

.desme--single .desme-slide {
    flex-basis: 100%;
    transform: none;
    opacity: 1;
    cursor: default;
}

.desme--single .desme__nav,
.desme--single .desme__dots {
    display: none;
}

/* ── Card ───────────────────────────────────────────────── */
.desme-card {
    display: flex;
    gap: 0;
    height: 100%;
    border-radius: var(--desme-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 1);
    color: var(--desme-text);
    box-shadow: 0 4px 17px rgba(0, 0, 0, 0.25);
    transition:all 0.3s ease;
}
.desme-card:hover{
    box-shadow: 0 7px 25px rgba(0, 0, 0, 0.25);
}

.desme-card__media {
    position: relative;
    flex: 0 0 50%;
    min-height: 420px;
    background: #0c0d12;
    aspect-ratio: 680 / 500;
    overflow: hidden;
}
.desme-card__cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center; 
}

.desme-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.desme-card__platforms {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 2;
}

.desme-card__plat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.desme-card__plat img {
    max-height: 24px;
    max-width: 40px;
    object-fit: contain;
    display: block;
}

.desme-card__plat-text {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.desme-card__info {
    display: flex;
    flex-direction: column;
    padding: 28px 32px;
    justify-content: center;
        width: 100%;
}

.desme-card__release {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 400;
    color: var(--desme-accent-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 32px;
}

.desme-card__release-icon {
    display: inline-block;
    vertical-align: middle;
}

.desme-card__name {
    margin: 0 0 7px;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 600;
    font-size: 42px;
    line-height: 54px;
    color: #0F141A;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 162px;
}

.desme-card__desc {
    margin: 0 0 35px;
    color: var(--desme-muted);
    font-size: 16px;
    line-height: 20px;
    display: -webkit-box;
    white-space: pre-line;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 60px;
}

.desme-card__bottom {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 56px;
    /* margin-top: auto; */
    /* padding-top: 16px; */
}

.desme-card__price {
    font-size: 32px;
    font-weight: 700;
    color: #253640;
    line-height:40px;
}

/* ── Reserve button ─────────────────────────────────────── */
.desme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    border: 0;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    line-height: 25px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.desme-btn--reserve {
    position: relative;
    background: rgba(20, 64, 255, 1);
    color: #fff;
    width: 100%;
    overflow: hidden;
    z-index: 0;
    transition:0.3s ease;
}


.desme-btn--reserve:hover {
    color: #fff;
    text-decoration: none;
    background:#17263f;
}

.desme-btn--reserve:hover::after {
    opacity: 1;
}

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

/* Área táctil de 24x24 (WCAG 2.5.8) con el punto visual de 9px dibujado en
   ::before, así el objetivo es cómodo de pulsar sin agrandar el punto. */
.desme__dot {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
}
.desme__dot::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--desme-muted);
    opacity: 0.45;
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.desme__dot.is-active::before {
    opacity: 1;
    background: var(--desme-accent);
    transform: scale(1.25);
}

/* ── Reserve modal ──────────────────────────────────────── */
.desme-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.desme-modal[hidden] {
    display: none;
}

.desme-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 9, 14, 0.72);
    backdrop-filter: blur(3px);
}

.desme-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #00062a;
    color: var(--desme-text);
    border-radius: 16px;
    padding: 26px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    animation: desme-pop 0.18s ease;
}

@keyframes desme-pop {
    from { transform: translateY(12px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.desme-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--desme-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.desme-modal__close:hover {
    color: #fff;
}

.desme-modal__title {
    margin: 0 0 18px;
    font-size: 19px;
    font-weight: 800;
}

.desme-modal__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.desme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--desme-text);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s ease, transform 0.15s ease;
}

.desme-option:hover {
    background: var(--desme-accent);
    color: #fff;
    transform: translateX(3px);
    text-decoration: none;
}

.desme-option img {
    max-height: 26px;
    max-width: 42px;
    object-fit: contain;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 992px) {
    /* Padding lateral 15px. Con varios slides el principal NO ocupa el 100%:
       deja espacio para que asome el siguiente (con uno solo, desme--single lo
       lleva al 100%). Gap menor y más contraste de escala/atenuación. */
    .desme {
        --desme-edge: 15px;
        --desme-slide: 80%;
        --desme-gap: 14px;
        --desme-side-scale: 0.82;
    }

    .desme-slide:not(.is-active) { opacity: 0.45; }

    /* Se mantiene el formato horizontal (imagen + info). En vez de apilar en
       columna —que dispara la altura— se reduce la tipografía y se quitan los
       min-height fijos para que la card no crezca. */
    .desme-card__media { min-height: 0; }

    .desme-card__info {
        padding: 22px 24px;
        max-width: 100%;
        width: 100%;
    }

    .desme-card__release {
        margin-bottom: 14px;
        font-size: 14px;
    }

    .desme-card__name {
        font-size: 24px;
        line-height: 32px;
        min-height: 64px;
        margin-bottom: 10px;
    }

    .desme-card__desc {
        font-size: 15px;
        line-height: 20px;
        min-height: 60px;
        margin-bottom: 18px;
    }

    .desme-card__bottom { gap: 22px; }

    .desme-card__price {
        font-size: 24px;
        line-height: 30px;
    }

    .desme-btn {
        font-size: 16px;
        line-height: 20px;
        padding: 12px 22px;
    }
}

@media (max-width: 576px) {

    .desme-card {
        flex-direction: column;
    }

    .desme-card__media {
        flex: 0 0 auto;
        min-height: 180px;
    }

    .desme-card__info { padding: 18px; }

    .desme-card__release { margin-bottom: 10px; }

    .desme-card__name {
        font:600 20px/22px Outfit;
        min-height: 44px;
    }

    .desme-card__desc {margin-bottom: 14px;font-size: 14px;line-height: 18px;min-height: 54px;}

    .desme-card__bottom { gap: 16px; }

    .desme-card__price {font-size: 20px;line-height: 25px;}
    .desme__nav{display:none;}
    .desme-btn--reserve{
        padding-block:6px;
        border-radius:4px;
        font:600 16px/20px Outfit;
    }
    .desme-card__plat{
        width:30px;
        min-width: 30px;
        height:30px;
    }
    .desme__head{
        margin-bottom:24px;
    }
    .desme__head .desme__title{
        font-weight:500;
        font-size:20px;
        line-height:25px;
    }
    .desme{
        padding-block:24px;
    }
    .desme__dots{
        margin-top:0px;
    }
}
