/*
 * El Brujo tienda: bloques "Comprar en la tienda" (categoría y ficha de producto), aviso de entrega y checkout (envío).
 * Cargado desde templates/_partials/stylesheets.tpl con ?v=: subir la versión al cambiar este archivo
 * (custom.css no lleva versión y los navegadores lo guardan 7 días).
 */
/* ===== Categoría Productos: "Comprar en la tienda de El Brujo es muy fácil" (category-how-to-buy.tpl) ===== */
.eb-howtobuy {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr 1fr;
    margin: 1.25rem 0 1rem;
    padding: 1.75rem 0;
    background: #f6f0f9;
    border-radius: 10px;
    font-family: 'Avenir LT', sans-serif;
    color: #63666A;
    text-align: left;
}
.eb-howtobuy__intro {
    padding: 0 1.25rem;
}
.eb-howtobuy__title {
    margin: 0 0 1.25rem;
    font-size: 1.75rem;
    line-height: 1.25;
    font-weight: 700;
    color: #5F0578;
    text-transform: none;
}
.eb-howtobuy__lead {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: #63666A;
}
.eb-howtobuy__steps {
    display: contents;
    list-style: none;
}
.eb-howtobuy__step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1.25rem;
    border-left: 1px solid #e3d5ea;
}
.eb-howtobuy__icon {
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
}
.eb-howtobuy__icon svg,
.eb-howtobuy__note svg {
    fill: none;
    stroke: #5F0578;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.eb-howtobuy__icon svg {
    width: 28px;
    height: 28px;
}
.eb-howtobuy__body {
    min-width: 0;
}
.eb-howtobuy__step-title {
    margin: 0 0 .75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #5F0578;
    text-transform: none;
}
.eb-howtobuy__body p {
    margin: 0;
    font-size: .8125rem;
    line-height: 1.6;
    color: #63666A;
}
.eb-howtobuy__body a {
    color: inherit;
}
.eb-howtobuy__body p.eb-howtobuy__note {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
    padding: .6rem .9rem;
    background: #efe3f5;
    border-radius: 6px;
    font-size: .6875rem;
    line-height: 1.5;
    color: #5F0578;
}
.eb-howtobuy__note svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}
.eb-howtobuy__note strong {
    font-weight: 400;
    text-decoration: underline;
}
.eb-howtobuy__note--em span {
    font-style: italic;
    font-weight: 700;
}

.eb-howtobuy-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.5rem;
    padding: .7rem 1rem;
    background: #f6f0f9;
    border-radius: 8px;
    font-family: 'Avenir LT', sans-serif;
    text-align: left;
}
.eb-howtobuy-info__icon {
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #5F0578;
    color: #fff;
    font-weight: 700;
    font-size: .875rem;
    font-family: Georgia, serif;
}
.eb-howtobuy-info p {
    margin: 0;
    font-size: .8125rem;
    color: #63666A;
}
.eb-howtobuy-info a {
    color: #5F0578;
    text-decoration: underline;
}

/*
 * Anchos de columna según el ancho del propio bloque (container query, wrapper .eb-howtobuy-cq),
 * no del viewport: el bloque vive en la categoría (ancho completo) y en la ficha (media columna).
 * Las proporciones dan más ancho al paso 2 (el de más texto) para igualar alturas; medidas en staging
 * 2026-10-14 (1024–1920px): ningún texto de paso baja de ~125px de ancho.
 */
.eb-howtobuy-cq {
    container: ebhtb / inline-size;
}
.eb-howtobuy--default {
    grid-template-columns: 1fr .9fr 1.25fr 1fr;
}
/* < 1250px: introducción arriba, 3 pasos debajo */
@container ebhtb (max-width: 1249px) {
    .eb-howtobuy--default {
        grid-template-columns: .8fr 1.25fr 1fr;
        row-gap: 1.5rem;
    }
    .eb-howtobuy--default .eb-howtobuy__intro {
        grid-column: 1 / -1;
    }
    .eb-howtobuy--default .eb-howtobuy__step:nth-child(1) {
        border-left: 0;
    }
}
/* 700–1099px: ícono + título en una fila y el texto debajo a todo el ancho (si no, el paso 1 queda < 100px) */
@container ebhtb (min-width: 700px) and (max-width: 1099px) {
    .eb-howtobuy--default .eb-howtobuy__step {
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr);
        align-items: center;
        align-content: start;
        column-gap: 1rem;
    }
    .eb-howtobuy--default .eb-howtobuy__body {
        display: contents;
    }
    .eb-howtobuy--default .eb-howtobuy__step-title {
        margin: 0;
    }
    .eb-howtobuy--default .eb-howtobuy__body p {
        grid-column: 1 / -1;
        margin-top: .75rem;
    }
}
/* < 700px: una columna */
@container ebhtb (max-width: 699px) {
    .eb-howtobuy--default {
        grid-template-columns: 1fr;
        padding: 1.25rem 0;
    }
    .eb-howtobuy--default .eb-howtobuy__title {
        font-size: 1.375rem;
    }
    .eb-howtobuy--default .eb-howtobuy__step {
        padding-top: 1.25rem;
        border-left: 0;
        border-top: 1px solid #e3d5ea;
    }
    .eb-howtobuy--default .eb-howtobuy__icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }
    .eb-howtobuy--default .eb-howtobuy__icon svg {
        width: 22px;
        height: 22px;
    }
    .eb-howtobuy-info {
        align-items: flex-start;
    }
}

/* Número de paso: "1." en línea en la variante por defecto (categoría) */
.eb-howtobuy__num::after {
    content: ".";
}

/* ===== Ficha de producto: variante compacta (category-how-to-buy.tpl eb_variant='compact') ===== */
.eb-howtobuy--compact {
    grid-template-columns: .8fr 1.25fr 1fr;
    row-gap: 1.25rem;
    margin: 1.5rem 0 1rem;
    padding: 1.25rem 0 1rem;
    background: #fbf8fd;
    border: 1px solid #e6d9ee;
}
.eb-howtobuy--compact .eb-howtobuy__intro {
    grid-column: 1 / -1;
    padding: 0 1rem;
}
.eb-howtobuy--compact .eb-howtobuy__title {
    margin: 0 0 .25rem;
    font-size: 1.375rem;
}
.eb-howtobuy--compact .eb-howtobuy__lead {
    font-size: .875rem;
}
/* Ícono + número/título en una fila; el texto debajo usa todo el ancho de la columna */
.eb-howtobuy--compact .eb-howtobuy__step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    align-content: start;
    column-gap: .75rem;
    padding: 0 .9rem;
}
.eb-howtobuy--compact .eb-howtobuy__body {
    display: contents;
}
.eb-howtobuy--compact .eb-howtobuy__body p {
    grid-column: 1 / -1;
    margin-top: .6rem;
}
.eb-howtobuy--compact .eb-howtobuy__step:first-child {
    border-left: 0;
}
.eb-howtobuy--compact .eb-howtobuy__icon {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    background: #f1e8f6;
}
.eb-howtobuy--compact .eb-howtobuy__icon svg {
    width: 22px;
    height: 22px;
}
.eb-howtobuy--compact .eb-howtobuy__step-title {
    margin: 0;
    font-size: .8125rem;
    line-height: 1.3;
}
.eb-howtobuy--compact .eb-howtobuy__num {
    display: block;
    margin-bottom: .2rem;
    font-size: 1.25rem;
    line-height: 1.2;
}
.eb-howtobuy--compact .eb-howtobuy__num::after {
    content: none;
}
.eb-howtobuy--compact .eb-howtobuy__body p {
    font-size: .6875rem;
    line-height: 1.5;
}
.eb-howtobuy--compact .eb-howtobuy__body p.eb-howtobuy__note {
    gap: .5rem;
    margin-top: .6rem;
    padding: .5rem .6rem;
    font-size: .625rem;
}
.eb-howtobuy--compact .eb-howtobuy__note svg {
    flex-basis: 16px;
    width: 16px;
    height: 16px;
}
.eb-howtobuy--compact .eb-howtobuy-info {
    grid-column: 1 / -1;
    gap: .6rem;
    margin: 0 1rem;
    padding: .85rem 0 0;
    background: none;
    border-top: 1px solid #e6d9ee;
    border-radius: 0;
}
.eb-howtobuy--compact .eb-howtobuy-info__icon {
    flex-basis: 18px;
    width: 18px;
    height: 18px;
    background: none;
    border: 1.5px solid #63666A;
    color: #63666A;
    font-size: .6875rem;
}
.eb-howtobuy--compact .eb-howtobuy-info p {
    font-size: .6875rem;
}
/* Bloque de 520–639px (ficha a ~1440px): proporciones más suaves para que el paso 1 no baje de ~125px de texto */
@container ebhtb (min-width: 520px) and (max-width: 639px) {
    .eb-howtobuy--compact {
        grid-template-columns: .9fr 1.2fr 1fr;
    }
}
/* Bloque estrecho (< 520px: columna derecha en 992–1199px o móvil): pasos apilados */
@container ebhtb (max-width: 519px) {
    .eb-howtobuy--compact {
        grid-template-columns: 1fr;
    }
    .eb-howtobuy--compact .eb-howtobuy__step {
        padding: 1rem 1rem 0;
        border-left: 0;
        border-top: 1px solid #e6d9ee;
    }
    .eb-howtobuy--compact .eb-howtobuy__num {
        display: inline;
        font-size: inherit;
    }
    .eb-howtobuy--compact .eb-howtobuy__num::after {
        content: ".";
    }
}

/* ===== Ficha de producto: aviso de entrega (product-delivery-notice.tpl) ===== */
.eb-delivery-notice {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 0 0 1.25rem;
    padding: .9rem 1.5rem;
    background: #f6f0f9;
    border: 1px solid #ecdff3;
    border-radius: 10px;
    font-family: 'Avenir LT', sans-serif;
    text-align: left;
}
.eb-delivery-notice__icon {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ebdcf3;
}
.eb-delivery-notice__icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #5F0578;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.eb-delivery-notice p {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.5;
    color: #5F0578;
}
.eb-delivery-notice strong {
    font-weight: 700;
}
@media (max-width: 767px) {
    .eb-delivery-notice {
        gap: .75rem;
        padding: .75rem 1rem;
    }
    .eb-delivery-notice__icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }
    .eb-delivery-notice__icon svg {
        width: 22px;
        height: 22px;
    }
    .eb-delivery-notice p {
        font-size: .8125rem;
    }
}

/* ===== Checkout, paso "Método de envío" (checkout/_partials/steps/shipping.tpl) ===== */
.eb-shipping-notice {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 0 0 1.5rem;
    padding: 1rem 1.5rem;
    background: #5F0578;
    border-radius: 6px;
    color: #fff;
    text-align: left;
}
.eb-shipping-notice__icon {
    flex: 0 0 32px;
    display: flex;
}
.eb-shipping-notice__icon svg {
    width: 32px;
    height: 32px;
    stroke: #fff;
}
.eb-shipping-notice p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #fff;
}
.eb-shipping-notice strong {
    font-weight: 700;
}

#checkout .checkout-step .delivery-option.eb-carrier {
    position: relative;
    margin: 0 0 1rem;
    padding: 1.5rem 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}
#checkout .checkout-step .eb-carrier--single .eb-carrier__radio {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
#checkout .checkout-step .eb-carrier--single .eb-carrier__label {
    flex: 1 1 100%;
    max-width: 100%;
}
#checkout .checkout-step .eb-carrier .eb-carrier__label {
    display: grid;
    grid-template-columns: 1fr 1.5fr .9fr;
    align-items: center;
    cursor: pointer;
}
.eb-carrier__main {
    display: block;
    padding: 0 1.5rem 0 2rem;
}
.eb-carrier__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f3eaf8;
    color: #5F0578;
}
.eb-carrier__icon svg {
    width: 34px;
    height: 34px;
    stroke: #5F0578;
}
.eb-carrier__icon img {
    max-width: 40px;
    max-height: 40px;
    margin: 0;
}
.checkout-step .eb-carrier .carrier-name.eb-carrier__name {
    display: block;
    margin-top: .9rem;
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 400;
    color: #414141;
    text-transform: none;
}
.checkout-step .eb-carrier .carrier-delay.eb-carrier__delay {
    display: block;
    padding: .25rem 2rem;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    font-size: .9375rem;
    line-height: 1.6;
    color: #63666A;
}
.eb-carrier__p {
    display: block;
}
.eb-carrier__p + .eb-carrier__p {
    margin-top: .6rem;
}
.checkout-step .eb-carrier .carrier-price.eb-carrier__price {
    display: block;
    padding: 0 1rem;
    text-align: center;
    font-size: 1.25rem;
    color: #414141;
}
#checkout .checkout-step .eb-carrier:not(.eb-carrier--single):has(input:checked) {
    border-color: #5F0578;
}
@media (max-width: 767px) {
    .eb-shipping-notice {
        gap: .9rem;
        padding: .9rem 1rem;
    }
    .eb-shipping-notice__icon {
        flex-basis: 26px;
    }
    .eb-shipping-notice__icon svg {
        width: 26px;
        height: 26px;
    }
    .eb-shipping-notice p {
        font-size: .875rem;
    }
    #checkout .checkout-step .eb-carrier .eb-carrier__label {
        grid-template-columns: 1fr;
        row-gap: 1rem;
    }
    .eb-carrier__main {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0 1rem;
    }
    .eb-carrier__icon {
        flex: 0 0 52px;
        width: 52px;
        height: 52px;
    }
    .checkout-step .eb-carrier .carrier-name.eb-carrier__name {
        margin-top: 0;
        font-size: 1.125rem;
    }
    .checkout-step .eb-carrier .carrier-delay.eb-carrier__delay {
        padding: 1rem 1rem 0;
        border: 0;
        border-top: 1px solid #e5e5e5;
    }
    .checkout-step .eb-carrier .carrier-price.eb-carrier__price {
        text-align: left;
        font-size: 1.125rem;
    }
}
