/*
 * Comparativa de Ediciones - Aitor San José
 * v1.5.0
 */

.asj-ce-wrap,
.asj-ce-floating-head,
.asj-ce-scroll-mask {
    --asj-ce-red: #b11414;
    --asj-ce-black: #111111;
    --asj-ce-text: #232323;
    --asj-ce-muted: #757575;
    --asj-ce-border: #e1e1e1;
    --asj-ce-soft: #f5f5f5;
    --asj-ce-gap: 6px;
    --asj-ce-head-gap: 10px;
}

.asj-ce-wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    color: var(--asj-ce-text);
    font-family: inherit;
}

.asj-ce-wrap *,
.asj-ce-wrap *::before,
.asj-ce-wrap *::after,
.asj-ce-floating-head *,
.asj-ce-floating-head *::before,
.asj-ce-floating-head *::after,
.asj-ce-scroll-mask,
.asj-ce-scroll-mask * {
    box-sizing: border-box;
}


/* =========================================================
   CABECERA ORIGINAL
========================================================= */

.asj-ce-head {
    position: relative;
    z-index: 30;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: var(--asj-ce-head-gap) !important;

    width: 100%;
    margin: 0;
    padding: 0 0 var(--asj-ce-gap);
}

.asj-ce-plan {
    position: relative;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 28px 28px 25px;

    border: 1px solid var(--asj-ce-border);
    border-radius: 12px;
    background: #fff;
}

.asj-ce-plan--author {
    border-color: var(--asj-ce-border);
    background: var(--asj-ce-soft);
}

.asj-ce-plan__eyebrow {
    display: block;
    margin-bottom: 9px;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--asj-ce-muted);
}

.asj-ce-plan--author .asj-ce-plan__eyebrow {
    color: var(--asj-ce-red);
}

.asj-ce-plan h3 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.05;
    letter-spacing: -.025em;
    color: var(--asj-ce-black);
}

.asj-ce-plan p {
    margin: 0;
    max-width: 420px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--asj-ce-muted);
}


/* =========================================================
   MÁSCARA SUPERIOR

   Oculta únicamente el contenido de la comparativa que sigue
   desplazándose por detrás del hueco de 15vh.
   El JS replica el fondo del contenedor de la página para que
   visualmente se integre con la sección.
========================================================= */

.asj-ce-scroll-mask {
    position: fixed !important;
    z-index: 99989 !important;

    display: none;

    margin: 0 !important;
    padding: 0 !important;

    pointer-events: none;
}

.asj-ce-scroll-mask.is-visible {
    display: block;
}


/* =========================================================
   CABECERA FLOTANTE
========================================================= */

.asj-ce-floating-head {
    position: fixed !important;
    z-index: 99990 !important;

    display: none !important;
    align-items: stretch !important;
    gap: var(--asj-ce-head-gap) !important;

    margin: 0 !important;
    padding: 0 !important;

    color: var(--asj-ce-text);
    font-family: inherit;

    pointer-events: none;
}

.asj-ce-floating-head.is-visible {
    display: flex !important;
}

.asj-ce-floating-head > .asj-ce-plan {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;

    box-shadow: 0 8px 22px rgba(0, 0, 0, .07);
}


/* =========================================================
   CUERPO
========================================================= */

.asj-ce-body {
    display: flex;
    flex-direction: column;
    gap: var(--asj-ce-gap);
}

.asj-ce-row {
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--asj-ce-border);
    border-radius: 8px;
    background: #fff;
}

.asj-ce-row__label {
    padding: 8px 17px;
    border-bottom: 1px solid var(--asj-ce-border);
    background: var(--asj-ce-soft);

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #5d5d5d;
}

.asj-ce-row__values {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

.asj-ce-cell {
    min-width: 0;
    min-height: 80px;
    padding: 18px 23px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    background: #fff;
}

.asj-ce-cell--amazon {
    border-right: 1px solid var(--asj-ce-border);
}

.asj-ce-cell--author {
    background: rgba(177, 20, 20, .018);
}

.asj-ce-cell strong {
    display: block;
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 650;
    color: var(--asj-ce-black);
}

.asj-ce-cell span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--asj-ce-muted);
}

.asj-ce-cell .asj-ce-subline {
    margin-top: 12px;
}

.asj-ce-cell .asj-ce-muted {
    margin-top: 0;
    color: #8b8b8b;
}


/* =========================================================
   IMÁGENES
========================================================= */

.asj-ce-row--image .asj-ce-cell {
    min-height: 255px;
    padding: 20px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.asj-ce-product-image {
    width: 100%;
    height: 215px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.asj-ce-product-image img {
    display: block;
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.asj-ce-product-image--amazon {}
.asj-ce-product-image--author {}

.asj-ce-product-image--amazon img {}
.asj-ce-product-image--author img {}


/* =========================================================
   PRECIO
========================================================= */

.asj-ce-row--price .asj-ce-cell {
    min-height: 104px;
}

.asj-ce-price-options {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
}

.asj-ce-price-option {
    min-width: 0;
    padding: 2px 18px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.asj-ce-price-option:first-child {
    padding-left: 0;
    border-right: 1px solid var(--asj-ce-border);
}

.asj-ce-price-option:last-child {
    padding-right: 0;
}

.asj-ce-price-option strong {
    font-size: 22px;
    letter-spacing: -.02em;
}

.asj-ce-price-option span {
    margin-top: 3px;
}

.asj-ce-row--price .asj-ce-price-author {
    font-size: 30px;
    letter-spacing: -.02em;
    color: var(--asj-ce-red);
}


/* =========================================================
   MÓVIL — siguen siendo DOS columnas
========================================================= */

@media (max-width: 700px) {

    .asj-ce-wrap,
    .asj-ce-floating-head,
    .asj-ce-scroll-mask {
        --asj-ce-gap: 4px;
        --asj-ce-head-gap: 5px;
    }

    .asj-ce-plan {
        padding: 19px 12px 16px;
        border-radius: 8px;
    }

    .asj-ce-plan__eyebrow {
        margin-bottom: 6px;
        font-size: 7px;
        letter-spacing: .08em;
    }

    .asj-ce-plan h3 {
        margin-bottom: 6px;
        font-size: 18px;
        line-height: 1.05;
    }

    .asj-ce-plan p {
        font-size: 9.5px;
        line-height: 1.35;
    }

    .asj-ce-row {
        border-radius: 6px;
    }

    .asj-ce-row__label {
        padding: 7px 10px;
        font-size: 8px;
        letter-spacing: .08em;
    }

    .asj-ce-cell {
        min-height: 68px;
        padding: 13px 10px;
    }

    .asj-ce-cell strong {
        font-size: 11px;
        line-height: 1.35;
    }

    .asj-ce-cell span {
        margin-top: 3px;
        font-size: 9px;
        line-height: 1.38;
    }

    .asj-ce-cell .asj-ce-subline {
        margin-top: 9px;
    }

    .asj-ce-row--image .asj-ce-cell {
        min-height: 165px;
        padding: 10px;
    }

    .asj-ce-product-image {
        height: 140px;
    }

    .asj-ce-row--price .asj-ce-cell {
        min-height: 82px;
    }

    .asj-ce-price-option {
        padding: 1px 8px;
    }

    .asj-ce-price-option strong {
        font-size: 15px;
        white-space: nowrap;
    }

    .asj-ce-price-option span {
        font-size: 8px;
    }

    .asj-ce-row--price .asj-ce-price-author {
        font-size: 21px;
    }
}

@media (max-width: 390px) {

    .asj-ce-plan {
        padding-left: 9px;
        padding-right: 9px;
    }

    .asj-ce-plan h3 {
        font-size: 16px;
    }

    .asj-ce-plan p {
        font-size: 8.5px;
    }

    .asj-ce-cell {
        padding-left: 8px;
        padding-right: 8px;
    }

    .asj-ce-cell strong {
        font-size: 10px;
    }

    .asj-ce-cell span {
        font-size: 8.5px;
    }

    .asj-ce-price-option {
        padding-left: 5px;
        padding-right: 5px;
    }

    .asj-ce-price-option strong {
        font-size: 13px;
    }
}
