/* =========================================================
   ENMARKALIA REWARDS — HEADER PANORÁMICO
   Versión consolidada
   ========================================================= */

.er-header-rewards {
    width: 100%;
    background: #f7f9fa;
    border-top: 1px solid #edf1f4;
    border-bottom: 1px solid #e3e9ed;
    box-sizing: border-box;
}

.er-header-rewards__inner {
    width: min(1240px, calc(100% - 40px));
    min-height: 132px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 250px;
    align-items: center;
    gap: 24px;
    box-sizing: border-box;
}


/* =========================================================
   INTRO RECOMPENSAS
   ========================================================= */

.er-header-rewards__intro {
    position: relative;
    width: 190px;
    min-width: 190px;
    max-width: 190px;
    min-height: 58px;
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
}

.er-header-rewards__intro::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background: #12aaa4;
    border-radius: 999px;
}

.er-header-rewards__brand,
.er-header-rewards__message {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.er-header-rewards__brand {
    color: #12243a;
    font-family: "Manrope", sans-serif;
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: .11em;
    white-space: nowrap;
}

.er-header-rewards__message {
    max-width: 176px;
    color: #526170;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.er-header-rewards__message--desktop {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.er-header-rewards__message--desktop strong {
    color: #172231;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
}

.er-header-rewards__message--desktop small {
    color: #697783;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
}

.er-header-rewards__message--mobile {
    display: none;
}


/* =========================================================
   MAPA GLOBAL
   ========================================================= */

.er-header-rewards__map {
    position: relative;
    min-width: 0;
    height: 78px;
    padding: 0 36px 0 0;
    box-sizing: border-box;
}

.er-header-rewards__track {
    position: absolute;
    z-index: 1;
    top: 24px;
    left: 0;
    right: 36px;
    height: 6px;
    overflow: hidden;
    background: #dfe6eb;
    border-radius: 999px;
}

.er-header-rewards__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #12aaa4;
    border-radius: inherit;
    transition: width .3s ease;
}

.er-header-rewards__milestones {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    right: 36px;
    height: 100%;
}

.er-header-rewards__milestone {
    position: absolute;
    top: 8px;
    width: 118px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.er-header-rewards__dot {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #d4dde3;
    border-radius: 50%;
    color: #80909e;
    box-shadow: 0 2px 7px rgba(18, 36, 58, .08);
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 800;
}

.er-header-rewards__milestone.is-reached .er-header-rewards__dot {
    background: #12aaa4;
    border-color: #12aaa4;
    color: #fff;
}

.er-header-rewards__dot svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
}

.er-header-rewards__dot .er-icon-percent {
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.er-header-rewards__amount {
    margin-top: 7px;
    font-family: "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.er-header-rewards__label {
    margin-top: 5px;
    max-width: 116px;
    overflow: hidden;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.er-header-rewards__milestone.is-reached .er-header-rewards__amount {
    color: #26323d;
}

.er-header-rewards__milestone.is-reached .er-header-rewards__label {
    color: #35424d;
}

.er-header-rewards__milestone:not(.is-reached) .er-header-rewards__amount {
    color: #7f8b95;
}

.er-header-rewards__milestone:not(.is-reached) .er-header-rewards__label {
    color: #9aa4ac;
}

.er-header-rewards__milestone:first-child .er-header-rewards__amount {
    font-size: 14px;
    font-weight: 850;
}

.er-header-rewards__milestone:first-child .er-header-rewards__label {
    font-size: 11px;
    font-weight: 800;
    color: #66737e;
}


/* =========================================================
   CARRITO + MINI PROGRESO
   ========================================================= */

.er-header-rewards__cart-area {
    min-width: 250px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 24px;
    border-left: 1px solid #d9e1e6;
    box-sizing: border-box;
}

.er-header-rewards__cart-slot {
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

.er-header-rewards__cart-slot .ct-header-cart,
.er-header-rewards__cart-slot [data-id="cart"] {
    margin: 0 !important;
}

.er-header-rewards__cart-slot .ct-header-cart > a,
.er-header-rewards__cart-slot [data-id="cart"] > a {
    min-height: 42px;
    padding: 5px 8px !important;
    border-radius: 10px;
    gap: 11px !important;
}

.er-header-rewards__cart-slot .ct-header-cart .ct-label {
    font-family: "Manrope", sans-serif !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: -.8px !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #172231 !important;
}

.er-header-rewards__cart-slot svg {
    width: 25px !important;
    height: 25px !important;
}

.er-header-rewards__cart-slot .ct-dynamic-count {
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
    line-height: 18px !important;
    font-weight: 800 !important;
}

.er-header-rewards__cart-slot .ct-header-cart > a:hover,
.er-header-rewards__cart-slot [data-id="cart"] > a:hover {
    background: #eef4f5;
}

.er-header-rewards__cart-slot .ct-header-cart > a:hover .ct-label,
.er-header-rewards__cart-slot [data-id="cart"] > a:hover .ct-label {
    color: #0f9f99 !important;
}

.er-header-rewards__cart-progress {
    width: 100%;
    margin-top: 3px;
    padding-right: 4px;
    box-sizing: border-box;
}

.er-header-rewards__cart-progress-text {
    display: block;
    margin-bottom: 7px;
    color: #526170;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
}

.er-header-rewards__cart-progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    overflow: hidden;
    background: #dfe6eb;
    border-radius: 999px;
}

.er-header-rewards__cart-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #12aaa4;
    border-radius: inherit;
    transition: width .3s ease;
}


.er-header-rewards__cart-meta {
    width: 100%;
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #526170;
}

.er-header-rewards__cart-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #526170;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.er-header-rewards__meta-icon {
    display: block;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px;
    color: #172231;
    flex: 0 0 17px;
}

/* Al mostrar la cantidad escrita, quitamos el badge duplicado del icono en escritorio/tablet. */
@media (min-width: 768px) {
    .er-header-rewards__cart-slot .ct-dynamic-count {
        display: none !important;
    }
}


/* Evita el parpadeo inicial del badge nativo de Blocksy.
   En carrito/checkout se conserva el comportamiento normal. */
body:not(.woocommerce-cart):not(.woocommerce-checkout) .ct-header-cart .ct-dynamic-count {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}


/* =========================================================
   CARRITO NORMAL EN CARRITO / CHECKOUT
   ========================================================= */

body.woocommerce-cart .ct-header-cart .ct-label,
body.woocommerce-checkout .ct-header-cart .ct-label {
    font-family: "Manrope", sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: -.5px !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #172231 !important;
}

body.woocommerce-cart .ct-header-cart svg,
body.woocommerce-checkout .ct-header-cart svg {
    width: 24px !important;
    height: 24px !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .er-header-rewards {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .er-header-rewards__inner {
        width: calc(100% - 24px);
        grid-template-columns: 180px minmax(560px, 1fr) 220px;
        gap: 20px;
    }

    .er-header-rewards__intro {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }

    .er-header-rewards__cart-area {
        min-width: 220px;
        padding-left: 18px;
    }

    .er-header-rewards__cart-slot .ct-header-cart .ct-label {
        font-size: 26px !important;
    }

    .er-header-rewards__cart-progress-text {
        font-size: 10px;
    }

    .er-header-rewards__cart-meta {
        gap: 10px;
    }

    .er-header-rewards__cart-meta-item {
        font-size: 9.5px;
        gap: 5px;
    }

    .er-header-rewards__meta-icon {
        width: 15px !important;
        height: 15px !important;
        min-width: 15px;
        flex-basis: 15px;
    }
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 767px) {

    .er-header-rewards {
        overflow: visible;
    }

    .er-header-rewards__inner {
        width: 100%;
        min-height: 0;
        padding: 9px 12px 12px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "intro cart"
            "map map";
        gap: 9px 10px;
    }

    .er-header-rewards__intro {
        grid-area: intro;
        width: auto;
        min-width: 0;
        max-width: none;
        min-height: 44px;
        padding-left: 10px;
        gap: 4px;
    }

    .er-header-rewards__intro::before {
        width: 3px;
    }

    .er-header-rewards__brand {
        font-size: 11px;
        letter-spacing: .10em;
    }

    .er-header-rewards__message {
        max-width: 220px;
        overflow: hidden;
        font-size: 10.5px;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .er-header-rewards__message--desktop {
        display: none;
    }

    .er-header-rewards__message--mobile {
        display: block;
    }

    .er-header-rewards__cart-area {
        grid-area: cart;
        min-width: 0;
        height: auto;
        padding-left: 10px;
        border-left: 1px solid #d9e1e6;
    }

    .er-header-rewards__cart-slot {
        min-width: 0;
        min-height: 44px;
        padding: 0;
    }

    .er-header-rewards__cart-slot .ct-header-cart .ct-label {
        font-size: 18px !important;
        letter-spacing: -.4px !important;
    }

    .er-header-rewards__cart-slot svg {
        width: 21px !important;
        height: 21px !important;
    }

.er-header-rewards__cart-progress {
    display: block;
    margin-top: 0;
    padding: 0;
}

.er-header-rewards__cart-progress-text,
.er-header-rewards__cart-progress-track {
    display: none;
}

.er-header-rewards__cart-meta {
    display: flex;
    justify-content: flex-start;
    margin-top: 2px;
    padding-left: 8px;
    gap: 0;
}

.er-header-rewards__cart-meta-item {
    font-size: 11px;
    font-weight: 700;
    gap: 5px;
}

.er-header-rewards__meta-icon {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px;
    flex: 0 0 14px;
}

/* En móvil mostramos solo la cantidad de productos. */
.er-header-rewards__cart-meta-item:nth-child(2) {
    display: none;
}
    body.woocommerce-cart .ct-header-cart .ct-label,
    body.woocommerce-checkout .ct-header-cart .ct-label {
        font-size: 18px !important;
        letter-spacing: -.4px !important;
    }

    body.woocommerce-cart .ct-header-cart svg,
    body.woocommerce-checkout .ct-header-cart svg {
        width: 21px !important;
        height: 21px !important;
    }

    .er-header-rewards__map {
        grid-area: map;
        width: 100%;
        height: 78px;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .er-header-rewards__map::-webkit-scrollbar {
        display: none;
    }

    .er-header-rewards__track,
    .er-header-rewards__milestones {
        width: 620px;
        right: auto;
    }

    .er-header-rewards__track {
        top: 22px;
    }

    .er-header-rewards__milestones {
        height: 78px;
    }

    .er-header-rewards__milestone {
        top: 6px;
        width: 104px;
    }

    .er-header-rewards__dot {
        width: 34px;
        height: 34px;
    }

    .er-header-rewards__amount {
        font-size: 11px;
    }

    .er-header-rewards__label {
        font-size: 9.5px;
    }

    .er-header-rewards__milestone:first-child .er-header-rewards__amount {
        font-size: 12px;
    }

    .er-header-rewards__milestone:first-child .er-header-rewards__label {
        font-size: 10px;
    }
}




/* =========================================================
   STICKY REWARDS — ESCRITORIO / TABLET
   Sticky conserva exactamente el mismo diseño y altura
   ========================================================= */

.er-header-rewards__sticky-marker {
    width: 100%;
    height: 0;
    pointer-events: none;
}

@media (min-width: 768px) {
    .er-header-rewards__sticky-marker.is-active {
        height: 132px;
    }

    .er-header-rewards.is-er-sticky {
        position: fixed;
        z-index: 9998;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-shadow: 0 7px 20px rgba(18, 36, 58, .10);
    }

}

@media (max-width: 767px) {
    .er-header-rewards__sticky-marker {
        display: none;
    }

    .er-header-rewards.is-er-sticky {
        position: static;
        box-shadow: none;
    }
}


/* =========================================================
   FIX — BADGE BLOCKSY + OFFSET ADMIN BAR
   ========================================================= */

@media (min-width: 768px) {
    .er-header-rewards__cart-slot .er-header-native-cart-count,
    .er-header-rewards__cart-slot .ct-dynamic-count,
    .er-header-rewards__cart-slot [class*="dynamic-count"],
    .er-header-rewards__cart-slot [class*="cart-count"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .er-header-rewards.is-er-sticky {
        top: 0;
    }

    body.admin-bar .er-header-rewards.is-er-sticky {
        top: 32px;
    }
}

@media (min-width: 768px) and (max-width: 782px) {
    body.admin-bar .er-header-rewards.is-er-sticky {
        top: 46px;
    }
}

/* =========================================================
   CARRITO PROPIO REWARDS — SVG REAL
   Estructura definitiva: icono SVG + importe.
   ========================================================= */


/* Estructura común del carrito propio. */
.er-header-rewards__cart-slot .er-rewards-own-cart {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: auto !important;
    margin: 0 !important;
}

.er-header-rewards__cart-slot .er-rewards-own-cart__link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-height: 42px;
    padding: 5px 8px !important;
    gap: 10px !important;
    border-radius: 10px;
    color: #172231 !important;
    text-decoration: none !important;
}

/* El carrito ya viene como SVG real desde PHP: nunca dibujar otro con ::before. */
.er-header-rewards__cart-slot .er-rewards-own-cart__link::before {
    content: none !important;
    display: none !important;
}

.er-header-rewards__cart-slot .er-rewards-own-cart__icon {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    flex: 0 0 30px !important;
    color: #172231 !important;
}

.er-header-rewards__cart-slot .er-rewards-own-cart__total {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-family: "Manrope", sans-serif !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: -.8px !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #172231 !important;
}

.er-header-rewards__cart-slot .er-rewards-own-cart__link:hover {
    background: #eef4f5;
}

.er-header-rewards__cart-slot .er-rewards-own-cart__link:hover .er-rewards-own-cart__icon,
.er-header-rewards__cart-slot .er-rewards-own-cart__link:hover .er-rewards-own-cart__total {
    color: #0f9f99 !important;
}

/* Sticky escritorio. */
@media (min-width: 768px) {
    .er-header-rewards.is-er-sticky .er-header-rewards__cart-slot .er-rewards-own-cart__link {
        min-height: 30px;
        padding-top: 1px !important;
        padding-bottom: 1px !important;
    }

    .er-header-rewards.is-er-sticky .er-header-rewards__cart-slot .er-rewards-own-cart__icon {
        width: 25px !important;
        height: 25px !important;
        min-width: 25px !important;
        flex-basis: 25px !important;
    }

    .er-header-rewards.is-er-sticky .er-header-rewards__cart-slot .er-rewards-own-cart__total {
        font-size: 23px !important;
    }
}

/* Móvil: mismo carrito, tamaño compacto y sin duplicado. */
@media (max-width: 767px) {
    .er-header-rewards__cart-slot .er-rewards-own-cart__link {
        min-height: 40px;
        padding: 3px 4px !important;
        gap: 7px !important;
    }

    .er-header-rewards__cart-slot .er-rewards-own-cart__icon {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        flex: 0 0 22px !important;
        color: #172231 !important;
    }

    .er-header-rewards__cart-slot .er-rewards-own-cart__total {
        font-size: 18px !important;
        font-weight: 700 !important;
        letter-spacing: -.4px !important;
        color: #172231 !important;
    }
}

/* =========================================================
   CELEBRACIÓN — RECOMPENSA CONSEGUIDA
   Solo visual. No modifica el motor ni el mapa Rewards.
   ========================================================= */
.er-reward-celebration {
    position: fixed;
    z-index: 10050;
    top: 24px;
    left: 50%;
    width: min(430px, calc(100vw - 32px));
    min-height: 92px;
    padding: 16px 22px 16px 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, .98);
    border: 1px solid #dce8e8;
    border-radius: 16px;
    box-shadow: 0 16px 45px rgba(18, 36, 58, .18);
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -18px) scale(.96);
    transition: opacity .28s ease, transform .32s cubic-bezier(.2,.9,.25,1.2);
}

.er-reward-celebration.is-visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.er-reward-celebration__icon {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #12aaa4;
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 7px 18px rgba(18, 170, 164, .25);
    font-size: 23px;
    font-weight: 900;
    animation: erRewardPop .65s cubic-bezier(.2,.9,.25,1.35) both;
}

.er-reward-celebration__icon svg {
    display: block !important;
    width: 27px !important;
    height: 27px !important;
    max-width: 27px !important;
    max-height: 27px !important;
}

.er-reward-celebration__icon .er-icon-percent {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.er-reward-celebration__copy {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.er-reward-celebration__copy strong {
    color: #0f9f99;
    font-family: "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .07em;
}

.er-reward-celebration__copy span {
    color: #172231;
    font-family: "Manrope", sans-serif;
    font-size: 19px;
    font-weight: 850;
    line-height: 1.15;
}

.er-reward-celebration__copy small {
    color: #697783;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
}

.er-reward-celebration__confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.er-reward-celebration__confetti i {
    position: absolute;
    top: -12px;
    left: 50%;
    width: 7px;
    height: 12px;
    background: #12aaa4;
    border-radius: 2px;
    opacity: 0;
    animation: erConfetti 1.05s ease-out forwards;
}
.er-reward-celebration__confetti i:nth-child(1) { margin-left:-155px; animation-delay:.04s; transform:rotate(18deg); }
.er-reward-celebration__confetti i:nth-child(2) { margin-left:-110px; animation-delay:.13s; transform:rotate(-22deg); }
.er-reward-celebration__confetti i:nth-child(3) { margin-left:-62px;  animation-delay:.02s; transform:rotate(35deg); }
.er-reward-celebration__confetti i:nth-child(4) { margin-left:-18px;  animation-delay:.18s; transform:rotate(-30deg); }
.er-reward-celebration__confetti i:nth-child(5) { margin-left:32px;   animation-delay:.08s; transform:rotate(26deg); }
.er-reward-celebration__confetti i:nth-child(6) { margin-left:78px;   animation-delay:.16s; transform:rotate(-16deg); }
.er-reward-celebration__confetti i:nth-child(7) { margin-left:125px;  animation-delay:.05s; transform:rotate(42deg); }
.er-reward-celebration__confetti i:nth-child(8) { margin-left:165px;  animation-delay:.21s; transform:rotate(-38deg); }

@keyframes erRewardPop {
    0%   { transform: scale(.45) rotate(-10deg); }
    70%  { transform: scale(1.13) rotate(3deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes erConfetti {
    0%   { opacity: 0; translate: 0 0; }
    15%  { opacity: .9; }
    100% { opacity: 0; translate: 0 105px; rotate: 180deg; }
}

@media (max-width: 767px) {
    .er-reward-celebration {
        top: 12px;
        width: calc(100vw - 24px);
        min-height: 78px;
        padding: 12px 15px 12px 12px;
        gap: 11px;
        border-radius: 14px;
    }
    .er-reward-celebration__icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    .er-reward-celebration__icon svg {
        width: 23px !important;
        height: 23px !important;
        max-width: 23px !important;
        max-height: 23px !important;
    }
    .er-reward-celebration__copy strong { font-size: 10px; }
    .er-reward-celebration__copy span { font-size: 16px; }
    .er-reward-celebration__copy small { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .er-reward-celebration,
    .er-reward-celebration__icon,
    .er-reward-celebration__confetti i {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================================
   DESGLOSE + ESTADOS COMERCIALES — CONSOLIDADO
   ========================================================= */

.er-header-rewards__price-breakdown {
    width: 100%;
    margin: 1px 0 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 7px;
    color: #526170;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
}
.er-header-rewards__price-breakdown strong { color:#172231; font-weight:850; white-space:nowrap; }
.er-header-rewards__price-breakdown strong.is-free { color:#0f9f63; }
.er-header-rewards__price-plus { color:#8b98a3; font-weight:800; }

.er-header-rewards__cart-progress-text,
.er-header-rewards__shipping-unlocked {
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 6px;
}

/* Antes de envío gratis: aviso rojo. */
.er-header-rewards__cart-progress.is-before-free-shipping .er-header-rewards__cart-progress-text {
    margin: 0 0 7px;
    padding: 5px 8px;
    background: #fff0f0;
    border-color: #ffdada;
    color: #e02d2d;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

/* Envío gratis conseguido: tarjeta verde compacta y legible. */
.er-header-rewards__shipping-unlocked {
    width: 100%;
    margin: 0;
    padding: 3px 7px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #e8f7ee;
    border-color: #ccefd9;
    color: #16823f;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.1;
}
.er-header-rewards__shipping-unlocked strong { color:#16823f; font-weight:850; }
.er-header-rewards__shipping-check { font-size:12px; font-weight:900; line-height:1; }

/* Verde -> aire -> barra -> aire -> amarillo. */
.er-header-rewards__cart-progress.has-free-shipping .er-header-rewards__cart-progress-track {
    margin-top: 7px;
    margin-bottom: 7px;
}

/* Siguiente recompensa: amarillo, una línea en escritorio. */
.er-header-rewards__cart-progress.has-free-shipping .er-header-rewards__cart-progress-text {
    margin: 0;
    padding: 4px 6px;
    overflow: hidden;
    background: #fff6df;
    border-color: #ffe7ae;
    color: #c46b00;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-overflow: clip;
    white-space: nowrap;
}

/* La separación amarillo -> productos/plazo queda en la regla base:
   .er-header-rewards__cart-meta { margin-top: 9px; } */

/* =========================================================
   MÓVIL — mantiene desglose, estados y barra individual
   ========================================================= */
@media (max-width: 767px) {
    .er-header-rewards__inner {
        grid-template-areas:
            "intro cart"
            "map map"
            "details details";
    }
    .er-header-rewards__cart-area { display: contents; }
    .er-header-rewards__cart-slot {
        grid-area: cart;
        padding-left: 10px;
        border-left: 1px solid #d9e1e6;
        box-sizing: border-box;
    }
    .er-header-rewards__cart-progress {
        grid-area: details;
        display: block !important;
        width: 100%;
        margin-top: 0;
        padding: 9px 10px 0;
        border-top: 1px solid #edf1f4;
        box-sizing: border-box;
    }
    .er-header-rewards__price-breakdown {
        margin: 0 0 6px;
        font-size: 11px;
        gap: 4px 6px;
    }
    .er-header-rewards__cart-progress-text {
        display: block !important;
        overflow: visible;
        font-size: 10.5px;
        line-height: 1.25;
        text-overflow: clip;
        white-space: normal;
    }
    .er-header-rewards__cart-progress-track {
        display: block !important;
        height: 5px;
    }
    .er-header-rewards__shipping-unlocked {
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 7px;
    }
    .er-header-rewards__cart-progress.is-before-free-shipping .er-header-rewards__cart-progress-text,
    .er-header-rewards__cart-progress.has-free-shipping .er-header-rewards__cart-progress-text {
        padding: 6px 8px;
        font-size: 10.5px;
        line-height: 1.25;
        border-radius: 7px;
    }
    .er-header-rewards__cart-progress.has-free-shipping .er-header-rewards__cart-progress-track {
        margin-top: 7px;
        margin-bottom: 7px;
    }
    .er-header-rewards__cart-meta {
        margin-top: 5px;
        padding-left: 0;
        gap: 12px;
    }
    .er-header-rewards__cart-meta-item:nth-child(2) { display:inline-flex !important; }
    .er-header-rewards__cart-meta-item { font-size:10px; }
}

/* =========================================================
   ESCRITORIO ANCHO — APROVECHAR MARGEN IZQUIERDO
   Más espacio para RECOMPENSAS sin alterar tablet/móvil.
   ========================================================= */
@media (min-width: 1200px) {
    .er-header-rewards__inner {
        width: min(1380px, calc(100% - 24px));
        grid-template-columns: 250px minmax(0, 1fr) 250px;
        gap: 24px;
    }

    .er-header-rewards__intro {
        width: 250px;
        min-width: 250px;
        max-width: 250px;
    }

    .er-header-rewards__message {
        max-width: none;
    }

    .er-header-rewards__message--desktop strong,
    .er-header-rewards__message--desktop small {
        white-space: nowrap;
    }
}

/* =========================================================
   ESCRITORIO — MÁS AIRE EN EL CONTENEDOR GENERAL
   Solo aumenta altura/padding exterior; no altera separaciones internas.
   ========================================================= */
@media (min-width: 1200px) {
    .er-header-rewards {
        min-height: 104px;
    }

    .er-header-rewards__inner {
        min-height: 104px;
        padding-top: 8px;
        padding-bottom: 8px;
        box-sizing: border-box;
    }
}

/* =========================================================
   AJUSTE FINAL — AIRE ENTRE BARRA Y AVISO ROJO
   ========================================================= */
@media (min-width: 768px) {
    .er-header-rewards__cart-progress.is-before-free-shipping
    .er-header-rewards__cart-progress-track {
        margin-bottom: 7px;
    }
}

/* =========================================================
   AJUSTE FINAL — BARRA INDIVIDUAL MÁS VISIBLE
   ========================================================= */
.er-header-rewards__cart-progress-track {
    height: 7px !important;
}

/* =========================================================
   STICKY ESCRITORIO — MISMO TAMAÑO QUE CABECERA NORMAL
   ========================================================= */
@media (min-width: 1200px) {
    .er-header-rewards__sticky-marker.is-active {
        height: 104px;
    }

    .er-header-rewards.is-er-sticky,
    .er-header-rewards.is-er-sticky .er-header-rewards__inner {
        min-height: 104px;
    }
}

/* Separación móvil aprobada: barra → aviso */
@media (max-width: 767px) {
    .er-header-rewards__cart-progress-track {
        margin-bottom: 6px !important;
    }
}

