/* ==========================================================================
   Carrito lateral Brookville (tema hijo)
   1. Barra de envío gratis   2. Panel   3. Recomendaciones   4. Pie, descuento y pago
   ========================================================================== */

/* 1. Barra de envío gratis ------------------------------------------------ */
.envio-gratis-wrapper.envio-gratis-barra {
    background: #EEF0F7;
    color: #1b1b1f;
    padding: 14px 24px 12px;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
}
/* El contenedor del shortcode en Bricks trae su propio fondo y relleno: se anulan. */
.brxe-shortcode:has(> .envio-gratis-barra) {
    background: #EEF0F7 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.envio-gratis-barra .envio-gratis-texto { margin: 0 0 10px; }
.envio-gratis-barra .envio-gratis-texto strong { color: #434E7F; font-weight: 700; }
.envio-gratis-barra .envio-gratis-pista { position: relative; height: 6px; border-radius: 6px; background: #d3d7e8; }
.envio-gratis-barra .envio-gratis-relleno { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: #434E7F; transition: width 0.5s; }
.envio-gratis-barra .envio-gratis-camion {
    position: absolute; right: -1px; top: 50%; width: 26px; height: 26px; margin-top: -13px;
    border-radius: 50%; background: #fff; border: 2px solid #d3d7e8;
    display: flex; align-items: center; justify-content: center; color: #434E7F;
    transition: background 0.4s, border-color 0.4s, color 0.4s;
}
.envio-gratis-barra .envio-gratis-camion svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.envio-gratis-barra.envio-gratis-conseguido .envio-gratis-camion { background: #434E7F; border-color: #434E7F; color: #fff; }
.envio-gratis-barra .envio-gratis-escala { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: #7a7d8c; }

/* 2. Panel ------------------------------------------------------------------ */
/* Cabecera */
.bu-oc-panel #brxe-yvmzpx { padding: 14px 24px; border-bottom: 1px solid #e8e4de; }
.bu-oc-panel #brxe-prbfxr { margin: 0; }

/* Zona central con scroll: líneas del carrito + recomendaciones */
.bu-oc-panel #brxe-sjcuzh { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 24px; }
.bu-oc-panel .bu-minicart-wrap .brxe-zeelso {
    display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start;
    padding: 14px 0; margin: 0; border-bottom: 1px solid #e8e4de;
}
.bu-oc-panel .brxe-zeelso .brxe-crajcu { width: 72px; }
.bu-oc-panel .brxe-zeelso .brxe-crajcu img { width: 72px; height: 96px; object-fit: cover; display: block; }
.bu-oc-panel .brxe-zeelso .brxe-tpggjk {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; width: 100%; padding: 0;
}
.bu-oc-panel .brxe-zeelso .brxe-wmjzvt { grid-column: 1 / -1; margin: 2px 0 0; }
.bu-oc-panel .brxe-zeelso .brxe-mpgjyp { grid-column: 1 / -1; }
.bu-oc-panel .brxe-zeelso .brxe-vyemzq { grid-column: 1; grid-row: 4; display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.bu-oc-panel .brxe-zeelso .brxe-rakygc { display: contents; }
.bu-oc-panel .brxe-zeelso .brxe-tchgec { grid-column: 1 / -1; }
.bu-oc-panel .brxe-zeelso .brxe-tbaztc { grid-column: 2; grid-row: 4; margin-top: 8px; text-align: right; }
.bu-oc-panel .brxe-zeelso .product-remove a.remove { font-size: 0; color: #7a7d8c; text-decoration: underline; background: none; width: auto; height: auto; }
.bu-oc-panel .brxe-zeelso .product-remove a.remove i { display: none; }
.bu-oc-panel .brxe-zeelso .product-remove a.remove::after { content: "Eliminar"; font-size: 11px; }

/* 3. Recomendaciones --------------------------------------------------------- */
.bk-recs { padding: 18px 0 14px; }
.bk-recs__h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 14px; font-weight: 500; }
.bk-recs__nav button { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; color: #1b1b1f; }
.bk-recs__row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bk-recs__row::-webkit-scrollbar { display: none; }
.bk-rec { flex: 0 0 calc((100% - 24px) / 3); scroll-snap-align: start; display: flex; flex-direction: column; min-width: 0; }
.bk-rec__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: #eee; }
.bk-rec__n { margin: 8px 0 2px; font-size: 12px; line-height: 1.3; height: 2.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; }
.bk-rec__p { font-size: 12px; font-weight: 600; text-align: center; }
.bk-rec__p del { font-weight: 400; color: #888; margin-right: 5px; }
.bk-rec__p ins { text-decoration: none; }
.bk-rec__sz { position: relative; margin-top: 6px; height: 30px; }
.bk-rec__sel { appearance: none; -webkit-appearance: none; width: 100%; height: 30px; padding: 0 22px 0 8px; border: 1px solid #e8e4de; border-radius: 0; background: #fff; font: inherit; font-size: 11px; color: #1b1b1f; cursor: pointer; }
.bk-rec__sel:focus { outline: 0; border-color: #434E7F; }
.bk-rec__sz::after { content: ""; position: absolute; right: 9px; top: 10px; width: 6px; height: 6px; border-right: 1.5px solid #1b1b1f; border-bottom: 1.5px solid #1b1b1f; transform: rotate(45deg); pointer-events: none; }
.bk-rec__sz--u { display: flex; align-items: center; justify-content: center; border: 1px dashed #e8e4de; font-size: 11px; color: #7a7d8c; }
.bk-rec__sz--u::after { display: none; }
.bk-rec__sz.bk-err .bk-rec__sel { border-color: #c0392b; animation: bk-shake 0.3s; }
@keyframes bk-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.bk-rec__add { display: flex; align-items: center; justify-content: center; margin-top: 6px; width: 100%; height: 32px; padding: 0; border: 1px solid #434E7F; border-radius: 0; box-shadow: none; background: #fff; color: #434E7F; font: inherit; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; cursor: pointer; transition: 0.2s; }
.bk-rec__add:hover { background: #434E7F; border-color: #434E7F; color: #fff; }
.bk-rec__add.bk-load { opacity: 0.5; pointer-events: none; }

/* 4. Pie: descuento, botones y métodos de pago --------------------------------- */
.bu-oc-panel #brxe-jlpauv { flex: 0 0 auto; padding: 4px 24px 14px; border-top: 1px solid #e8e4de; background: #fff; }
.bu-oc-panel #brxe-axiaex { padding: 10px 0 12px; border-top: 1px solid #e8e4de; }
.bk-dc { margin-bottom: 2px; }
.bk-dc__b { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; color: #1b1b1f; }
.bk-dc__b svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 0.25s; }
.bk-dc.bk-on .bk-dc__b svg { transform: rotate(180deg); }
.bk-dc__f { display: none; gap: 8px; padding: 0 0 6px; }
.bk-dc.bk-on .bk-dc__f { display: flex; }
.bk-dc__f input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid #e8e4de; border-radius: 0; font: inherit; font-size: 13px; text-transform: uppercase; }
.bk-dc__f input:focus { outline: 0; border-color: #434E7F; }
.bk-dc__f button { display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 18px; border: 0; border-radius: 0; box-shadow: none; background: #434E7F; color: #fff; font: inherit; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; cursor: pointer; }
.bk-dc__m { display: none; padding: 0 0 10px; font-size: 11px; color: #c0392b; }
.bk-dc__m.bk-show { display: block; }
.bk-sum:empty { display: none; }
.bk-sum { padding: 0 0 10px; }
.bk-dsc { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #434E7F; padding: 0 0 6px; }
.bk-dsc button { border: 0; background: none; font: inherit; font-size: 11px; color: #7a7d8c; text-decoration: underline; cursor: pointer; margin-left: 8px; padding: 0; }
.bk-sum__t { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: #1b1b1f; padding: 6px 0 0; border-top: 1px solid #e8e4de; }

.bu-oc-panel #brxe-cbijnm { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 0; margin: 0; padding: 0; }
.bu-oc-panel #brxe-cbijnm a.bricks-background-secondary { order: 1; flex: 1 1 100%; width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; background: #434E7F; color: #fff; border: 0; border-radius: 0; }
.bu-oc-panel #brxe-cbijnm a.bricks-background-primary { order: 2; flex: 1 1 auto; width: auto; height: auto; padding: 0; background: none; border: 0; color: #1b1b1f; text-decoration: underline; justify-content: flex-start; }
.bk-pay { order: 3; display: flex; align-items: center; }
.bk-pay img { display: block; height: 24px; width: auto; max-width: 100%; }

/* El botón de WhatsApp no debe tapar el pago con el carrito abierto */
body:has(#brxe-glyfcf:not(.bu-hide-panel)) .joinchat { display: none !important; }
