/* =====================================================================
 * Alem Descartables: ocultar precios en carrito, mini carrito y checkout.
 * La plantilla Nectar carga este archivo sola (templates/nectar/css/custom.css)
 * y las actualizaciones de EasyStore no lo tocan.
 * Para volver a mostrar los precios, borrar este bloque o el archivo.
 * ===================================================================== */

/* Cualquier importe que EasyStore pinte con Alpine (x-text="..._with_currency") */
.easystore-cart [x-text*="with_currency"],
.easystore-cart-wrapper [x-text*="with_currency"],
.easystore-checkout-wrapper [x-text*="with_currency"],
.easystore-cart .easystore-price-with-tax,
.easystore-cart-wrapper .easystore-price-with-tax,
.easystore-checkout-wrapper .easystore-checkout-tax-note {
    display: none !important;
}

/* Página del carrito: columnas Precio y Total, y la línea de Subtotal */
.easystore-cart .easystore-cart-item-price,
.easystore-cart .easystore-cart-item-total,
.easystore-cart .easystore-cart-summary .mb-2:has([x-text*="with_currency"]) {
    display: none !important;
}

/* Checkout: bloque de subtotal / cupón / envío / total del resumen */
.easystore-checkout-wrapper .easystore-checkout-footer {
    display: none !important;
}

/* =====================================================================
 * Carrito: botones "Continuar al pago" y "Seguir comprando" con los
 * colores del sitio (naranja #F7A313, texto blanco, hover #1A1A1A).
 * ===================================================================== */
.easystore-cart .cart-summary-btn .btn,
.easystore-cart .easystore-empty-cart .btn {
    background-color: #F7A313 !important;
    border: 1px solid #F7A313 !important;
    color: #fff !important;
    border-radius: 30px;
    text-decoration: none !important;
    padding: .65rem 1.5rem;
}
.easystore-cart .cart-summary-btn .btn + .btn {
    margin-top: .75rem;
}
.easystore-cart .cart-summary-btn .btn:hover,
.easystore-cart .cart-summary-btn .btn:focus,
.easystore-cart .easystore-empty-cart .btn:hover,
.easystore-cart .easystore-empty-cart .btn:focus {
    background-color: #1A1A1A !important;
    border-color: #1A1A1A !important;
    color: #fff !important;
}

/* =====================================================================
 * Checkout: datos de cada producto (Cantidad, Peso, opciones) más grandes.
 * Cambiar 1.05rem por otro valor para ajustar el tamaño.
 * ===================================================================== */
.easystore-checkout-wrapper .easystore-metadata-key,
.easystore-checkout-wrapper .easystore-metadata-value {
    font-size: 1.05rem !important;
    line-height: 1.4;
}

/* Etiquetas de producto (Cantidad:, Peso:, opciones) en naranja y más grandes */
.easystore-metadata .easystore-metadata-item .easystore-metadata-key,
.easystore-metadata-h .easystore-metadata-item .easystore-metadata-key {
    color: #F7A313 !important;
    font-size: 1.25rem !important;
}
.easystore-metadata .easystore-metadata-item .easystore-metadata-value,
.easystore-metadata-h .easystore-metadata-item .easystore-metadata-value {
    font-size: 1.25rem !important;
}

/* Carrito: "Continuar al pago" con borde y texto naranja, fondo blanco;
 * al pasar el mouse, fondo naranja y texto blanco. */
body .easystore-cart .cart-summary-btn .btn.btn-primary {
    background-color: #fff !important;
    border: 2px solid #F7A313 !important;
    color: #F7A313 !important;
    padding: 10px 30px;
    border-radius: 52px;
}
body .easystore-cart .cart-summary-btn .btn.btn-primary:hover,
body .easystore-cart .cart-summary-btn .btn.btn-primary:focus,
body .easystore-cart .cart-summary-btn .btn.btn-primary:active {
    background-color: #F7A313 !important;
    border-color: #F7A313 !important;
    color: #fff !important;
}

/* Borde de botones primarios: reemplaza el verde #adc7b2 del preset por el naranja del sitio */
body .sppb-btn.sppb-btn-primary, body .sppb-btn.btn-primary, body .sppb-btn.btn-outline-primary,
body .btn.sppb-btn-primary, body .btn.btn-primary, body .btn.btn-outline-primary {
  border-color: #F7A313;
}
body .sppb-btn.sppb-btn-primary:hover, body .sppb-btn.btn-primary:hover, body .sppb-btn.btn-outline-primary:hover,
body .btn.sppb-btn-primary:hover, body .btn.btn-primary:hover, body .btn.btn-outline-primary:hover {
  border-color: #1A1A1A;
}

:root { --sb-wa: #25D366; --sb-wa-dark: #1EBE57; --sb-white: #fff; }

/* =====================================================================
 * CÓMO COMPRAR (página itemid-107)
 * El Text Block con pasos "1. …", "2. …" lo convierte js/custom.js en
 * resumen + línea de tiempo; el bloque "Importante" en recuadro.
 *   1. Variables y espacios de la página
 *   2. Resumen de pasos (franja con íconos)
 *   3. Línea de tiempo
 *   4. Botón de ejemplo y capturas
 *   5. Recuadro "Importante"
 *   6. Llamado a la acción final (Raw HTML con class="alem-cta")
 * ===================================================================== */

/* 1. Variables y espacios ------------------------------------------- */
:root {
    --alem-orange: #F7A313;
    --alem-orange-dark: #D98D00;
    --alem-orange-soft: #FFF3DC;
    --alem-cream: #FFF8EC;
    --alem-dark: #1A1A1A;
    --alem-text: #333333;
    --alem-border: #ECE7DE;
    --alem-font-display: 'Roboto Condensed', sans-serif;
    --alem-font-body: 'Public Sans', sans-serif;
}
/* El header es fijo: el espacio de arriba solo deja lugar para él */
body.itemid-107 .sp-page-builder .page-content > .sppb-section:first-child {
    margin-top: 0 !important;
    padding-top: 140px !important;
    padding-bottom: 60px !important;
}
body.itemid-107 .sp-page-builder .page-content > .sppb-section:first-child .sppb-row-column {
    max-width: 100% !important;
    flex-basis: 100% !important;
    margin-top: 0 !important;
}
.alem-has-howto #sp-page-builder .sppb-addon-header .sppb-addon-title {
    margin-bottom: 8px !important;
    color: var(--alem-dark);
    font-family: var(--alem-font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}
@media (max-width: 991.98px) {
    body.itemid-107 .sp-page-builder .page-content > .sppb-section:first-child {
        padding-top: 120px !important;
    }
    .alem-has-howto #sp-page-builder .sppb-addon-header .sppb-addon-title {
        font-size: 30px;
    }
}

/* 2. Resumen de pasos ------------------------------------------------- */
.alem-steps-summary {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 44px;
}
.alem-steps-summary::before {
    content: "";
    position: absolute;
    top: 32px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: repeating-linear-gradient(90deg, #E9D9BA 0 8px, transparent 8px 14px);
}
.alem-steps-summary-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    color: var(--alem-dark) !important;
    text-align: center;
    text-decoration: none !important;
}
.alem-steps-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--alem-orange);
    color: #fff;
    box-shadow: 0 6px 16px rgba(247, 163, 19, .3);
    transition: transform .2s ease, background-color .2s ease;
}
.alem-steps-summary-item:nth-child(3) .alem-steps-summary-icon {
    background: var(--sb-wa);
    box-shadow: 0 6px 16px rgba(37, 211, 102, .3);
}
.alem-steps-summary-item:hover .alem-steps-summary-icon {
    transform: translateY(-3px);
}
.alem-steps-summary-icon svg {
    width: 26px;
    height: 26px;
}
.alem-steps-summary-item:nth-child(3) .alem-steps-summary-icon svg {
    fill: currentColor;
}
.alem-steps-summary-num {
    color: var(--alem-orange-dark);
    font-family: var(--alem-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.alem-steps-summary-title {
    font-family: var(--alem-font-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}
@media (max-width: 767.98px) {
    .alem-steps-summary {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 32px;
    }
    .alem-steps-summary::before {
        display: none;
    }
    .alem-steps-summary-item {
        flex-direction: row;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid var(--alem-border);
        border-radius: 12px;
        background: #fff;
        text-align: left;
    }
    .alem-steps-summary-icon {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin: 0;
        border-width: 0;
    }
    .alem-steps-summary-icon svg {
        width: 20px;
        height: 20px;
    }
    .alem-steps-summary-num {
        display: none;
    }
}

/* 3. Línea de tiempo -------------------------------------------------- */
.alem-steps {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}
.alem-steps::before {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 23px;
    width: 2px;
    background: linear-gradient(var(--alem-orange), var(--alem-orange-soft));
}
.alem-step {
    position: relative;
    display: flex;
    gap: 22px;
    margin: 0 0 22px;
    padding: 0;
    scroll-margin-top: 130px;
}
.alem-step:last-child {
    margin-bottom: 0;
}
.alem-step-num {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--alem-orange);
    color: #fff;
    font-family: var(--alem-font-display);
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(247, 163, 19, .35);
}
.alem-step-card {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px 28px;
    padding: 24px 26px;
    border: 1px solid var(--alem-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .04);
    transition: box-shadow .25s ease, border-color .25s ease;
}
.alem-step:hover .alem-step-card {
    border-color: #F3D9A8;
    box-shadow: 0 12px 28px rgba(247, 163, 19, .12);
}
.alem-step.has-media .alem-step-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
}
.alem-step.has-media .alem-step-title {
    grid-column: 1 / -1;
}
.alem-howto .alem-step-title {
    margin: 0 0 6px;
    color: var(--alem-dark);
    font-family: var(--alem-font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}
.alem-step-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--alem-orange-dark);
    font-size: 13px;
    letter-spacing: 1.5px;
}
.alem-step-body p,
.alem-step-body li {
    margin: 0 0 8px;
    color: var(--alem-text);
    font-family: var(--alem-font-body);
    font-size: 16px;
    line-height: 1.6;
}
.alem-step-body p:last-child {
    margin-bottom: 0;
}
.alem-step-body ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 18px;
    margin: 10px 0 4px;
    padding: 0;
    list-style: none;
}
.alem-step-body ul li {
    position: relative;
    margin: 0;
    padding-left: 26px;
}
.alem-step-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--alem-orange-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D98D00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}
@media (max-width: 767.98px) {
    .alem-steps::before {
        left: 17px;
    }
    .alem-step {
        gap: 12px;
    }
    .alem-step-num {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        border-width: 3px;
        font-size: 16px;
    }
    .alem-step-card,
    .alem-step.has-media .alem-step-card {
        grid-template-columns: 1fr;
        padding: 18px 16px;
    }
    .alem-howto .alem-step-title {
        font-size: 20px;
    }
    .alem-step-body p,
    .alem-step-body li {
        font-size: 15px;
    }
    .alem-step-body ul {
        grid-template-columns: 1fr;
    }
}

/* 4. Botón de ejemplo y capturas ------------------------------------- */
.alem-step-button-demo {
    margin: 12px 0 !important;
}
.alem-step-button-demo span {
    display: inline-flex;
    align-items: center;
    padding: 10px 30px;
    border-radius: 52px;
    background: var(--alem-orange);
    color: #fff;
    font-family: var(--alem-font-body);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(247, 163, 19, .3);
}
.alem-step-media {
    align-self: start;
}
.alem-step-media img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--alem-border);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}
.alem-step-media img + img {
    margin-top: 10px;
}

/* 5. Recuadro "Importante" ------------------------------------------- */
.alem-callout {
    margin-top: 8px;
    padding: 24px 26px;
    border: 1px solid #F5E3C0;
    border-left: 5px solid var(--alem-orange);
    border-radius: 14px;
    background: var(--alem-cream);
}
.alem-callout h3 {
    margin: 0 0 10px;
    color: var(--alem-orange-dark);
    font-family: var(--alem-font-display);
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}
.alem-callout h3 strong,
.alem-callout h4 strong {
    font-weight: inherit;
}
.alem-callout h4 {
    margin: 18px 0 8px;
    padding-top: 16px;
    border-top: 1px solid #F0DDBA;
    color: var(--alem-dark);
    font-family: var(--alem-font-display);
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
}
.alem-callout p {
    margin: 0 0 8px;
    color: var(--alem-text);
    font-family: var(--alem-font-body);
    font-size: 16px;
    line-height: 1.6;
}
.alem-callout p:last-child {
    margin-bottom: 0;
}
@media (max-width: 767.98px) {
    .alem-callout {
        padding: 20px 18px;
    }
    .alem-callout p {
        font-size: 15px;
    }
}

/* 6. Llamado a la acción final (addon Raw HTML con class="alem-cta") -- */
.alem-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 28px;
    margin-top: 8px;
    padding: 30px 32px;
    border-radius: 16px;
    background: var(--alem-dark);
    color: #fff;
}
.alem-cta h3 {
    margin: 0 0 4px;
    color: #fff;
    font-family: var(--alem-font-display);
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
}
.alem-cta p {
    margin: 0;
    color: rgba(255, 255, 255, .8);
    font-family: var(--alem-font-body);
    font-size: 15px;
}
.alem-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.alem-cta-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 26px;
    border-radius: 52px;
    font-family: var(--alem-font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.alem-cta-actions a:hover {
    transform: translateY(-1px);
}
.alem-cta-primary {
    border: 2px solid var(--alem-orange);
    background: var(--alem-orange);
    color: #fff !important;
}
.alem-cta-primary:hover {
    border-color: var(--alem-orange-dark);
    background: var(--alem-orange-dark);
}
.alem-cta-secondary {
    border: 2px solid rgba(255, 255, 255, .5);
    color: #fff !important;
}
.alem-cta-secondary:hover {
    border-color: var(--sb-wa);
    background: var(--sb-wa);
}
@media (max-width: 575.98px) {
    .alem-cta {
        padding: 24px 20px;
    }
    .alem-cta-actions,
    .alem-cta-actions a {
        width: 100%;
    }
}

/* =====================================================================
 * BOTÓN "AGREGAR AL PEDIDO" DE PRODUCTOS CON VARIANTES (listados)
 * EasyStore le pone un "+" (abre la ventana de variantes). Se oculta y se
 * dibuja la misma bolsa que usan los otros botones. Solo visual: el botón
 * sigue abriendo la ventana igual que antes.
 * ===================================================================== */
.easystore-btn-add-to-cart.btn-outline-primary .easystore-btn-icon svg {
    display: none;
}
.easystore-btn-add-to-cart.btn-outline-primary .easystore-btn-icon > .easystore-svg::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 25'%3E%3Cpath stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8.112 9.207V6.042A3.886 3.886 0 0 1 12 2.157a3.887 3.887 0 0 1 3.889 3.885v3.165m3.029 13.636H5.082c-.747 0-1.352-.64-1.352-1.431L4.85 8.776c0-.79.606-1.431 1.353-1.431h11.594c.747 0 1.352.64 1.352 1.431l1.12 12.636c0 .79-.604 1.431-1.351 1.431Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 25'%3E%3Cpath stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8.112 9.207V6.042A3.886 3.886 0 0 1 12 2.157a3.887 3.887 0 0 1 3.889 3.885v3.165m3.029 13.636H5.082c-.747 0-1.352-.64-1.352-1.431L4.85 8.776c0-.79.606-1.431 1.353-1.431h11.594c.747 0 1.352.64 1.352 1.431l1.12 12.636c0 .79-.604 1.431-1.351 1.431Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* =====================================================================
 * PÁGINA DE PRODUCTO: espiral decorativo (Raw HTML de la plantilla de
 * producto de SP Page Builder). Cuelga 75px debajo de la foto: en celular,
 * con las columnas apiladas, tapa la categoría. Se oculta solo en celular.
 * ===================================================================== */
@media (max-width: 767.98px) {
    #sppb-addon-wrapper-cc1c158e-8a27-4950-a41a-c43d1361bd68 {
        display: none !important;
    }
}

/* =====================================================================
 * VENTANA "AGREGAR AL PEDIDO" DE PRODUCTOS CON VARIANTES (Quick Add)
 * Solo celular: EasyStore deja foto y datos en dos columnas dentro de una
 * ventana angosta. Acá se apilan (foto arriba, datos abajo) y la ventana
 * scrollea por dentro. No cambia cómo funciona el botón ni el carrito.
 * ===================================================================== */
/* Sin precio, igual que en el resto del sitio (todas las pantallas) */
#easystore-modal .easystore-quick-cart .easystore-product-price {
    display: none !important;
}
@media (max-width: 767.98px) {
    #easystore-modal .modal-container {
        width: calc(100% - 32px);
        max-width: 480px;
        border-radius: 16px;
        overflow: hidden;
    }
    #easystore-modal .easystore-quick-cart {
        padding: 0;
    }
    #easystore-modal .easystore-quick-cart .easystore-quick-cart-body {
        flex-direction: column;
        min-height: 0;
        max-height: calc(100vh - 48px);
        max-height: calc(100dvh - 48px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #easystore-modal .easystore-quick-cart .easystore-quick-cart-body > .col-lg-6 {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }
    /* Foto: alto fijo, se ve entera */
    #easystore-modal .easystore-quick-cart .easystore-product-image {
        height: 240px;
        min-height: 0;
        background-color: #fff;
    }
    #easystore-modal .easystore-quick-cart .easystore-product-image img {
        object-fit: contain;
    }
    /* Datos */
    #easystore-modal .easystore-quick-cart .easystore-quick-cart-content {
        gap: 12px;
        max-height: none;
        padding: 18px 18px 22px;
        overflow: visible;
    }
    #easystore-modal .easystore-quick-cart .easystore-product-title {
        margin-bottom: 0;
        font-size: 24px;
        line-height: 1.15;
    }
    #easystore-modal .easystore-quick-cart .easystore-variant-title {
        font-size: 15px;
        line-height: 1.35;
    }
    #easystore-modal .easystore-quick-cart .easystore-variant-options {
        gap: 8px;
    }
    /* La etiqueta envuelve a la opción: si no ocupa su alto, la opción se
       sale y se pisa con "Cantidad" */
    #easystore-modal .easystore-quick-cart .easystore-variant-option label {
        display: flex;
    }
    #easystore-modal .easystore-quick-cart .easystore-variant-option-value {
        padding: 8px 14px;
        font-size: 15px;
        line-height: 1.25;
        text-align: center;
    }
    #easystore-modal .easystore-quick-cart .easystore-quantity-container {
        margin-top: 14px;
    }
    #easystore-modal .easystore-quick-cart .easystore-quantity-container .easystore-block-label {
        margin-bottom: 6px;
    }
    /* Botones a todo el ancho, uno debajo del otro */
    #easystore-modal .easystore-quick-cart .easystore-quick-cart-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 8px;
    }
    #easystore-modal .easystore-quick-cart .easystore-addtocart-wrapper,
    #easystore-modal .easystore-quick-cart .easystore-addtocart-actions {
        display: flex;
        width: 100%;
    }
    #easystore-modal .easystore-quick-cart .easystore-quick-cart-actions .btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 16px;
    }
    /* Cruz de cerrar visible sobre la foto */
    #easystore-modal .btn-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, .92);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
        opacity: 1;
    }
}
