:root {
    --sp_mini_cart_color_acento: #AFA997;
    --sp_mini_cart_color_texto: #757575;
    --sp_mini_cart_color_texto_contador: #fff;
    --sp_mini_cart_gap_icono: 4px;
}

.header-cart-icon {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp_mini_cart_gap_icono);
    line-height: 1;
}

.header-cart-icon span{ font-size: 1em; color: var(--sp_mini_cart_color_texto); }

@media (max-width: 767px) { .header-cart-icon span{ font-size: 12px; } }

#toggle-mini-cart{ position: relative; }

.header-cart-icon .cart-icon {
    width: 20px;
    height: 20px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    display: block;
    transition: transform 0.3s
}

@media (min-width: 992px) { .header-cart-icon:hover .cart-icon{ transform: translateY(-4px); } }

.header-cart-icon span.cart-count {
    background-color: var(--sp_mini_cart_color_acento);
    color: var(--sp_mini_cart_color_texto_contador);
    border-radius: 100px;
    padding: 2px;
    font-size: 12px!important;
    position: absolute;
    top: -8px;
    left: 20px;
    width: 24px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Estructura Slide Cart Base */
.slide-mini-cart {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    right: 0;
    overflow: hidden;
    z-index: 99999;
    visibility: hidden;
    transition: visibility 0.3s;
}

.slide-mini-cart .mini-cart-content {
    width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    transform: translateX(100%);
    overflow: hidden;
    z-index: 99999;
    visibility: hidden;
    max-height: 100vh;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.slide-mini-cart.open { visibility: visible; }
.slide-mini-cart.open .mini-cart-content {
    visibility: visible;
    transform: translateX(0);
}

.slide-mini-cart.open .overlay { opacity: 1; }
.slide-mini-cart .overlay {
    opacity: 0;
    transition: opacity 0.3s;
    position: fixed;
    z-index: 10;
    top: 0; left: 0; width: 100%; height: 100%;
}

.blockUI.blockOverlay{ border-radius: 0px!important; }


/* ══════════════════════════════════════════════════════════════
   CARRUSEL CROSS-SELLS — hereda variables del tema activo
══════════════════════════════════════════════════════════════ */

.sp-cart-upsell {
    padding: 10px 0 0;
    margin-top: 8px;
    border-top: 1px solid var(--sp-c-border, #ebebeb);
}

/* Cabecera: título + flechas */
.sp-cart-upsell__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sp-cart-upsell__title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--sp-c-text-muted, #9ca3af);
}

/* Flechas */
.sp-cart-upsell__arrows {
    display: flex;
    gap: 4px;
}

.sp-cart-upsell__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--sp-c-border, #e5e7eb);
    border-radius: 50%;
    background: var(--sp-c-surface, #f4f4f4);
    cursor: pointer;
    padding: 0;
    transition: background .15s, border-color .15s, transform .1s;
    flex-shrink: 0;
}

.sp-cart-upsell__arrow:hover {
    background: var(--sp-c-accent, #111);
    border-color: var(--sp-c-accent, #111);
    transform: scale(1.08);
}

.sp-cart-upsell__arrow svg {
    width: 11px;
    height: 11px;
    stroke: var(--sp-c-text-muted, #6b7280);
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .15s;
}

.sp-cart-upsell__arrow:hover svg {
    stroke: var(--sp-c-btn-text, #fff);
}

/* Splide reset mínimo */
.sp-cart-upsell .splide__track { overflow: hidden; width: 100%;}
.sp-cart-upsell .splide__list  { display: flex; align-items: stretch; }
.sp-cart-upsell .splide__slide { height: 100%; }

/* ── Tarjeta producto — horizontal ── */
.sp-upsell-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--sp-c-bg-item, #f9f9f9);
    border: 1px solid var(--sp-c-border, #ebebeb);
    border-radius: 8px;
    overflow: hidden;
    min-height: 84px;
    transition: border-color .15s, box-shadow .15s;
    gap: 14px;
    padding: 12px;
}

.sp-upsell-card:hover {
    border-color: var(--sp-c-border-soft, #d1d5db);
    box-shadow: 0 3px 12px var(--sp-c-shadow, rgba(0,0,0,.06));
}
.sp-cart-upsell .added_to_cart {
    display: none !important;
}
/* Imagen */
.sp-upsell-card__img-wrap {
    width: 64px;
    height: 64px;
    min-width: 64px;
    aspect-ratio: 1 / 1;
    background: var(--sp-c-surface, #f4f4f4);
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 6px;
}

.sp-upsell-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.sp-upsell-card:hover .sp-upsell-card__img-wrap img {
    transform: scale(1.04);
}

/* Placeholder sin imagen */
.sp-upsell-card__img-wrap.is-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-upsell-card__img-wrap.is-placeholder svg {
    width: 24px;
    height: 24px;
    stroke: var(--sp-c-border, #d1d5db);
}

/* Cuerpo de la tarjeta */
.sp-upsell-card__body {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.sp-upsell-card__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-c-text, #1a1a1a);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.sp-upsell-card__price {
    font-size: 12px;
    color: var(--sp-c-text-muted, #6b7280);
    margin: 0 0 2px 0;
}

.sp-upsell-card__price ins {
    text-decoration: none;
    font-weight: 700;
    color: var(--sp-c-price, #111);
}

.sp-upsell-card__price del {
    opacity: .45;
    font-size: 11px;
}

/* Botón añadir (ahora auto-ajustado a la izquierda) */
.sp-upsell-card__btn {
    display: inline-block;
    align-self: flex-start;
    max-width: 100%;
    padding: 6px 14px;
    background: var(--sp-c-accent, #111);
    color: var(--sp-c-btn-text, #fff) !important;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none !important;
    transition: filter .15s, transform .1s;
    line-height: 1.3;
    letter-spacing: .02em;
    white-space: normal;
    word-break: break-word;
    box-sizing: border-box;
}

.sp-upsell-card__btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    color: var(--sp-c-btn-text, #fff) !important;
}

/* Variante botón para productos variables */
.sp-upsell-card__btn.is-variable {
    background: transparent;
    color: var(--sp-c-accent, #111) !important;
    border-color: var(--sp-c-accent, #111);
}

.sp-upsell-card__btn.is-variable:hover {
    background: var(--sp-c-accent, #111);
    color: var(--sp-c-btn-text, #fff) !important;
    filter: none;
}