@layer components {
    /* =============================================================
     * Checkout Shopify-style (Hyvä onepage, layout 2columns)
     * El grid 2col real ya lo emite Hyva_Checkout vía
     * `lg:grid-cols-[minmax(0px,1fr)_26rem]` en 2columns.phtml.
     * Aquí solo damos personalidad visual: sidebar gris claro,
     * paddings cómodos, section-titles sutiles, lista de direcciones
     * colapsada por defecto.
     * ============================================================= */

    /* Page-main wrapper full-width sin paddings residuales */
    body.hyva_checkout-index-index #maincontent {
        max-width: 100% !important;
        padding: 0 !important;
    }
    body.hyva_checkout-index-index #maincontent > .container,
    body.hyva_checkout-index-index #maincontent .columns,
    body.hyva_checkout-index-index #maincontent .column.main {
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Wrapper checkout — ancho con max razonable (centrado) para que la
       proporción form/sidebar no quede desproporcionada en pantallas muy
       anchas. 1320px ≈ Bootstrap xl, da equilibrio Shopify-like. */
    body.hyva_checkout-index-index #hyva-checkout-main {
        padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 3rem !important;
        max-width: 1320px !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
    /* Container y wrappers Magento/Tailwind que pueden encajonar el
       checkout — los liberamos a 100%. */
    body.hyva_checkout-index-index .columns,
    body.hyva_checkout-index-index .column.main,
    body.hyva_checkout-index-index #maincontent .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* También el wrapper Magewire principal (si Hyvä le ponen container) */
    body.hyva_checkout-index-index #hyva-checkout-container {
        max-width: none !important;
        width: 100% !important;
    }

    /* Columna izquierda: ocupa el 1fr completo del grid, sin max-width
       restrictivo. El propio grid `1fr 26rem` ya equilibra. */
    body.hyva_checkout-index-index .area-main {
        max-width: 100%;
        padding-right: 0;
    }

    /* Activar el grid 2-col desde 900px (no esperar al `lg` 1024px de
       Tailwind) con proporciones equilibradas (form ~55-60%, sidebar
       ~40-45%) como el prototipo Shopify-like. */
    @media (min-width: 900px) {
        body.hyva_checkout-index-index #hyva-checkout-container > .grid {
            grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
            gap: 2.5rem !important;
        }
    }
    @media (min-width: 1280px) {
        body.hyva_checkout-index-index #hyva-checkout-container > .grid {
            grid-template-columns: minmax(0, 1.5fr) minmax(380px, 1fr) !important;
            gap: 3rem !important;
        }
    }

    /* Sidebar derecho — fondo gris suave + padding generoso */
    body.hyva_checkout-index-index .area-right,
    body.hyva_checkout-index-index .area-right #quote-summary {
        background: rgb(245 246 248);
        border-radius: 8px;
        padding: 1.75rem 1.5rem !important;
    }
    body.hyva_checkout-index-index .area-right .price-summary > .section-title {
        margin-bottom: 1rem !important;
    }

    /* Section titles más sutiles (H2 sin border grueso, peso medium chico) */
    body.hyva_checkout-index-index fieldset > legend.section-title,
    body.hyva_checkout-index-index .area-right .section-title {
        border-bottom: 1px solid rgb(226 232 240) !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 1.25rem !important;
    }
    body.hyva_checkout-index-index fieldset > legend.section-title h2,
    body.hyva_checkout-index-index .area-right .section-title h2 {
        font-size: 1.05rem !important;
        font-weight: 500 !important;
        letter-spacing: -0.01em;
        color: rgb(4 29 64) !important;
    }

    /* Lista de direcciones guardadas: el plegado (solo la activa visible)
       está en 35-checkout-design.css. Aquí había una altura fija de
       9.5rem sin overflow que hacía que las direcciones se montaran
       sobre "Nueva dirección" y "Métodos de envío". */
    /* Botón "Show all" texto en castellano */
    body.hyva_checkout-index-index #address-grid + button {
        background: transparent !important;
        border: 1px solid rgb(226 232 240) !important;
        color: rgb(4 29 64) !important;
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    body.hyva_checkout-index-index #address-grid + button:hover {
        background: rgb(241 243 247) !important;
    }

    /* Address items: padding más compacto */
    body.hyva_checkout-index-index .address-item label {
        padding: 0.75rem 1rem !important;
    }

    /* Botón principal "Realizar pedido" ancho y oscuro */
    body.hyva_checkout-index-index .checkout-nav-main {
        margin-top: 1.5rem;
    }
    body.hyva_checkout-index-index .checkout-nav-main .btn-place-order,
    body.hyva_checkout-index-index .checkout-nav-main button.elg-co-place {
        width: 100%;
        background: rgb(4 29 64) !important;
        color: var(--color-on-primary) !important;
        padding: 1rem 1.5rem !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        border-radius: 6px;
    }
    body.hyva_checkout-index-index .checkout-nav-main .btn-place-order:hover {
        background: rgb(4 29 64 / 0.88) !important;
    }

    /* Stripe Express Checkout (Apple/PayPal/GPay) — banda destacada
       arriba del form. El wrapper #elg-express-wrapper lo crea el JS
       move-stripe-express.phtml en runtime. */
    body.hyva_checkout-index-index #elg-express-wrapper {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgb(226 232 240);
    }
    body.hyva_checkout-index-index #elg-express-wrapper::before {
        content: "Pago exprés";
        display: block;
        font-size: 0.75rem;
        font-weight: 500;
        color: rgb(71 85 105);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.5rem;
    }
    body.hyva_checkout-index-index #elg-express-wrapper:empty,
    body.hyva_checkout-index-index #elg-express-wrapper:has(#stripe-express-button:empty) {
        display: none !important;
    }
    body.hyva_checkout-index-index #stripe-express-button {
        min-height: 44px;
    }

    /* Totales sidebar: tipografía limpia */
    body.hyva_checkout-index-index .price-summary .total-segments .item,
    body.hyva_checkout-index-index .price-summary .total-segments > .divide-y > div {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    body.hyva_checkout-index-index .price-summary .grand_total {
        font-size: 1.05rem;
        padding-top: 1rem !important;
    }

    /* Cards de métodos envío/pago activos: ring suave en vez de fill */
    body.hyva_checkout-index-index [id^="shipping-method-option-"].active,
    body.hyva_checkout-index-index [id^="payment-method-option-"].active {
        background: var(--color-bg) !important;
        border-color: rgb(4 29 64) !important;
        box-shadow: 0 0 0 1px rgb(4 29 64);
    }

    /* Breadcrumb superior (Hyvä lo deja vacío en onepage pero ocupa
       margen). Lo escondemos. */
    body.hyva_checkout-index-index #breadcrumbs {
        display: none !important;
    }

    /* Cart items SIEMPRE visibles en sidebar (no colapsable). Ocultamos
       el botón con flecha que los pliega. */
    body.hyva_checkout-index-index #checkout-cart-details {
        display: block !important;
    }
    body.hyva_checkout-index-index [aria-controls="checkout-cart-details"] {
        pointer-events: none;
        cursor: default;
    }
    body.hyva_checkout-index-index [aria-controls="checkout-cart-details"] > .ml-auto {
        display: none !important;
    }

    /* === FORM IZQ: FLAT (sin border-card) como el prototipo === */
    /* Quitar la caja con border que envuelve todo el form izquierdo */
    body.hyva_checkout-index-index .area-main {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
    /* Cada fieldset (sección) sin border ni padding extras */
    body.hyva_checkout-index-index fieldset {
        border: none !important;
        padding: 0 !important;
        margin-bottom: 2rem !important;
    }
    /* Section titles: pequeño espacio inferior, sin border grueso */
    body.hyva_checkout-index-index fieldset > legend.section-title {
        border-bottom: 1px solid rgb(226 232 240) !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 1rem !important;
        width: 100%;
    }
    body.hyva_checkout-index-index fieldset > legend.section-title h2 {
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        color: rgb(4 29 64) !important;
        text-transform: none !important;
    }

    /* Cards de dirección: padding más compacto y borde fino sutil */
    body.hyva_checkout-index-index .address-item {
        border-width: 1px !important;
        border-color: rgb(226 232 240) !important;
        border-radius: 6px !important;
        margin-bottom: 0.5rem !important;
    }
    body.hyva_checkout-index-index .address-item.active {
        border-color: rgb(4 29 64) !important;
        background: transparent !important;
    }
    body.hyva_checkout-index-index .address-item label {
        padding: 0.875rem 1rem !important;
    }
    body.hyva_checkout-index-index .address-grid {
        height: 7.5rem !important;
    }

    /* Cards de envío/pago: padding limpio, border sutil */
    body.hyva_checkout-index-index [id^="shipping-method-option-"],
    body.hyva_checkout-index-index [id^="payment-method-option-"] {
        border-width: 1px !important;
        border-color: rgb(226 232 240) !important;
        border-radius: 6px !important;
    }
    body.hyva_checkout-index-index [id^="shipping-method-option-"].active,
    body.hyva_checkout-index-index [id^="payment-method-option-"].active {
        border-color: rgb(4 29 64) !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    body.hyva_checkout-index-index [id^="payment-method-option-"] label,
    body.hyva_checkout-index-index [id^="shipping-method-option-"] label {
        padding: 1rem !important;
    }

    /* === SIDEBAR: limpio, sin tantas líneas === */
    /* Quitar divisores entre items del totals (ahora son divide-y) */
    body.hyva_checkout-index-index .total-segments {
        border-top: 1px solid rgb(226 232 240) !important;
        padding-top: 0.75rem !important;
        margin-top: 1rem !important;
    }
    body.hyva_checkout-index-index .total-segments.divide-y > div,
    body.hyva_checkout-index-index .total-segments > .divide-y > div {
        border-top: none !important;
    }
    body.hyva_checkout-index-index .total-segments .item,
    body.hyva_checkout-index-index .total-segments > .divide-y > div {
        padding-top: 0.3rem !important;
        padding-bottom: 0.3rem !important;
        font-size: 0.9rem;
        color: rgb(71 85 105);
    }
    body.hyva_checkout-index-index .total-segments .grand_total {
        margin-top: 0.5rem !important;
        padding-top: 0.75rem !important;
        border-top: 1px solid rgb(226 232 240) !important;
        font-size: 1.05rem !important;
        color: rgb(4 29 64) !important;
    }
    /* Desde Hyvä Checkout 1.3.15 el título del total ya no lleva la clase "label" */
    body.hyva_checkout-index-index .total-segments .grand_total .label,
    body.hyva_checkout-index-index .total-segments .grand_total > div > span:first-child,
    body.hyva_checkout-index-index .total-segments .grand_total .value {
        font-weight: 600 !important;
    }

    /* Cart item en sidebar: separador suave entre items, sin border grueso */
    body.hyva_checkout-index-index #checkout-cart-details .border-b {
        border-bottom: 1px solid rgb(226 232 240) !important;
        padding: 0.75rem 0 !important;
    }
    /* Imagen del producto del cart en sidebar — object-fit cover para
       eliminar bandas blancas + tamaño consistente. */
    body.hyva_checkout-index-index #checkout-cart-details img {
        width: 72px !important;
        height: 90px !important;
        object-fit: cover !important;
        object-position: center !important;
        background: var(--color-bg);
        border-radius: 6px !important;
        image-rendering: auto;
    }

    /* Cabecera "Cart (1 Item)" más sutil sin chevron */
    body.hyva_checkout-index-index [aria-controls="checkout-cart-details"] {
        font-size: 0.9rem !important;
        color: rgb(71 85 105) !important;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding-bottom: 0.5rem;
    }
    body.hyva_checkout-index-index [aria-controls="checkout-cart-details"] svg.text-blue-900 {
        display: none !important;
    }

    /* Apartado "Aplica tu código" + "Canjea puntos": títulos consistentes */
    body.hyva_checkout-index-index #unified-discount-code > button,
    body.hyva_checkout-index-index [aria-controls="checkout-reward-points-details"] {
        font-size: 0.9rem !important;
        color: rgb(4 29 64) !important;
        padding: 0.5rem 0 !important;
    }

    /* Quitar fondo y border-radius del area-right interior — solo el contenedor
       padre lleva el bg gris */
    body.hyva_checkout-index-index .area-right > * {
        background: transparent !important;
    }

    /* Order comment textarea sin border grueso */
    body.hyva_checkout-index-index textarea#order-comment {
        border: 1px solid rgb(226 232 240) !important;
        border-radius: 6px !important;
        padding: 0.625rem 0.75rem !important;
    }

    /* En todo el checkout, NO bloquear scroll del body aunque algún modal
       Hyvä haga `document.body.classList.add('overflow-hidden')`. Como
       desmodalizamos los dialogs para que sean panels inline, no hay razón
       para bloquear el scroll. */
    body.hyva_checkout-index-index.overflow-hidden,
    body.hyva_checkout-index-index {
        overflow: auto !important;
    }

    /* MODAL "Nueva dirección": ver 35-checkout-design.css */

    /* === PÁGINA /checkout/cart/ — template propio cart-main.phtml === */
    /* Evitar scroll horizontal por algún elemento ancho */
    body.checkout-cart-index {
        overflow-x: hidden;
    }
    body.checkout-cart-index #maincontent {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    body.checkout-cart-index #maincontent .container,
    body.checkout-cart-index #maincontent .columns,
    body.checkout-cart-index #maincontent .column.main {
        max-width: 100% !important;
        padding: 0 !important;
    }
    body.checkout-cart-index .page-title-wrapper,
    body.checkout-cart-index .page-messages {
        display: none !important;
    }
    body.checkout-cart-index .nav-toggle,
    body.checkout-cart-index .nav-sections {
        display: none !important;
    }

    /* Wrapper full-width centrado */
    .elg-cart {
        max-width: 1320px;
        margin: 0 auto;
        padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem;
        position: relative;
    }

    /* Grid 2-col: items izq, sidebar der */
    .elg-cart-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    @media (min-width: 900px) {
        .elg-cart-grid {
            grid-template-columns: 1.5fr 1fr;
            gap: 3rem;
        }
    }

    /* === Columna izq: items === */
    .elg-cart-title {
        font-size: 1.5rem;
        font-weight: 500;
        color: rgb(4 29 64);
        letter-spacing: -0.02em;
        margin: 0 0 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgb(226 232 240);
    }
    .elg-cart-count {
        font-size: 0.875rem;
        font-weight: 400;
        color: rgb(71 85 105);
        margin-left: 0.5rem;
    }

    .elg-cart-row {
        display: grid;
        grid-template-columns: 120px 1fr auto;
        gap: 1.25rem;
        padding: 1.25rem 0;
        border-bottom: 1px solid rgb(226 232 240);
    }
    @media (max-width: 640px) {
        .elg-cart-row {
            grid-template-columns: 90px 1fr;
        }
        .elg-cart-row-price {
            grid-column: 1 / -1;
            text-align: right;
        }
    }

    .elg-cart-row-photo {
        display: block;
        flex-shrink: 0;
    }
    .elg-cart-row-photo img {
        width: 120px;
        height: 150px;
        object-fit: cover;
        background: var(--color-bg);
        border-radius: 6px;
        border: 1px solid rgb(226 232 240);
    }
    @media (max-width: 640px) {
        .elg-cart-row-photo img {
            width: 90px;
            height: 115px;
        }
    }

    .elg-cart-row-info {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        min-width: 0;
    }
    .elg-cart-row-name {
        font-size: 1rem;
        font-weight: 600;
        color: rgb(4 29 64);
        text-decoration: none;
        line-height: 1.3;
    }
    .elg-cart-row-name:hover {
        opacity: 0.7;
    }
    .elg-cart-row-attr {
        font-size: 0.875rem;
        color: rgb(71 85 105);
    }
    .elg-cart-row-attr strong {
        color: rgb(4 29 64);
        font-weight: 500;
    }

    .elg-cart-row-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-top: auto;
        padding-top: 0.5rem;
    }

    /* Stepper +/- */
    .elg-cart-stepper {
        display: inline-flex;
        align-items: center;
        border: 1px solid rgb(226 232 240);
        border-radius: 6px;
        overflow: hidden;
        background: var(--color-bg);
    }
    .elg-cart-stepper-btn {
        background: var(--color-bg);
        border: none;
        width: 32px;
        height: 36px;
        cursor: pointer;
        color: rgb(4 29 64);
        font-size: 1.125rem;
        line-height: 1;
        transition: background 0.15s;
    }
    .elg-cart-stepper-btn:hover {
        background: rgb(241 243 247);
    }
    .elg-cart-stepper-qty {
        width: 44px;
        height: 36px;
        text-align: center;
        border: none;
        background: var(--color-bg);
        border-left: 1px solid rgb(226 232 240);
        border-right: 1px solid rgb(226 232 240);
        font-size: 0.9rem;
        color: rgb(4 29 64);
        outline: none;
    }
    .elg-cart-stepper-qty::-webkit-inner-spin-button,
    .elg-cart-stepper-qty::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .elg-cart-remove {
        background: transparent;
        border: none;
        color: rgb(100 116 139);
        cursor: pointer;
        padding: 0.4rem;
        border-radius: 6px;
        transition: color 0.15s, background 0.15s;
    }
    .elg-cart-remove:hover {
        color: rgb(220 38 38);
        background: rgb(254 226 226);
    }

    .elg-cart-row-price {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.25rem;
        font-size: 1rem;
        color: rgb(4 29 64);
        font-weight: 600;
    }
    .elg-cart-row-unit {
        font-size: 0.8125rem;
        color: rgb(100 116 139);
        font-weight: 400;
    }
    /* Precio rebajado: markup PDP estándar (.special-price + .old-price).
       Precio rebajado y etiqueta -XX% en rojo, como en las cards y la ficha; .old-price .price ya
       tiene opacity .5 + line-through del theme global. */
    .elg-cart-row-price .price-box {
        display: inline-flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.15rem;
    }
    .elg-cart-row-price .special-price .price {
        color: #dc2626;
        font-weight: 700;
        font-size: 1rem;
    }
    .elg-cart-row-price .old-price .price {
        font-weight: 400;
        font-size: 0.875rem;
        color: rgb(4 29 64);
        opacity: 0.5;
        text-decoration: line-through !important;
    }
    /* Etiqueta -XX% en rojo */
    .elg-cart-row-price .tag_discount {
        display: inline-block;
        background: #dc2626;
        color: #fff;
        font-size: 0.7rem;
        font-weight: 700;
        padding: 0.15rem 0.4rem;
        border-radius: 4px;
        line-height: 1;
        margin-top: 0.25rem;
    }
    .elg-cart-row-unit s {
        opacity: 0.5;
        font-size: 0.75rem;
    }

    /* Cesta rebajada (Yeboyebo_CarritoPromociones) */
    .elg-cart-promo-toggle {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.6rem 1rem;
        background: rgb(4 29 64);
        color: var(--color-on-primary);
        font-family: inherit;
        font-size: 0.95rem;
        border: 0;
        border-radius: 6px;
        cursor: pointer;
    }
    .elg-cart-promo-toggle:hover { background: rgb(4 29 64 / 0.88); }
    .elg-cart-promo-bar {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin: 0;
        padding: 0.3rem 0.3rem 0.3rem 0.75rem;
        background: rgb(4 29 64);
        color: var(--color-on-primary);
        font-size: 0.875rem;
        border-radius: 6px;
    }
    .elg-cart-promo-pct {
        flex-shrink: 0;
        padding: 0.1rem 0.5rem;
        background: #e30613;
        font-weight: 700;
        font-size: 0.8rem;
    }
    .elg-cart-promo-old {
        font-weight: 400;
        opacity: 0.5;
        margin-right: 0.3rem;
    }

    /* === CHECKOUT SIDEBAR — precio rebajado mismo estilo === */
    body.hyva_checkout-index-index .elg-co-price .special-price .price {
        color: #dc2626;
        font-weight: 700;
    }
    body.hyva_checkout-index-index .elg-co-price .old-price .price {
        color: rgb(4 29 64);
        opacity: 0.5;
        text-decoration: line-through !important;
        font-size: 0.8125rem;
        font-weight: 400;
    }
    body.hyva_checkout-index-index .elg-co-price .tag_discount {
        display: inline-block;
        background: #dc2626;
        color: #fff;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 0.1rem 0.35rem;
        border-radius: 4px;
        line-height: 1;
        margin-top: 0.25rem;
    }

    /* === CART DRAWER — precio rebajado (Hyvä emite product_price HTML) === */
    .elg-cdrawer .special-price .price,
    .elg-cdrawer-item-price .special-price .price {
        color: #dc2626;
        font-weight: 700;
    }
    .elg-cdrawer .old-price .price,
    .elg-cdrawer-item-price .old-price .price {
        color: rgb(4 29 64);
        opacity: 0.5;
        text-decoration: line-through !important;
        font-size: 0.85rem;
        font-weight: 400;
        margin-right: 0.3rem;
    }
    .elg-cdrawer .tag_discount,
    .elg-cdrawer-item-price .tag_discount {
        display: inline-block;
        background: #dc2626;
        color: #fff;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 0.1rem 0.35rem;
        border-radius: 4px;
        line-height: 1;
        margin-left: 0.3rem;
    }
    .elg-cart-row-attrs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem 1rem;
        margin: 0.25rem 0 0.5rem;
    }
    .elg-cart-row-attrs .elg-cart-row-attr {
        margin: 0;
    }
    .elg-cart-row-preorder {
        margin: 0 0 0.5rem;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #dc2626;
    }
    .elg-cart-row-msg {
        margin: 0 0 0.5rem;
        font-size: 0.75rem;
        color: #dc2626;
    }

    /* === Columna der: sidebar === */
    .elg-cart-sidebar {
        background: rgb(245 246 248);
        border-radius: 8px;
        padding: 1.5rem;
        align-self: start;
        position: sticky;
        top: 1rem;
    }
    .elg-cart-sidebar-title {
        font-size: 0.95rem;
        font-weight: 500;
        color: rgb(4 29 64);
        margin: 0 0 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgb(226 232 240);
    }
    .elg-cart-totals {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }
    .elg-cart-totals-row {
        display: flex;
        justify-content: space-between;
        font-size: 0.9rem;
        color: rgb(71 85 105);
    }
    .elg-cart-totals-row .text-slate-500 {
        color: rgb(100 116 139);
        font-size: 0.8125rem;
    }
    .elg-cart-totals-grand {
        display: flex;
        justify-content: space-between;
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        border-top: 1px solid rgb(226 232 240);
        font-size: 1.05rem;
        font-weight: 600;
        color: rgb(4 29 64);
    }

    /* Botones cart */
    .elg-cart-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0.875rem 1.5rem;
        border-radius: 6px;
        font-size: 0.95rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        text-decoration: none;
        transition: opacity 0.2s, background 0.2s;
        border: none;
        cursor: pointer;
    }
    .elg-cart-btn-primary {
        background: rgb(4 29 64);
        color: var(--color-on-primary);
    }
    .elg-cart-btn-primary:hover {
        background: rgb(4 29 64 / 0.88);
        color: var(--color-on-primary);
    }
    .elg-cart-btn-link {
        display: block;
        margin-top: 0.75rem;
        text-align: center;
        color: rgb(4 29 64);
        text-decoration: underline;
        font-size: 0.875rem;
    }
    .elg-cart-btn-link:hover {
        opacity: 0.7;
    }

    /* === Cart vacío === */
    .elg-cart-empty {
        max-width: 480px;
        margin: 4rem auto;
        text-align: center;
        padding: 2rem 1rem;
    }
    .elg-cart-empty-icon {
        width: 64px;
        height: 64px;
        color: rgb(148 163 184);
        margin: 0 auto 1.5rem;
    }
    .elg-cart-empty-title {
        font-size: 1.5rem;
        font-weight: 500;
        color: rgb(4 29 64);
        margin: 0 0 0.75rem;
    }
    .elg-cart-empty-text {
        color: rgb(71 85 105);
        margin: 0 0 2rem;
    }

    /* === Loading overlay === */
    .elg-cart-loading {
        position: fixed;
        inset: 0;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(2px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 50;
    }

    /* Cross-sells "Te puede interesar" */
    body.checkout-cart-index .product-items.products-grid {
        max-width: 1320px;
        margin: 3rem auto;
        padding: 0 clamp(1rem, 3vw, 2.5rem);
    }

    /* === PÁGINA DE PEDIDO CONFIRMADO (success) === */
    body.checkout-onepage-success #maincontent,
    body.checkout-onepage-success .columns,
    body.checkout-onepage-success .column.main {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }
    body.checkout-onepage-success .page-title-wrapper,
    body.checkout-onepage-success .page-messages {
        display: none !important;
    }
    .elg-success {
        --elg-success-navy: rgb(4 29 64);
        --elg-success-muted: rgb(4 29 64 / 0.55);
        --elg-success-line: rgb(4 29 64 / 0.25);
        max-width: 1120px;
        margin: 0 auto;
        padding: 2.5rem 1.25rem 4rem;
        color: var(--elg-success-navy);
    }

    /* Cabecera centrada */
    .elg-success-head {
        text-align: center;
        margin-bottom: 2.75rem;
    }
    .elg-success-icon {
        width: 40px;
        height: 40px;
        margin: 0 auto 1.5rem;
        color: var(--elg-success-navy);
    }
    .elg-success-icon svg {
        width: 100%;
        height: 100%;
    }
    .elg-success-title {
        font-size: 1rem;
        font-weight: 500;
        text-transform: uppercase;
        margin: 0 0 1.5rem;
    }
    .elg-success-message {
        font-size: 0.875rem;
        line-height: 1.45;
        margin: 0 0 1.25rem;
    }
    .elg-success-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 360px;
        min-height: 47px;
        padding: 0.75rem 1.5rem;
        background: var(--elg-success-navy);
        color: var(--color-on-primary, #fff);
        font-size: 0.875rem;
        font-weight: 500;
        text-transform: uppercase;
        text-decoration: none;
        transition: background 0.2s;
    }
    .elg-success-btn:hover {
        background: rgb(4 29 64 / 0.88);
        color: var(--color-on-primary, #fff);
    }

    /* Caja con las tres columnas */
    .elg-success-box {
        display: grid;
        grid-template-columns: 1fr;
        border: 1px solid var(--elg-success-line);
        padding: 0 1.25rem;
    }
    .elg-success-col {
        padding: 1.75rem 0;
    }
    .elg-success-col + .elg-success-col {
        border-top: 1px solid var(--elg-success-line);
    }
    .elg-success-block + .elg-success-block {
        margin-top: 1.25rem;
    }
    .elg-success-block--sep + .elg-success-block--sep {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--elg-success-line);
    }
    .elg-success-label {
        font-size: 0.875rem;
        font-weight: 500;
        text-transform: uppercase;
        margin: 0 0 1rem;
    }
    .elg-success-value {
        font-size: 0.875rem;
        line-height: 1.3;
        font-weight: 300;
        color: var(--elg-success-muted);
        margin: 0;
    }
    .elg-success-email {
        word-break: break-all;
    }
    .elg-success-payment {
        display: flex;
        align-items: center;
        gap: 1.25rem;
    }
    .elg-success-payment-icon {
        width: 32px;
        height: auto;
        flex-shrink: 0;
    }

    /* Resumen: artículos */
    .elg-success-items {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .elg-success-item {
        display: flex;
        gap: 1rem;
    }
    .elg-success-item + .elg-success-item {
        margin-top: 0.5rem;
    }
    .elg-success-item-img {
        width: 72px;
        flex-shrink: 0;
        aspect-ratio: 3 / 4;
        background: rgb(4 29 64 / 0.06);
        overflow: hidden;
    }
    .elg-success-item-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .elg-success-item-info {
        min-width: 0;
        font-size: 0.6875rem;
        line-height: 1.4;
        text-transform: uppercase;
    }
    .elg-success-item-name {
        margin: 0 0 1rem;
    }
    .elg-success-item-meta {
        margin: 0;
        font-weight: 300;
        color: var(--elg-success-muted);
    }
    .elg-success-item-sep {
        margin: 0 0.5rem;
    }

    /* Resumen: totales */
    .elg-success-totals {
        margin: 2.25rem 0 0;
    }
    .elg-success-total {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        font-size: 0.6875rem;
        font-weight: 300;
        text-transform: uppercase;
        color: var(--elg-success-muted);
    }
    .elg-success-total + .elg-success-total {
        margin-top: 1rem;
    }
    .elg-success-total dt,
    .elg-success-total dd {
        margin: 0;
    }
    .elg-success-total.is-grand {
        font-weight: 500;
        color: var(--elg-success-navy);
    }

    @media (min-width: 768px) {
        .elg-success {
            padding-top: 3rem;
        }
        .elg-success-box {
            grid-template-columns: 1fr 1.2fr 1fr;
            padding: 2.5rem 2.5rem 2.5rem;
        }
        .elg-success-col {
            padding: 0 2.5rem;
        }
        .elg-success-col:first-child {
            padding-left: 0;
        }
        .elg-success-col:last-child {
            padding-right: 0;
        }
        .elg-success-col + .elg-success-col {
            border-top: 0;
            border-left: 1px solid var(--elg-success-line);
        }
        .elg-success-col:nth-child(2) .elg-success-block--sep {
            margin-right: 1.5rem;
        }
    }

    /* === LOADER OVERLAY CENTRADO + SPINNER DELICADO === */
    /* Esconder notificaciones tipo toast arriba-derecha (los checkmarks
       gigantes que molestan al user) */
    body.hyva_checkout-index-index #magewire-loader-notifications,
    body.hyva_checkout-index-index .magewire\.messenger {
        display: none !important;
    }

    /* Overlay: velo blanco translúcido a pantalla completa para que se
       siga viendo el checkout (el bg-opacity-90 de Magewire no existe en
       Tailwind v4 y quedaba opaco). Spinner centrado, sin tarjeta. */
    body.hyva_checkout-index-index .magewire-loader-overlay {
        background: rgb(255 255 255 / 0.6) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        z-index: 60;
    }
    body.hyva_checkout-index-index .magewire-loader-overlay > div,
    body.hyva_checkout-index-index .magewire-loader-overlay > div > div {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    body.hyva_checkout-index-index .magewire-loader-overlay svg {
        width: 32px !important;
        height: 32px !important;
        color: rgb(4 29 64) !important;
    }
}
