/* Cotizador de Baterías — frontend (v1.4: buscador → baterías con precio → ficha)
   Colores de marca: primario #00499d · secundario #1B2333 · tipografía Manrope.
   Todo está bajo .bc-cotizador y usa variables, así se puede ajustar desde el tema. */

.bc-cotizador {
    --bc-primary: #00499d;
    --bc-primary-600: #003d84;
    --bc-primary-50: #eef4fb;
    --bc-primary-100: #d9e6f5;
    --bc-secondary: #1b2333;
    --bc-text: #1b2333;
    --bc-muted: #5d6677;
    --bc-border: #d5dbe5;
    --bc-bg: #ffffff;
    --bc-bg-soft: #f3f5f8;
    --bc-pedir: #f7941d;
    --bc-pedir-600: #e58207;
    --bc-wa: #17964a;
    --bc-wa-600: #117a3b;
    --bc-radius: 14px;
    --bc-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    font-family: var(--bc-font);
    color: var(--bc-text);
    max-width: 760px;
    margin: 0 auto;
    box-sizing: border-box;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    scroll-margin-top: 110px; /* deja lugar a un header fijo del tema al volver arriba */
    container-type: inline-size;
    container-name: bc;
}
.bc-cotizador *, .bc-cotizador *::before, .bc-cotizador *::after { box-sizing: border-box; }
.bc-cotizador svg { display: block; }
.bc-cotizador [hidden] { display: none !important; }
.bc-cotizador ul { list-style: none; margin: 0; padding: 0; }
.bc-cotizador li { margin: 0; padding: 0; }
.bc-cotizador li::before { content: none; }
.bc-cotizador button { font-family: var(--bc-font); letter-spacing: 0; text-transform: none; box-shadow: none; }

.bc-in { animation: bc-in .28s ease both; }
@keyframes bc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- Encabezado (opcional) --- */
.bc-head { margin-bottom: 18px; }
.bc-cotizador .bc-title { font-family: var(--bc-font); font-size: clamp(22px, 5cqw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--bc-secondary); margin: 0 0 6px; }
.bc-cotizador .bc-sub { margin: 0; color: var(--bc-muted); font-size: 15px; }

/* --- Pantalla 1: buscador --- */
.bc-search { position: relative; }
.bc-search-icon { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: #8a93a3; pointer-events: none; }
.bc-cotizador .bc-search-input {
    width: 100%; height: 58px; margin: 0; padding: 0 48px 0 50px;
    font-family: var(--bc-font); font-size: 17px; font-weight: 600; color: var(--bc-text);
    background: var(--bc-bg); border: 1.5px solid #aab3c2; border-radius: 12px;
    box-shadow: none; outline: none; -webkit-appearance: none; appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
.bc-cotizador .bc-search-input::placeholder { color: #8a93a3; font-weight: 500; opacity: 1; }
.bc-cotizador .bc-search-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.bc-cotizador .bc-search-input:focus { border-color: var(--bc-primary); box-shadow: 0 0 0 4px rgba(0, 73, 157, .14); }
.bc-cotizador .bc-search-clear {
    position: absolute; right: 8px; top: 50%; width: 38px; height: 38px; margin-top: -19px; padding: 0;
    display: grid; place-items: center; font-size: 24px; line-height: 1; color: var(--bc-muted);
    background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.bc-cotizador .bc-search-clear:hover { background: var(--bc-bg-soft); color: var(--bc-text); }
.bc-cotizador .bc-search-hint { margin: 10px 2px 0; min-height: 0; font-size: 13px; font-weight: 600; color: var(--bc-muted); }
.bc-cotizador .bc-search-hint:empty { display: none; }

.bc-cotizador .bc-vlist { margin-top: 12px; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); overflow: hidden; background: var(--bc-bg); transition: opacity .15s; }
.bc-cotizador .bc-vlist:empty { display: none; }
.bc-screen-buscar.is-loading .bc-vlist { opacity: .45; }
.bc-cotizador .bc-vlist li + li { border-top: 1px solid var(--bc-border); }
.bc-cotizador .bc-vrow {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; margin: 0; padding: 10px 14px;
    text-align: left; color: var(--bc-text); background: var(--bc-bg); border: 0; border-radius: 0; cursor: pointer;
    transition: background .12s;
}
.bc-cotizador .bc-vrow:hover, .bc-cotizador .bc-vrow:focus-visible { background: var(--bc-primary-50); color: var(--bc-text); outline: none; }
.bc-cotizador .bc-vrow:focus-visible { box-shadow: inset 0 0 0 2px var(--bc-primary); }
.bc-vrow-logo { flex: none; width: 46px; height: 40px; display: grid; place-items: center; }
.bc-vrow-logo img { max-width: 46px; max-height: 38px; width: auto; height: auto; object-fit: contain; display: block; }
.bc-vrow-text { flex: 1; min-width: 0; display: block; }
.bc-vrow-text strong { display: block; font-size: 15px; font-weight: 800; line-height: 1.25; color: var(--bc-secondary); letter-spacing: -.005em; }
.bc-vrow-text small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--bc-muted); }
.bc-vrow-go { flex: none; color: #a3acbb; transition: transform .15s, color .15s; }
.bc-vrow-go svg { width: 18px; height: 18px; }
.bc-vrow:hover .bc-vrow-go { color: var(--bc-primary); transform: translateX(2px); }

.bc-more-wrap { margin-top: 12px; text-align: center; }
.bc-cotizador .bc-more {
    font-size: 14px; font-weight: 700; color: var(--bc-primary); background: var(--bc-bg);
    border: 1.5px solid var(--bc-primary-100); border-radius: 10px; padding: 11px 20px; margin: 0; cursor: pointer; line-height: 1.2;
}
.bc-cotizador .bc-more:hover { background: var(--bc-primary-50); border-color: var(--bc-primary); color: var(--bc-primary); }

.bc-cotizador .bc-vempty { padding: 24px 20px; text-align: center; background: var(--bc-bg-soft); border-radius: var(--bc-radius); }
.bc-cotizador div.bc-vempty { margin-top: 16px; border: 1px dashed var(--bc-border); }
.bc-vempty strong { display: block; font-size: 17px; font-weight: 800; color: var(--bc-secondary); }
.bc-cotizador .bc-vempty p { margin: 6px auto 16px; max-width: 420px; font-size: 14px; color: var(--bc-muted); }
.bc-vempty .bc-btn { width: auto; }

/* --- Volver --- */
.bc-cotizador .bc-back {
    display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px -6px; padding: 8px 12px 8px 6px;
    font-size: 14px; font-weight: 700; color: var(--bc-primary); background: transparent; border: 0; border-radius: 8px; cursor: pointer; line-height: 1.2;
}
.bc-cotizador .bc-back:hover { background: var(--bc-primary-50); color: var(--bc-primary); }
.bc-back svg { width: 18px; height: 18px; }

/* --- Pantalla 2: vehículo + baterías --- */
.bc-veh { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--bc-border); }
.bc-veh-logo { flex: none; width: 64px; height: 56px; display: grid; place-items: center; }
.bc-veh-logo:empty { display: none; }
.bc-veh-logo img { max-width: 64px; max-height: 54px; width: auto; height: auto; object-fit: contain; display: block; }
.bc-veh-text { min-width: 0; }
.bc-cotizador .bc-veh-name { margin: 0; font-family: var(--bc-font); font-size: clamp(17px, 4.6cqw, 22px); font-weight: 800; line-height: 1.2; color: var(--bc-secondary); letter-spacing: -.01em; }
.bc-cotizador .bc-veh-years { margin: 3px 0 0; font-size: 15px; font-weight: 500; color: var(--bc-muted); }

.bc-cotizador .bc-section { margin: 22px 0 10px; font-family: var(--bc-font); font-size: 18px; font-weight: 800; line-height: 1.2; color: var(--bc-secondary); letter-spacing: -.01em; }

.bc-bats { display: grid; gap: 12px; }

.bc-cotizador .bc-bats li { display: flex; align-items: stretch; }

.bc-cotizador .bc-bat {
    display: flex; align-items: center; gap: 16px; width: 100%; margin: 0; padding: 14px;
    text-align: left; color: var(--bc-text); background: var(--bc-bg);
    border: 1.5px solid var(--bc-border); border-radius: var(--bc-radius); cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    height: 100%;
}
.bc-cotizador .bc-bat:hover, .bc-cotizador .bc-bat:focus-visible {
    border-color: var(--bc-primary); background: var(--bc-bg); color: var(--bc-text);
    box-shadow: 0 12px 26px -16px rgba(0, 73, 157, .55); transform: translateY(-1px); outline: none;
}
.bc-bat-foto, .bc-det-foto { flex: none; 
    display: flex; /* Cambiamos grid por flex para mejor control del centrado */
    align-items: center; 
    justify-content: center;
    overflow: hidden; 
    border-radius: 10px; 
    background: var(--bc-bg); }
.bc-bat-foto { width: 42%; 
    max-width: 160px; 
    aspect-ratio: 4 / 3; }

.bc-bat-foto img, .bc-det-foto img { 
   width: 100%; 
    height: 100%; 
    max-height: 100%; /* Fuerza a que no exceda el alto del contenedor */
    object-fit: contain; /* Muestra la batería completa sin recortarla */
    object-position: center;
    display: block;
}

.bc-bat-foto.is-vacia, .bc-det-foto.is-vacia { align-content: center; gap: 6px; background: var(--bc-primary-50); color: var(--bc-primary); }
.bc-bat-foto.is-vacia svg, .bc-det-foto.is-vacia svg { width: 46px; height: 36px; }
.bc-bat-foto.is-vacia em, .bc-det-foto.is-vacia em { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.bc-bat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bc-bat-name { font-size: clamp(15px, 4.2cqw, 19px); font-weight: 600; line-height: 1.2; color: var(--bc-secondary); }
.bc-bat-price { font-size: clamp(24px, 7.4cqw, 34px); font-weight: 800; line-height: 1.1; color: var(--bc-secondary); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bc-bat-noprice { font-size: 15px; font-weight: 700; color: var(--bc-muted); }
.bc-bat-more { display: inline-flex; align-items: center; gap: 2px; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--bc-primary); }
.bc-bat-more svg { width: 14px; height: 14px; transition: transform .15s; }
.bc-bat:hover .bc-bat-more svg { transform: translateX(3px); }

/* --- Pantalla 3: ficha de la batería --- */
.bc-det-top { display: flex; align-items: center; gap: 18px; }
.bc-det-foto { width: 44%; max-width: 300px; aspect-ratio: 4 / 3; }
.bc-det-head { flex: 1; min-width: 0; }
.bc-cotizador .bc-det-name { margin: 0; font-family: var(--bc-font); font-size: clamp(18px, 5cqw, 26px); font-weight: 600; line-height: 1.15; color: var(--bc-secondary); }
.bc-cotizador .bc-det-price { margin: 8px 0 0; font-size: clamp(30px, 9cqw, 44px); font-weight: 800; line-height: 1.05; color: var(--bc-secondary); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bc-cotizador .bc-det-noprice { margin: 8px 0 0; font-size: 17px; font-weight: 700; color: var(--bc-muted); }
.bc-cotizador .bc-det-para { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--bc-muted); }

.bc-cotizador .bc-det-sub { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--bc-primary); line-height: 1.35; }

/* Los dos botones de la ficha miden exactamente lo mismo: solo cambia el color */
.bc-det-cta { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 22px auto 6px; max-width: 760px; }
.bc-cotizador .bc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 54px; min-height: 54px; padding: 0 20px; margin: 0;
    font-family: var(--bc-font); font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: 0; text-align: center; white-space: nowrap;
    border: 0; border-radius: 999px; text-decoration: none; box-shadow: none; cursor: pointer;
    transition: background .15s, transform .15s;
}
.bc-cotizador .bc-btn:active { transform: scale(.98); }
.bc-cotizador .bc-btn:focus-visible { outline: 3px solid rgba(0, 73, 157, .35); outline-offset: 2px; }
.bc-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.bc-cotizador .bc-btn-pedir { color: #1b1b1b; background: var(--bc-pedir); }
.bc-cotizador .bc-btn-pedir:hover, .bc-cotizador .bc-btn-pedir:focus-visible { background: var(--bc-pedir-600); color: #1b1b1b; text-decoration: none; }
.bc-cotizador .bc-btn-wa { color: #fff; background: var(--bc-wa); }
.bc-cotizador .bc-btn-wa:hover, .bc-cotizador .bc-btn-wa:focus-visible { background: var(--bc-wa-600); color: #fff; text-decoration: none; }
.bc-vempty .bc-btn { width: auto; }

.bc-cotizador .bc-det-desc { margin: 0; font-size: 15px; line-height: 1.6; color: #3a4354; white-space: pre-line; }
.bc-cotizador .bc-specs { margin: 0; padding: 0; border: 1px solid var(--bc-border); border-radius: 12px; overflow: hidden; }
.bc-specs > div { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 14px; }
.bc-specs > div:nth-child(odd) { background: var(--bc-bg-soft); }
.bc-cotizador .bc-specs dt { margin: 0; font-size: 14px; font-weight: 500; color: var(--bc-muted); }
.bc-cotizador .bc-specs dd { flex: 0 1 auto; max-width: 62%; overflow-wrap: anywhere; margin: 0; font-size: 15px; font-weight: 700; color: var(--bc-secondary); text-align: right; font-variant-numeric: tabular-nums; }

/* Listas de la ficha: compatibilidad, beneficios, disponibilidad */
.bc-cotizador .bc-list { display: grid; gap: 8px; }
.bc-cotizador .bc-list li { position: relative; padding-left: 28px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--bc-secondary); }
.bc-cotizador .bc-list-check li::before {
    content: ''; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--bc-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.bc-cotizador .bc-list-dot li::before { content: ''; position: absolute; left: 6px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--bc-primary); }

/* --- Estados --- */
.bc-alert { padding: 14px 16px; border-radius: 12px; background: #fff4f2; color: #9b2c1c; font-weight: 600; font-size: 14px; }
.bc-loading { display: flex; justify-content: center; gap: 6px; padding: 48px 0; }
.bc-loading span { width: 9px; height: 9px; border-radius: 50%; background: var(--bc-primary); animation: bc-dot 1s ease-in-out infinite; }
.bc-loading span:nth-child(2) { animation-delay: .15s; }
.bc-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bc-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

/* --- Pantallas anchas: los dos botones de la ficha van lado a lado --- */
@container bc (min-width: 620px) {
    .bc-det-cta { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .bc-cotizador *, .bc-cotizador *::before, .bc-cotizador *::after { animation: none !important; transition: none !important; }
}