/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
    --lfabfc-primary:        #1a1a1a;
    --lfabfc-accent:         #c9a96e;
    --lfabfc-accent-light:   #f5ede0;
    --lfabfc-bg:             #ffffff;
    --lfabfc-bg-subtle:      #fafaf9;
    --lfabfc-border:         #ece8e4;
    --lfabfc-border-strong:  #c8c4c0;
    --lfabfc-text:           #1a1a1a;
    --lfabfc-text-muted:     #8a8480;
    --lfabfc-text-light:     #b8b4b0;
    --lfabfc-danger:         #b83232;
    --lfabfc-success:        #2d6a4f;
    --lfabfc-drawer-width:   440px;
    --lfabfc-z:              999999;
    --lfabfc-shadow:         0 32px 80px rgba(0,0,0,.13), 0 8px 24px rgba(0,0,0,.06);
    --lfabfc-speed:          .42s;
    --lfabfc-ease:           cubic-bezier(.25,.46,.45,.94);
    --lfabfc-font:           -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.lfabfc-trigger, .lfabfc-drawer, .lfabfc-overlay, .lfabfc-drawer * { box-sizing: border-box; }

/* ── Trigger ─────────────────────────────────────────────────────────────── */
.lfabfc-trigger {
    position: fixed;
    bottom: 28px;
    z-index: var(--lfabfc-z);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--lfabfc-primary);
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.22), 0 1px 4px rgba(0,0,0,.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s var(--lfabfc-ease), box-shadow .25s var(--lfabfc-ease);
    padding: 0;
    outline: none;
}
.lfabfc-trigger--bottom-right { right: 28px; }
.lfabfc-trigger--bottom-left  { left: 28px; }
.lfabfc-trigger:hover  { transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 28px rgba(0,0,0,.26); }
.lfabfc-trigger:active { transform: scale(.97); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.lfabfc-trigger:focus-visible { outline: 2px solid var(--lfabfc-accent); outline-offset: 3px; }
.lfabfc-trigger__icon { width: 22px; height: 22px; flex-shrink: 0; stroke-width: 1.5px; }

/* ── Bubble ──────────────────────────────────────────────────────────────── */
.lfabfc-bubble {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    background: var(--lfabfc-accent);
    color: #fff;
    font-size: 10px; font-weight: 600;
    line-height: 18px; text-align: center;
    padding: 0 5px;
    border: 1.5px solid #fff;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .2s, transform .3s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
    font-family: var(--lfabfc-font);
}
.lfabfc-bubble--visible { opacity: 1; transform: scale(1); }

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.lfabfc-overlay {
    position: fixed; inset: 0;
    background: rgba(10,8,6,.36);
    z-index: calc(var(--lfabfc-z) + 1);
    opacity: 0; pointer-events: none;
    transition: opacity var(--lfabfc-speed) var(--lfabfc-ease);
}
.lfabfc-overlay--visible { opacity: 1; pointer-events: auto; }

/* ── Drawer ──────────────────────────────────────────────────────────────── */
.lfabfc-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: var(--lfabfc-drawer-width);
    max-width: 100vw;
    z-index: calc(var(--lfabfc-z) + 2);
    background: var(--lfabfc-bg);
    box-shadow: var(--lfabfc-shadow);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--lfabfc-speed) var(--lfabfc-ease);
    overflow: hidden;
    font-family: var(--lfabfc-font);
}
.lfabfc-drawer--open { transform: translateX(0); }
.lfabfc-drawer--left { right: auto; left: 0; box-shadow: 4px 0 40px rgba(0,0,0,.10); transform: translateX(-100%); }
.lfabfc-drawer--left.lfabfc-drawer--open { transform: translateX(0); }
.lfabfc-drawer__inner { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.lfabfc-drawer__header {
    display: flex; align-items: center; gap: 12px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--lfabfc-border);
    flex-shrink: 0;
}
.lfabfc-drawer__title {
    margin: 0; font-size: 11px; font-weight: 500;
    color: var(--lfabfc-text); flex: 1;
    letter-spacing: .14em; text-transform: uppercase;
    font-family: var(--lfabfc-font);
}
.lfabfc-drawer__count {
    background: var(--lfabfc-bg-subtle);
    color: var(--lfabfc-text-muted);
    border: 1px solid var(--lfabfc-border);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px; font-weight: 400;
    text-align: center; letter-spacing: .02em;
}
.lfabfc-close {
    background: none; border: none;
    color: var(--lfabfc-text-light);
    cursor: pointer; padding: 6px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 2px;
    transition: color .15s;
    flex-shrink: 0; outline: none;
}
.lfabfc-close:hover { color: var(--lfabfc-text); }

/* ── Shipping bar ────────────────────────────────────────────────────────── */
.lfabfc-shipping-bar {
    padding: 12px 28px;
    background: var(--lfabfc-accent-light);
    border-bottom: 1px solid var(--lfabfc-border);
    flex-shrink: 0;
}
.lfabfc-shipping-bar__text {
    margin: 0 0 8px; font-size: 11px;
    color: #7a6040; letter-spacing: .03em;
}
.lfabfc-shipping-bar__text--reached { color: var(--lfabfc-success); font-weight: 500; }
.lfabfc-shipping-bar__text strong { color: #8a6030; font-weight: 600; }
.lfabfc-shipping-bar__track { height: 2px; background: rgba(0,0,0,.1); border-radius: 1px; overflow: hidden; }
.lfabfc-shipping-bar__fill { height: 100%; background: var(--lfabfc-accent); border-radius: 1px; transition: width .6s var(--lfabfc-ease); }

/* ── Body ────────────────────────────────────────────────────────────────── */
.lfabfc-drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.lfabfc-drawer__body::-webkit-scrollbar { width: 3px; }
.lfabfc-drawer__body::-webkit-scrollbar-thumb { background: var(--lfabfc-border); border-radius: 2px; }

/* ── Empty ───────────────────────────────────────────────────────────────── */
.lfabfc-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 64px 28px; text-align: center; gap: 14px;
}
.lfabfc-empty__icon { width: 52px; height: 52px; opacity: .18; }
.lfabfc-empty p { margin: 0; font-size: 13px; color: var(--lfabfc-text-muted); letter-spacing: .02em; }
.lfabfc-btn-shop {
    display: inline-block; margin-top: 6px;
    padding: 11px 28px;
    background: var(--lfabfc-primary); color: #fff !important;
    border: none; border-radius: 2px;
    font-size: 10px; font-weight: 500;
    letter-spacing: .1em; text-transform: uppercase;
    text-decoration: none !important;
    transition: opacity .2s;
    font-family: var(--lfabfc-font);
}
.lfabfc-btn-shop:hover { opacity: .82; color: #fff !important; }

/* ── Items ───────────────────────────────────────────────────────────────── */
.lfabfc-items { list-style: none; margin: 0; padding: 0; }
.lfabfc-item {
    display: flex; gap: 16px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--lfabfc-border);
    position: relative; align-items: flex-start;
}
.lfabfc-item:last-child { border-bottom: none; }
.lfabfc-item.lfabfc-item--removing { opacity: .3; pointer-events: none; transition: opacity .3s; }
.lfabfc-item__img {
    flex-shrink: 0; width: 76px; height: 76px;
    display: block; text-decoration: none; overflow: hidden;
    background: var(--lfabfc-bg-subtle);
}
.lfabfc-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--lfabfc-ease); }
.lfabfc-item__img:hover img { transform: scale(1.05); }
.lfabfc-item__info {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px;
    padding-right: 28px;
}
.lfabfc-item__name {
    font-size: 13px; font-weight: 400;
    color: var(--lfabfc-text); text-decoration: none;
    line-height: 1.5; letter-spacing: .01em;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color .15s;
}
.lfabfc-item__name:hover { color: var(--lfabfc-accent); }
.lfabfc-item__meta { list-style: none; margin: 0; padding: 0; font-size: 11px; color: var(--lfabfc-text-light); letter-spacing: .02em; }
.lfabfc-item__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.lfabfc-item__price { font-size: 13px; font-weight: 500; color: var(--lfabfc-text); letter-spacing: .02em; white-space: nowrap; }
.lfabfc-item__price del { color: var(--lfabfc-text-light); margin-right: 4px; font-weight: 400; }
.lfabfc-item__price ins { text-decoration: none; color: var(--lfabfc-accent); }

/* ── Qty ─────────────────────────────────────────────────────────────────── */
.lfabfc-qty-control { display: flex; align-items: center; border: 1px solid var(--lfabfc-border-strong); height: 30px; background: var(--lfabfc-bg); }
.lfabfc-qty-btn {
    width: 28px; height: 100%; background: transparent; border: none;
    cursor: pointer; font-size: 14px; font-weight: 300;
    color: var(--lfabfc-text-muted); display: flex; align-items: center; justify-content: center;
    padding: 0; line-height: 1; user-select: none; transition: background .1s, color .1s;
}
.lfabfc-qty-btn:hover { background: var(--lfabfc-bg-subtle); color: var(--lfabfc-text); }
.lfabfc-qty-input {
    width: 32px; height: 100%; border: none;
    border-left: 1px solid var(--lfabfc-border);
    border-right: 1px solid var(--lfabfc-border);
    text-align: center; font-size: 12px; font-weight: 500;
    color: var(--lfabfc-text); background: var(--lfabfc-bg);
    outline: none; padding: 0; -moz-appearance: textfield;
    letter-spacing: .04em; font-family: var(--lfabfc-font);
}
.lfabfc-qty-input::-webkit-inner-spin-button,
.lfabfc-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Remove ──────────────────────────────────────────────────────────────── */
.lfabfc-item__remove {
    position: absolute; top: 18px; right: 24px;
    background: none; border: none; width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--lfabfc-text-light);
    padding: 0; transition: color .15s; outline: none;
}
.lfabfc-item__remove:hover { color: var(--lfabfc-danger); }

/* ── Coupon ──────────────────────────────────────────────────────────────── */
.lfabfc-coupon { padding: 14px 28px; border-top: 1px solid var(--lfabfc-border); }
.lfabfc-coupon__form {
    display: flex; border: 1px solid var(--lfabfc-border-strong); overflow: hidden;
}
.lfabfc-coupon__input {
    flex: 1; height: 38px; padding: 0 14px;
    border: none; font-size: 12px; font-weight: 400;
    color: var(--lfabfc-text); background: var(--lfabfc-bg);
    outline: none; letter-spacing: .04em; font-family: var(--lfabfc-font);
}
.lfabfc-coupon__input::placeholder { color: var(--lfabfc-text-light); }
.lfabfc-coupon__btn {
    height: 38px; padding: 0 16px;
    background: var(--lfabfc-primary); color: #fff;
    border: none; border-left: 1px solid var(--lfabfc-border-strong);
    font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
    cursor: pointer; white-space: nowrap; transition: opacity .2s;
    font-family: var(--lfabfc-font);
}
.lfabfc-coupon__btn:hover { opacity: .82; }
.lfabfc-coupon__btn:disabled { opacity: .4; pointer-events: none; }
.lfabfc-coupon__msg { margin-top: 8px; font-size: 11px; min-height: 14px; letter-spacing: .02em; }
.lfabfc-coupon__msg--success { color: var(--lfabfc-success); }
.lfabfc-coupon__msg--error   { color: var(--lfabfc-danger); }
.lfabfc-coupon__applied { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lfabfc-coupon__tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--lfabfc-accent-light); color: #7a5c30;
    border: 1px solid #d4b88a; padding: 4px 10px 4px 8px;
    font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.lfabfc-coupon__remove { background: none; border: none; cursor: pointer; color: #9a7c50; font-size: 13px; line-height: 1; padding: 0; transition: color .12s; outline: none; }
.lfabfc-coupon__remove:hover { color: var(--lfabfc-danger); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.lfabfc-drawer__footer {
    border-top: 1px solid var(--lfabfc-border);
    padding: 20px 28px 24px; flex-shrink: 0;
}
.lfabfc-totals__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--lfabfc-text-muted); margin-bottom: 6px; letter-spacing: .02em; }
.lfabfc-totals__discount { color: var(--lfabfc-success); }
.lfabfc-totals__total { font-size: 13px; font-weight: 500; color: var(--lfabfc-text); margin-bottom: 2px; letter-spacing: .06em; text-transform: uppercase; }
.lfabfc-totals__amount { font-size: 18px; font-weight: 300; letter-spacing: -.01em; }
.lfabfc-totals__tax-note { margin: 0 0 16px; font-size: 11px; color: var(--lfabfc-text-light); letter-spacing: .02em; }
.lfabfc-btn-checkout {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 15px 24px;
    background: var(--lfabfc-primary); color: #fff !important;
    border: none; font-size: 11px; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    text-decoration: none !important; cursor: pointer;
    transition: opacity .2s; font-family: var(--lfabfc-font);
}
.lfabfc-btn-checkout:hover { opacity: .82; color: #fff !important; }
.lfabfc-link-cart { display: block; text-align: center; margin-top: 12px; font-size: 11px; color: var(--lfabfc-text-light); text-decoration: none; letter-spacing: .04em; transition: color .15s; }
.lfabfc-link-cart:hover { color: var(--lfabfc-text-muted); }

/* ── Upsells ─────────────────────────────────────────────────────────────── */
.lfabfc-upsells-wrap { border-top: 1px solid var(--lfabfc-border); flex-shrink: 0; max-height: 300px; overflow-y: auto; }
.lfabfc-upsells { padding: 18px 28px; }
.lfabfc-upsells__title { margin: 0 0 12px; font-size: 10px; font-weight: 500; color: var(--lfabfc-text-light); text-transform: uppercase; letter-spacing: .14em; }
.lfabfc-upsells__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lfabfc-upsell-item { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--lfabfc-border); }
.lfabfc-upsell-item:last-child { border-bottom: none; padding-bottom: 0; }
.lfabfc-upsell-item__img { width: 50px; height: 50px; flex-shrink: 0; overflow: hidden; text-decoration: none; background: var(--lfabfc-bg-subtle); }
.lfabfc-upsell-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--lfabfc-ease); }
.lfabfc-upsell-item__img:hover img { transform: scale(1.06); }
.lfabfc-upsell-item__info { flex: 1; min-width: 0; }
.lfabfc-upsell-item__name { display: block; font-size: 12px; font-weight: 400; color: var(--lfabfc-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; transition: color .15s; }
.lfabfc-upsell-item__name:hover { color: var(--lfabfc-accent); }
.lfabfc-upsell-item__price { font-size: 11px; color: var(--lfabfc-text-muted); }
.lfabfc-upsell-item__add { width: 26px; height: 26px; border-radius: 50%; background: var(--lfabfc-primary); color: #fff; border: none; font-size: 15px; font-weight: 300; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; line-height: 1; transition: opacity .2s, transform .2s; outline: none; }
.lfabfc-upsell-item__add:hover { opacity: .76; transform: scale(1.1); }
.lfabfc-upsell-item__add:disabled { opacity: .3; pointer-events: none; }
.lfabfc-upsell-item__link { font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--lfabfc-text-light); text-decoration: none; white-space: nowrap; transition: color .15s; }
.lfabfc-upsell-item__link:hover { color: var(--lfabfc-text); }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.lfabfc-loading { position: absolute; inset: 0; background: rgba(255,255,255,.65); display: flex; align-items: center; justify-content: center; z-index: 10; }
.lfabfc-spinner { width: 22px; height: 22px; border: 1.5px solid var(--lfabfc-border); border-top-color: var(--lfabfc-primary); border-radius: 50%; animation: lfabfc-spin .8s linear infinite; }
@keyframes lfabfc-spin { to { transform: rotate(360deg); } }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .lfabfc-drawer { width: 100vw; border-left: none; top: auto; bottom: 0; height: 90dvh; border-radius: 14px 14px 0 0; transform: translateY(110%); }
    .lfabfc-drawer--open { transform: translateY(0); }
    .lfabfc-drawer--left { border-right: none; transform: translateY(110%); }
    .lfabfc-drawer--left.lfabfc-drawer--open { transform: translateY(0); }
    .lfabfc-drawer__header, .lfabfc-item, .lfabfc-drawer__footer,
    .lfabfc-coupon, .lfabfc-upsells, .lfabfc-shipping-bar { padding-left: 20px; padding-right: 20px; }
    .lfabfc-trigger--bottom-right { right: 20px; bottom: 20px; }
    .lfabfc-trigger--bottom-left  { left: 20px;  bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .lfabfc-drawer, .lfabfc-overlay, .lfabfc-trigger, .lfabfc-bubble,
    .lfabfc-shipping-bar__fill, .lfabfc-item__img img, .lfabfc-upsell-item__img img { transition: none; }
    .lfabfc-spinner { animation: none; }
}

/* ── Módulo de envío ─────────────────────────────────────────────────────── */
.lfabfc-shipping-section {
    border-top: 1px solid var(--lfabfc-border);
    padding: 16px 28px;
}
.lfabfc-shipping-section__title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 500;
    color: var(--lfabfc-text-muted);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.lfabfc-shipping-section__title svg {
    opacity: .5;
    flex-shrink: 0;
}

/* Formulario de ingreso CP */
.lfabfc-shipping-input-wrap {
    display: flex;
    border: 1px solid var(--lfabfc-border-strong);
    overflow: hidden;
}
.lfabfc-shipping-input {
    flex: 1;
    height: 38px;
    padding: 0 14px;
    border: none;
    font-size: 13px;
    font-weight: 400;
    color: var(--lfabfc-text);
    background: var(--lfabfc-bg);
    outline: none;
    font-family: var(--lfabfc-font);
    letter-spacing: .04em;
}
.lfabfc-shipping-input::placeholder { color: var(--lfabfc-text-light); }
.lfabfc-shipping-calc-btn {
    height: 38px;
    padding: 0 16px;
    background: var(--lfabfc-primary);
    color: #fff;
    border: none;
    border-left: 1px solid var(--lfabfc-border-strong);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s;
    font-family: var(--lfabfc-font);
}
.lfabfc-shipping-calc-btn:hover    { opacity: .82; }
.lfabfc-shipping-calc-btn:disabled { opacity: .4; pointer-events: none; }
.lfabfc-shipping-msg {
    margin-top: 8px;
    font-size: 11px;
    min-height: 14px;
    color: var(--lfabfc-danger);
    letter-spacing: .02em;
}

/* Resultados de métodos */
.lfabfc-shipping-result { }

.lfabfc-shipping-result__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
}
.lfabfc-shipping-result__cp {
    color: var(--lfabfc-text-muted);
    letter-spacing: .02em;
}
.lfabfc-shipping-result__cp strong {
    color: var(--lfabfc-text);
    font-weight: 600;
}
.lfabfc-shipping-change {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 500;
    color: var(--lfabfc-text-muted);
    cursor: pointer;
    text-decoration: underline;
    letter-spacing: .04em;
    padding: 0;
    transition: color .15s;
    font-family: var(--lfabfc-font);
}
.lfabfc-shipping-change:hover { color: var(--lfabfc-text); }

/* Lista de métodos */
.lfabfc-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--lfabfc-border);
}
.lfabfc-shipping-method {
    border-bottom: 1px solid var(--lfabfc-border);
    transition: background .15s;
}
.lfabfc-shipping-method:last-child { border-bottom: none; }
.lfabfc-shipping-method--selected {
    background: #fafaf8;
}
.lfabfc-shipping-method__label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    cursor: pointer;
    width: 100%;
}
.lfabfc-shipping-method__label:hover { background: var(--lfabfc-bg-subtle); }

/* Radio custom */
.lfabfc-shipping-method__radio {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.lfabfc-shipping-radio {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}
.lfabfc-shipping-method__dot {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--lfabfc-border-strong);
    background: var(--lfabfc-bg);
    transition: border-color .15s, background .15s;
    position: relative;
}
.lfabfc-shipping-method__dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lfabfc-primary);
    transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.lfabfc-shipping-radio:checked ~ .lfabfc-shipping-method__dot {
    border-color: var(--lfabfc-primary);
}
.lfabfc-shipping-radio:checked ~ .lfabfc-shipping-method__dot::after {
    transform: translate(-50%, -50%) scale(1);
}
.lfabfc-shipping-method--selected .lfabfc-shipping-method__dot {
    border-color: var(--lfabfc-primary);
}
.lfabfc-shipping-method--selected .lfabfc-shipping-method__dot::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Info del método */
.lfabfc-shipping-method__info { flex: 1; min-width: 0; }
.lfabfc-shipping-method__name {
    font-size: 12px;
    font-weight: 400;
    color: var(--lfabfc-text);
    letter-spacing: .01em;
    line-height: 1.4;
}

/* Precio del método */
.lfabfc-shipping-method__cost {
    font-size: 13px;
    font-weight: 500;
    color: var(--lfabfc-text);
    letter-spacing: .02em;
    white-space: nowrap;
    flex-shrink: 0;
}
.lfabfc-shipping-free {
    color: var(--lfabfc-success);
    font-weight: 600;
}

/* Estado cargando del botón calcular */
.lfabfc-shipping-calc-btn.is-loading {
    pointer-events: none;
    opacity: .6;
}

/* ── Nuevas variables configurables ─────────────────────────────────────── */
:root {
    --lfabfc-hover:      #c9a96e;
    --lfabfc-btn-radius: 2px;
}

/* Aplicar border-radius configurable a todos los botones */
.lfabfc-btn-checkout,
.lfabfc-btn-shop,
.lfabfc-coupon__btn,
.lfabfc-shipping-calc-btn {
    border-radius: var(--lfabfc-btn-radius) !important;
}

/* Aplicar color hover configurable */
.lfabfc-item__name:hover,
.lfabfc-upsell-item__name:hover {
    color: var(--lfabfc-hover) !important;
}

/* ── Fix alineación "+" en círculos de upsell ────────────────────────────── */
.lfabfc-upsell-item__add {
    width: 28px;
    height: 28px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 20px !important;
    font-weight: 300 !important;
    /* Compensación óptica para el símbolo + */
    padding-bottom: 1px !important;
}

/* ── Fix alineación número en bubble flotante ────────────────────────────── */
.lfabfc-bubble {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 5px !important;
    line-height: 1 !important;
    /* Resetear min-height y usar flex para centrado perfecto */
    height: 18px !important;
    min-width: 18px !important;
    /* Color configurable */
    background: var(--lfabfc-accent) !important;
}

/* ── Fix ícono SVG en el trigger ─────────────────────────────────────────── */
.lfabfc-trigger__icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lfabfc-trigger__icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8px;
    display: block;
}

/* ── Upsells colapsables (mobile) ────────────────────────────────────────── */
.lfabfc-upsells-outer {
    border-top: 1px solid var(--lfabfc-border);
    flex-shrink: 0;
}
/* Overridear el border-top del wrap ya que ahora está en outer */
.lfabfc-upsells-wrap {
    border-top: none !important;
}

.lfabfc-upsells-toggle {
    display: none; /* JS lo muestra cuando hay upsells */
    width: 100%;
    padding: 13px 28px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--lfabfc-border);
    cursor: pointer;
    font-family: var(--lfabfc-font);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--lfabfc-text-muted);
    align-items: center;
    justify-content: space-between;
    transition: background .15s;
    outline: none;
}
.lfabfc-upsells-toggle:hover { background: var(--lfabfc-bg-subtle); }
.lfabfc-upsells-toggle__label { flex: 1; text-align: left; }
.lfabfc-upsells-toggle__arrow {
    transition: transform .25s var(--lfabfc-ease);
    flex-shrink: 0;
    opacity: .5;
}
.lfabfc-upsells-toggle[aria-expanded="false"] .lfabfc-upsells-toggle__arrow {
    transform: rotate(-90deg);
}

/* Animación del collapse */
.lfabfc-upsells-wrap {
    overflow: hidden;
    transition: max-height .3s var(--lfabfc-ease), opacity .25s;
    max-height: 400px;
    opacity: 1;
}
.lfabfc-upsells-wrap--collapsed {
    max-height: 0 !important;
    opacity: 0;
}

/* El toggle se activa via JS tanto en desktop como mobile */

/* ── Icon picker en admin ─────────────────────────────────────────────────── */
/* (se aplica solo en el admin, pero lo incluimos acá por conveniencia) */

/* ── Badge de descuento en ítems ─────────────────────────────────────────── */
.lfabfc-item__discount-badge {
    display: inline-block;
    padding: 2px 7px;
    background: var(--lfabfc-accent-light);
    color: #7a5c30;
    border: 1px solid #d4b88a;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    border-radius: 2px;
    margin-top: 2px;
    align-self: flex-start;
}

/* Compatibilidad con descuentos WCDPR — el precio del ítem puede tener del/ins */
.lfabfc-item__price del {
    opacity: .45;
    font-size: 11px;
    font-weight: 400;
    margin-right: 4px;
    text-decoration: line-through;
}
.lfabfc-item__price ins {
    text-decoration: none;
    color: var(--lfabfc-accent);
    font-weight: 600;
}

/* ── Animación del trigger (cuando auto-open está desactivado) ───────────── */
@keyframes lfabfc-bounce {
    0%   { transform: scale(1) translateY(0); }
    20%  { transform: scale(1.18) translateY(-4px); }
    40%  { transform: scale(0.95) translateY(0); }
    60%  { transform: scale(1.08) translateY(-2px); }
    80%  { transform: scale(0.98) translateY(0); }
    100% { transform: scale(1) translateY(0); }
}
@keyframes lfabfc-bubble-pop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.5); }
    60%  { transform: scale(0.88); }
    100% { transform: scale(1); }
}
.lfabfc-trigger--bounce {
    animation: lfabfc-bounce .7s cubic-bezier(.36,.07,.19,.97) both;
}
.lfabfc-bubble--pulse {
    animation: lfabfc-bubble-pop .5s cubic-bezier(.36,.07,.19,.97) both;
}

/* ── Fix definitivo alineación "+" en círculos ───────────────────────────── */
/* El símbolo + en algunos fonts tiene descenso óptico — forzar SVG en su lugar */
.lfabfc-upsell-item__add {
    width: 28px !important;
    height: 28px !important;
    font-size: 0 !important; /* ocultar el texto + */
    position: relative;
}
/* Usar pseudo-elemento para el + perfectamente centrado */
.lfabfc-upsell-item__add::before,
.lfabfc-upsell-item__add::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 1px;
}
.lfabfc-upsell-item__add::before {
    width: 12px; height: 1.5px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.lfabfc-upsell-item__add::after {
    width: 1.5px; height: 12px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

/* ── Bundle styles ───────────────────────────────────────────────────────── */
.lfabfc-item--bundle {
    background: #fafaf8;
    border-left: 3px solid var(--lfabfc-accent);
}
.lfabfc-bundle-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7a5c30;
    background: var(--lfabfc-accent-light);
    border: 1px solid #d4b88a;
    padding: 2px 8px;
    border-radius: 2px;
    margin-bottom: 4px;
    align-self: flex-start;
}
.lfabfc-bundle-contents {
    list-style: none;
    margin: 6px 0 6px;
    padding: 8px 10px;
    background: rgba(0,0,0,.03);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lfabfc-bundle-child {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 11px;
    color: var(--lfabfc-text-muted);
    line-height: 1.4;
}
.lfabfc-bundle-child__qty {
    font-weight: 600;
    color: var(--lfabfc-accent);
    flex-shrink: 0;
    font-size: 11px;
}
.lfabfc-bundle-child__name {
    flex: 1;
    color: var(--lfabfc-text);
}
.lfabfc-bundle-child__attrs {
    color: var(--lfabfc-text-light);
    font-size: 10px;
    flex-shrink: 0;
}
.lfabfc-bundle-qty {
    font-size: 11px;
    color: var(--lfabfc-text-muted);
    letter-spacing: .02em;
}

/* ── Z-index: drawer siempre sobre el menú del tema ─────────────────────── */
/* Los menús de Divi y otros theme builders usan z-index hasta ~1000000 */
:root {
    --lfabfc-z: 10000000; /* Por encima de cualquier menú de tema */
}
/* El overlay y el drawer heredan del root */
.lfabfc-overlay  { z-index: calc(var(--lfabfc-z) + 1) !important; }
.lfabfc-drawer   { z-index: calc(var(--lfabfc-z) + 2) !important; }
.lfabfc-trigger  { z-index: var(--lfabfc-z) !important; }
