/* White Fox · página del carrito (/carrito).
   Todo va con #cart adelante para no tocar el checkout ni otras páginas. */

#cart {
    --wf-navy: #1E2A3A;
    --wf-gold: #B3956A;
    --wf-cream: #F9F4F0;
    --wf-line: rgba(30, 42, 58, .12);
    --wf-muted: rgba(30, 42, 58, .68);
}

#cart .wfcp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Estructura general ---------- */
#cart .wfcp .cart-grid { margin-top: 8px; margin-bottom: 48px; }
#cart .wfcp .cart-container.card { background: transparent; border: 0; box-shadow: none; border-radius: 0; position: relative; }
#cart .wfcp .cart-container .card-block { padding: 0; }
#cart .wfcp .cart-grid-body .cart-overview { padding: 0; }
#cart .wfcp-title {
    margin: 0 0 20px;
    padding-right: 120px;
    color: var(--wf-navy);
    font-family: "PT Serif", serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
}
#cart .wfcp-count { position: absolute; top: 10px; right: 0; color: var(--wf-muted); font-size: 15px; }

/* ---------- Envío gratis ---------- */
#cart .wfcp-ship { background: var(--wf-cream); padding: 16px 24px 18px; margin-bottom: 4px; text-align: center; }
#cart .wfcp-ship__message { margin: 0 0 12px; color: var(--wf-navy); font-size: 15px; line-height: 1.4; }
#cart .wfcp-ship__track { height: 3px; background: rgba(179, 149, 106, .28); overflow: hidden; }
#cart .wfcp-ship__fill { display: block; height: 100%; background: var(--wf-gold); transition: width .3s ease; }

/* ---------- Productos: una fila compacta ---------- */
#cart .cart-items { list-style: none; margin: 0; padding: 0; }
#cart .cart-item { padding: 14px 0; border-bottom: 1px solid var(--wf-line); }
#cart .cart-item:last-child { border-bottom: 1px solid var(--wf-line); }

#cart .wfcp-line {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto 112px 40px;
    grid-template-areas: "img info qty total remove";
    column-gap: 20px;
    align-items: center;
    flex-wrap: nowrap;
}
#cart .wfcp-line__image { grid-area: img; width: 84px; }
#cart .wfcp-line__image img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid rgba(30, 42, 58, .08); }
#cart .wfcp-line__info { grid-area: info; min-width: 0; }
#cart .wfcp-line__qty { grid-area: qty; }
#cart .wfcp-line__total { grid-area: total; text-align: right; }
#cart .wfcp-line__remove { grid-area: remove; display: flex; align-items: center; justify-content: flex-end; margin: 0; }

#cart .wfcp-line .product-line-info { margin: 0; }
#cart .wfcp-line__info .product-title a { color: var(--wf-navy); text-decoration: none; }
#cart .wfcp-line__info .product-title h6 {
    margin: 0;
    color: var(--wf-navy);
    font-family: "PT Serif", serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
}
#cart .wfcp-line__gift-tag {
    display: inline-block; margin-top: 4px; padding: 1px 10px;
    border: 1px solid var(--wf-gold); color: var(--wf-gold); font-size: 12px; letter-spacing: .04em;
}
#cart .wfcp-line__variants { margin-top: 3px; color: var(--wf-muted); font-size: 13px; line-height: 1.45; }
#cart .wfcp-line__unit { margin-top: 2px; color: var(--wf-navy); font-size: 13px; line-height: 1.45; }
#cart .wfcp-line__unit .price { color: var(--wf-navy); font-size: 13px; font-weight: 400; }
#cart .wfcp-line__unit .regular-price { margin-left: 6px; color: var(--wf-muted); text-decoration: line-through; font-size: 12px; }
#cart .wfcp-line__unit .discount {
    margin-left: 6px; padding: 0 8px; border: 1px solid var(--wf-gold);
    background: transparent; color: var(--wf-gold); font-size: 11px; border-radius: 0; position: static;
}
#cart .wfcp-line__per { color: var(--wf-muted); }
#cart .wfcp-line__customization-link { display: inline-block; margin-top: 4px; color: var(--wf-navy); font-size: 13px; text-decoration: underline; }
#cart .wfcp-line__qty .gift-quantity { color: var(--wf-muted); font-size: 13px; }
#cart .wfcp-line__total .product-price strong { display: flex; flex-direction: column; align-items: flex-end; gap: 0; font-weight: 400; }
#cart .wfcp-line__total-value { color: var(--wf-navy); font-size: 18px; }
#cart .wfcp-line__regular-total { color: var(--wf-muted); font-size: 12px; }
#cart .wfcp-line__total .gift { color: var(--wf-gold); font-size: 15px; }
#cart .wfcp-line__remove .remove-from-cart {
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    color: var(--wf-navy); float: none;
}
#cart .wfcp-line__remove .remove-from-cart i { font-size: 21px; float: none; }
#cart .wfcp-line__remove .remove-from-cart:hover { color: var(--wf-gold); }

/* ---------- Selector de cantidad (− 5 +) sobre el TouchSpin del tema ---------- */
#cart .wfcp-line__qty .bootstrap-touchspin {
    float: none; display: inline-flex; align-items: stretch; height: 40px;
    border: 1px solid rgba(30, 42, 58, .28); background: #fff; border-radius: 0; width: auto;
}
#cart .wfcp-line__qty .bootstrap-touchspin input.js-cart-line-product-quantity {
    order: 0; width: 44px; height: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none;
    background: #fff; color: var(--wf-navy); text-align: center; font-family: "PT Serif", serif; font-size: 15px;
}
#cart .wfcp-line__qty .bootstrap-touchspin .input-group-btn-vertical { display: contents; }
#cart .wfcp-line__qty .bootstrap-touchspin .btn-touchspin {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 100%; max-width: none; padding: 0; margin: 0; float: none;
    border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--wf-navy);
    font-family: "PT Serif", serif; font-size: 21px; line-height: 1; cursor: pointer;
}
#cart .wfcp-line__qty .bootstrap-touchspin .btn-touchspin i { display: none; }
#cart .wfcp-line__qty .bootstrap-touchspin .bootstrap-touchspin-down { order: -1; }
#cart .wfcp-line__qty .bootstrap-touchspin .bootstrap-touchspin-up { order: 1; }
#cart .wfcp-line__qty .bootstrap-touchspin .bootstrap-touchspin-down::before { content: "\2212"; }
#cart .wfcp-line__qty .bootstrap-touchspin .bootstrap-touchspin-up::before { content: "+"; }
#cart .wfcp-line__qty .bootstrap-touchspin .btn-touchspin:hover { background: var(--wf-cream); }

/* ---------- Mostrar más / menos (solo celular) ---------- */
#cart .wfcp-more { display: none; }

/* ---------- Seguir comprando ---------- */
#cart .wfcp-continue {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
    color: var(--wf-navy); font-size: 15px; text-decoration: none;
    border-bottom: 1px solid var(--wf-navy); padding-bottom: 2px;
}
#cart .wfcp-continue i { font-size: 18px; }
#cart .wfcp-continue:hover { color: var(--wf-gold); border-color: var(--wf-gold); }

/* ---------- Resumen ---------- */
#cart .wfcp .cart-summary.card { background: var(--wf-cream); border: 0; border-radius: 0; box-shadow: none; padding: 28px; }
#cart .wfcp-summary-title {
    margin: 0 0 20px; color: var(--wf-navy); font-family: "PT Serif", serif;
    font-size: 22px; font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1.3;
}
#cart .cart-summary .card-block { padding: 0; }
#cart .cart-summary hr.separator { display: none; }
#cart .cart-summary .cart-summary-line {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px;
    clear: none; margin: 0 0 12px;
}
#cart .cart-summary .cart-summary-line::after { display: none; }
#cart .cart-summary .cart-summary-line .label { color: var(--wf-muted); font-size: 15px; font-weight: 400; float: none; }
#cart .cart-summary .cart-summary-line .value { color: var(--wf-navy); font-size: 15px; font-weight: 400; float: none; }
#cart .cart-summary .cart-summary-line .value.wfcp-next-step { color: var(--wf-muted); font-size: 14px; }
#cart .cart-summary .wfcp-shipping-detail { flex-basis: 100%; }

/* Cupón */
/* El refresco del carrito vuelve a insertar el bloque dentro del anterior: solo cuenta el de afuera. */
#cart .cart-summary .wfcp-promo .wfcp-promo { margin: 0; padding: 0; border: 0; }
#cart .cart-summary .block-promo.wfcp-promo { margin-top: 8px; padding: 16px 0 0; border-top: 1px solid var(--wf-line); }
#cart .cart-summary .cart-voucher p { margin: 0; }
#cart .cart-summary .promo-name, #cart .cart-summary .promo-discounts { list-style: none; margin: 0 0 12px; padding: 0; color: var(--wf-navy); font-weight: 400; }
#cart .cart-summary .block-promo .cart-summary-line .label { color: var(--wf-navy); font-weight: 400; }

/* Cupón aplicado */
#cart .cart-summary .wfcp-voucher {
    display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding: 14px 16px;
    background: rgba(30, 42, 58, .05);
}
#cart .cart-summary .wfcp-voucher__check {
    display: flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px;
    border-radius: 50%; background: #4F7A3A; color: #fff;
}
#cart .cart-summary .wfcp-voucher__check i { font-size: 20px; }
#cart .cart-summary .wfcp-voucher__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
#cart .cart-summary .wfcp-voucher__title { color: #2F5D2B; font-size: 16px; font-weight: 700; line-height: 1.3; }
#cart .cart-summary .wfcp-voucher__name { color: var(--wf-muted); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; word-break: break-word; }
#cart .cart-summary .wfcp-voucher__remove { flex: none; color: var(--wf-navy); font-size: 14px; text-decoration: underline; }
#cart .cart-summary .wfcp-voucher__remove:hover { color: var(--wf-gold); }
#cart .cart-summary .block-promo .promo-code-button {
    display: flex; align-items: center; justify-content: space-between; min-height: 40px;
    margin: 0; padding: 0; color: var(--wf-navy); font-size: 15px; text-decoration: none;
}
#cart .cart-summary .promo-code-button::after { content: "+"; font-size: 22px; line-height: 1; }
#cart .cart-summary .promo-code-button[aria-expanded="true"]::after { content: "\2212"; }
#cart .cart-summary .block-promo .promo-code { padding: 0; background: transparent; border: 0; }
#cart .cart-summary .promo-code form { display: flex; gap: 8px; margin: 4px 0 8px; }
#cart .cart-summary .block-promo .promo-code .promo-input {
    flex: 1 1 auto; width: auto; min-width: 0; height: 44px; padding: 0 12px; text-indent: 0;
    border: 1px solid rgba(30, 42, 58, .28); border-radius: 0; background: #fff; color: var(--wf-navy);
    font-family: "PT Serif", serif; font-size: 15px;
}
#cart .cart-summary .block-promo .promo-code form button.tvall-inner-btn {
    display: inline-flex; align-items: center; justify-content: center; line-height: 1;
    flex: none; height: 44px; margin: 0; padding: 0 22px; border: 0; border-radius: 0;
    background: var(--wf-navy); color: #fff; font-family: "PT Serif", serif; font-size: 15px;
    font-weight: 400; text-transform: none; letter-spacing: .02em;
}
#cart .cart-summary .block-promo .promo-code form button.tvall-inner-btn span,
#cart .cart-summary .cart-detailed-actions .tvall-inner-btn span,
#cart .cart-summary .cart-detailed-actions .tvall-inner-btn-cancel span { display: block; margin: 0; padding: 0; line-height: 1; position: static; }
#cart .cart-summary .block-promo .promo-code form button.tvall-inner-btn:hover { background: #2B3B50; color: #fff; }
#cart .cart-summary .block-promo.promo-highlighted { margin: 12px 0 8px; padding: 0; color: var(--wf-muted); font-size: 14px; }
#cart .cart-summary .promo-discounts .code { color: var(--wf-navy); text-decoration: underline; cursor: pointer; }
#cart .cart-summary .promo-code .alert { margin: 8px 0 0; font-size: 14px; }

/* Total */
#cart .cart-summary .wfcp-total { margin-top: 12px; padding-top: 20px; border-top: 1px solid rgba(30, 42, 58, .18); }
#cart .cart-summary .cart-total { margin-bottom: 4px; align-items: baseline; }
#cart .cart-summary .cart-total .label { color: var(--wf-navy); font-size: 17px; font-weight: 700; }
#cart .cart-summary .cart-total .value { color: var(--wf-navy); font-size: 26px; font-weight: 700; }
#cart .cart-summary .wfcp-tax .label, #cart .cart-summary .wfcp-tax .value { font-size: 13px; }

/* Botón principal */
#cart .cart-summary .cart-detailed-actions { margin-top: 24px; }
#cart .cart-summary .cart-detailed-actions .tvall-inner-btn,
#cart .cart-summary .cart-detailed-actions .tvall-inner-btn-cancel {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; margin: 0;
    padding: 0 20px; border: 0; border-radius: 0; background: var(--wf-navy); color: #fff;
    font-family: "PT Serif", serif; font-size: 16px; font-weight: 400; letter-spacing: .02em; text-transform: none;
    text-decoration: none; transition: background .2s ease;
}
#cart .cart-summary .cart-detailed-actions .tvall-inner-btn:hover { background: #2B3B50; color: #fff; }
#cart .cart-summary .cart-detailed-actions .tvall-inner-btn-cancel.disabled { opacity: .45; cursor: not-allowed; }
#cart .cart-summary .cart-detailed-actions .alert { font-size: 14px; }

/* ---------- Confianza plegable (contenido del módulo blockreassurance) ---------- */
#cart .wfcp-help { display: flex; flex-direction: column; margin-top: 24px; border-bottom: 1px solid var(--wf-line); }
#cart .wfcp-help__item { border-top: 1px solid var(--wf-line); }
#cart .wfcp-help__item--first { order: -1; }
#cart .wfcp-help__item summary {
    display: flex; align-items: center; gap: 16px; padding: 12px 0; cursor: pointer; list-style: none;
    color: var(--wf-navy);
}
#cart .wfcp-help__item[open] summary { padding-bottom: 4px; }
#cart .wfcp-help__item summary::-webkit-details-marker { display: none; }
#cart .wfcp-help__icon {
    display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px;
    border-radius: 50%; background: var(--wf-cream); color: var(--wf-navy);
}
#cart .wfcp-help__icon img { display: block; width: 22px; height: 22px; }
#cart .wfcp-help__title { flex: 1 1 auto; font-size: 16px; font-weight: 700; }
#cart .wfcp-help__chevron { font-size: 24px; transition: transform .2s ease; }
#cart .wfcp-help__item[open] .wfcp-help__chevron { transform: rotate(180deg); }
#cart .wfcp-help__body { padding: 0 0 12px 60px; color: var(--wf-muted); font-size: 14px; line-height: 1.45; }
#cart .wfcp-help__text, #cart .wfcp-help__text p { margin: 0 0 4px; }
#cart .wfcp-help__link { display: inline-flex; align-items: center; gap: 4px; color: var(--wf-navy); font-size: 14px; text-decoration: none; }
#cart .wfcp-help__link span { border-bottom: 1px solid var(--wf-gold); padding-bottom: 1px; }
#cart .wfcp-help__link i { font-size: 15px; }
#cart .wfcp-help__link:hover { color: var(--wf-gold); }

/* ---------- Carrito vacío ---------- */
#cart .wfcp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 16px 72px; }
#cart .wfcp--empty .wfcp-empty { padding-top: 72px; }
#cart .wfcp-empty__title { margin: 0; color: var(--wf-navy); font-family: "PT Serif", serif; font-size: 30px; font-weight: 700; line-height: 1.3; }
#cart .wfcp-empty__icon { position: relative; width: 88px; height: 96px; margin: 32px auto 24px; color: var(--wf-navy); }
#cart .wfcp-empty__icon svg { display: block; width: 88px; height: 96px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#cart .wfcp-empty__count {
    position: absolute; top: 17px; right: 3px; display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; background: var(--wf-gold); color: #fff; font-size: 12px;
}
#cart .wfcp-empty__text { margin: 0 0 24px; color: var(--wf-muted); font-size: 16px; }
#cart .wfcp-empty__cta {
    display: inline-flex; align-items: center; justify-content: center; min-width: 240px; height: 52px; padding: 0 28px;
    background: var(--wf-navy); color: #fff; font-size: 16px; text-decoration: none; letter-spacing: .02em;
}
#cart .wfcp-empty__cta:hover { background: #2B3B50; color: #fff; }
#cart .wfcp-empty__note { margin: 20px 0 0; color: var(--wf-muted); font-size: 14px; }

/* ---------- Pantallas medianas ---------- */
@media (max-width: 1199px) {
    #cart .wfcp-line { grid-template-columns: 76px minmax(0, 1fr) auto 96px 36px; column-gap: 14px; }
    #cart .wfcp-line__image { width: 76px; }
}

/* ---------- Celular ---------- */
@media (max-width: 991px) {
    #cart .wfcp .cart-grid { margin-bottom: 32px; }
    #cart .wfcp .cart-grid-right { margin-top: 24px; }
}
@media (max-width: 767px) {
    #cart .wfcp-title { font-size: 28px; padding-right: 100px; }
    #cart .wfcp-count { top: 8px; font-size: 14px; }
    #cart .wfcp-ship { padding: 14px 16px 16px; }

    /* Foto a la izquierda; a la derecha nombre, detalle, cantidad y total */
    #cart .cart-item { padding: 14px 0; }
    #cart .wfcp-line {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        grid-template-areas:
            "img info remove"
            "img qty total";
        column-gap: 14px;
        row-gap: 8px;
        align-items: start;
    }
    #cart .wfcp-line__image { width: 72px; }
    #cart .wfcp-line__info .product-title h6 { font-size: 15px; }
    #cart .wfcp-line__variants, #cart .wfcp-line__unit, #cart .wfcp-line__unit .price { font-size: 12.5px; }
    #cart .wfcp-line__remove { justify-content: flex-end; align-self: start; margin: -6px -8px 0 0; }
    #cart .wfcp-line__qty { align-self: center; }
    #cart .wfcp-line__total { align-self: center; }
    #cart .wfcp-line__total-value { font-size: 17px; }
    #cart .wfcp-line__qty .bootstrap-touchspin { height: 34px; }
    #cart .wfcp-line__qty .bootstrap-touchspin input.js-cart-line-product-quantity { width: 34px; font-size: 14px; }
    #cart .wfcp-line__qty .bootstrap-touchspin .btn-touchspin { width: 34px; font-size: 18px; }

    /* Primeros 3 artículos; el resto con "Mostrar más" */
    #cart .wfcp:not(.wfcp--expanded) .cart-item:nth-child(n+4) { display: none; }
    #cart .wfcp-more {
        display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
        margin: 0; padding: 14px 0; border: 0; border-bottom: 1px solid var(--wf-line);
        background: transparent; color: var(--wf-navy); font-family: "PT Serif", serif; font-size: 15px; cursor: pointer;
    }
    #cart .wfcp-more i { font-size: 22px; transition: transform .2s ease; }
    #cart .wfcp-more__less { display: none; }
    #cart .wfcp--expanded .wfcp-more__more { display: none; }
    #cart .wfcp--expanded .wfcp-more__less { display: inline; }
    #cart .wfcp--expanded .wfcp-more i { transform: rotate(180deg); }

    #cart .wfcp-continue { margin-top: 16px; }
    #cart .wfcp .cart-grid-right { margin-top: 20px; }
    #cart .wfcp .cart-summary.card { padding: 22px; }
    #cart .wfcp-empty__title { font-size: 26px; }
}
