.quoteModal{
    position: fixed;
    inset: 0;
    background: rgba(32, 31, 27, 0.62);
    display: grid;
    place-items: center;
    z-index: 2147483646;
    padding: 26px;
    overscroll-behavior: contain;
    backdrop-filter: blur(6px);
}
.quoteModal[hidden]{
    display: none;
}
.quoteModalDialog{
    position: relative;
    width: min(580px, 96vw);
    max-height: 88vh;
    background: #fff;
    border: 1px solid rgba(37, 35, 29, 0.1);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 34px 90px rgba(37, 35, 29, 0.28);
}
.quoteModalDialog.is-iframe-active{
    width: min(1100px, 96vw);
    height: min(820px, 88vh);
}
.quoteModalHeader{
    padding: 28px 78px 18px 28px;
    background: #fff;
    border-bottom: 1px solid rgba(37, 35, 29, 0.1);
}
.quoteModalTitle{
    margin: 0;
    color: #25231d;
    font-family: "Roboto", sans-serif;
    font-size: clamp(1.55rem, 2.2vw, 2.05rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
}
.quoteModalStep{
    padding: 26px 28px 30px;
    background: linear-gradient(180deg, #fff 0%, #faf9f7 100%);
}
.quoteModalStepFrame{
    padding: 0;
    height: calc(min(820px, 88vh) - 78px);
    background: #fff;
}
.quoteModalForm{
    display: grid;
    gap: 18px;
    color: #25231d;
    font-family: "Roboto", sans-serif;
}
.quoteModalFieldset{
    border: 0;
    border-radius: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.quoteModalFieldset legend{
    grid-column: 1 / -1;
    width: 100%;
    padding: 0;
    margin: 0 0 2px;
    color: #25231d;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}
.quoteModalRadio{
    position: relative;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 13px 14px;
    border: 1px solid rgba(37, 35, 29, 0.16);
    border-radius: 14px;
    background: #fff;
    color: #25231d;
    font-size: 0.98rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(37, 35, 29, 0.045);
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.quoteModalRadio:hover{
    border-color: rgba(211, 38, 25, 0.42);
    box-shadow: 0 12px 28px rgba(37, 35, 29, 0.08);
    transform: translateY(-1px);
}
.quoteModalRadio:active{
    transform: translateY(0) scale(0.99);
}
.quoteModalRadio input{
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: var(--color1, #d32619);
}
.quoteModalRadio span{
    display: block;
    line-height: 1.1;
}
.quoteModalRadio:has(input:checked){
    border-color: var(--color1, #d32619);
    background: #fff4f2;
    color: #b92218;
    box-shadow: inset 0 0 0 1px var(--color1, #d32619), 0 14px 34px rgba(211, 38, 25, 0.16);
}
.quoteModalRadio:has(input:focus-visible){
    outline: 3px solid rgba(211, 38, 25, 0.22);
    outline-offset: 3px;
}
.quoteModalRow{
    display: grid;
    gap: 8px;
}
.quoteModalLabel{
    font-size: 0.82rem;
    font-weight: 900;
    color: #25231d;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}
.quoteModalSelect{
    width: 100%;
    height: 54px;
    border-radius: 14px;
    border: 1px solid rgba(37, 35, 29, 0.16);
    background: #fff;
    color: #25231d;
    padding: 0 44px 0 14px;
    font-family: "Roboto", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 35, 29, 0.045);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.quoteModalSelect:focus{
    border-color: var(--color1, #d32619);
    box-shadow: 0 0 0 4px rgba(211, 38, 25, 0.14), 0 10px 26px rgba(37, 35, 29, 0.08);
    outline: 0;
}
.quoteModalSelect option{
    color: #25231d;
}
.quoteModalAlert{
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(211, 38, 25, 0.2);
    background: #fff4f2;
    color: #b92218;
    font-size: 0.93rem;
    font-weight: 800;
}
.quoteModalNext{
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
    border: 0;
    background: var(--color1, #d32619);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 16px 32px rgba(211, 38, 25, 0.24);
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}
.quoteModalNext:hover:not([disabled]){
    background: #bd2419;
    box-shadow: 0 18px 38px rgba(211, 38, 25, 0.3);
    transform: translateY(-1px);
}
.quoteModalNext:active:not([disabled]){
    transform: translateY(0) scale(0.99);
}
.quoteModalNext[disabled]{
    opacity: 0.48;
    cursor: not-allowed;
    animation: none;
    box-shadow: none;
}
.quoteModalFrame{
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.quoteModalClose{
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(37, 35, 29, 0.12);
    background: #f4f2ef;
    color: #25231d;
    font-size: 1.8rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 1;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.quoteModalClose:hover{
    background: var(--color1, #d32619);
    color: #fff;
}
.quoteModalClose:active{
    transform: scale(0.96);
}
.quoteModalClose:focus-visible{
    outline: 3px solid rgba(211, 38, 25, 0.24);
    outline-offset: 3px;
}

@media (max-width: 768px){
    .quoteModal{
        padding: 14px;
        align-items: end;
    }
    .quoteModalDialog{
        width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
    }
    .quoteModalDialog.is-iframe-active{
        width: 100%;
        height: 92vh;
    }
    .quoteModalHeader{
        padding: 22px 68px 16px 20px;
    }
    .quoteModalStep{
        padding: 20px;
    }
    .quoteModalStepFrame{
        height: calc(92vh - 70px);
    }
    .quoteModalFieldset{
        grid-template-columns: 1fr;
    }
    .quoteModalClose{
        top: 12px;
        right: 12px;
    }
}

/* ===========================================================================
   Cotizador propio (reemplaza al iframe): pasos, unidades y datos.
   ======================================================================== */

.quoteModalDialog.is-wide { max-width: 720px; }

/* Indicador de pasos */
.quoteSteps {
    display: flex;
    gap: 18px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    font-size: .74rem;
    letter-spacing: .02em;
    color: #9a938a;
}

.quoteStep { display: flex; align-items: center; gap: 7px; }

.quoteStep span {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-size: .68rem;
    font-weight: 600;
}

.quoteStep.is-active { color: #c4281a; font-weight: 600; }
.quoteStep.is-done { color: #1c1a17; }
.quoteStep.is-done span { background: #1c1a17; border-color: #1c1a17; color: #fff; }

/* Listado de unidades */
.quoteUnitsHead { display: grid; gap: 12px; margin-bottom: 14px; }
.quoteUnitsLead { margin: 0; font-weight: 600; color: #1c1a17; }

.quoteUnitsFilters { display: flex; flex-wrap: wrap; gap: 7px; }

.quoteChip {
    padding: 6px 13px;
    border: 1px solid #e0ddd7;
    border-radius: 999px;
    background: #fff;
    color: #5d5951;
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.quoteChip:hover { border-color: #c8c4bc; }
.quoteChip[aria-pressed="true"] { background: #1c1a17; border-color: #1c1a17; color: #fff; }

.quoteUnitsState {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 26px 4px;
    color: #7a756c;
    font-size: .9rem;
}

.quoteUnitsList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin: 0 0 18px;
    padding: 2px;
    list-style: none;
    max-height: 46vh;
    overflow-y: auto;
}

.quoteUnitBtn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e0ddd7;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.quoteUnitBtn:hover {
    border-color: #c4281a;
    box-shadow: 0 6px 18px -12px rgba(28, 26, 23, .4);
    transform: translateY(-1px);
}

.quoteUnitNum {
    flex: none;
    padding: 5px 9px;
    border-radius: 8px;
    background: #f6f5f3;
    font-size: .78rem;
    font-weight: 600;
    color: #45423b;
}

.quoteUnitBody { display: grid; gap: 2px; min-width: 0; }
.quoteUnitBody b { font-size: .92rem; color: #1c1a17; }
.quoteUnitBody small { font-size: .76rem; color: #7a756c; }

.quoteUnitPrice {
    margin-left: auto;
    display: grid;
    justify-items: end;
    font-size: .68rem;
    color: #9a938a;
    text-align: right;
}

.quoteUnitPrice b { font-size: .86rem; color: #c4281a; }

/* Unidad elegida */
.quoteChosen {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 11px 14px;
    border: 1px solid #f3cdc7;
    border-radius: 12px;
    background: #fdf0ee;
}

.quoteChosenNum { font-weight: 700; color: #1c1a17; }
.quoteChosenMeta { font-size: .84rem; color: #7a756c; }

.quoteChosenChange {
    margin-left: auto;
    border: 0;
    background: none;
    color: #c4281a;
    font: inherit;
    font-size: .82rem;
    text-decoration: underline;
    cursor: pointer;
}

/* Formulario de datos */
.quoteFieldGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.quoteField { display: grid; gap: 5px; }
.quoteFieldWide { grid-column: 1 / -1; }

.quoteField label { font-size: .78rem; font-weight: 600; color: #45423b; }

.quoteField input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0ddd7;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: .92rem;
    color: #1c1a17;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.quoteField input:focus {
    outline: none;
    border-color: #c4281a;
    box-shadow: 0 0 0 3px rgba(196, 40, 26, .12);
}

.quoteHint { font-size: .74rem; color: #9a938a; }

.quoteExtras { display: grid; gap: 8px; margin-bottom: 10px; }

.quoteCheck {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: .86rem;
    color: #45423b;
    cursor: pointer;
}

.quoteCheck input { width: 16px; height: 16px; accent-color: #c4281a; }

.quoteModalActions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.quoteModalActions .quoteSubmit { margin-left: auto; }

.btn.btn--plain {
    background: none;
    border: 1px solid #e0ddd7;
    color: #5d5951;
}

.quoteLegal { margin: 12px 0 0; font-size: .72rem; line-height: 1.5; color: #9a938a; }

/* Rueda de carga */
.quoteSpinner {
    width: 15px;
    height: 15px;
    flex: none;
    border: 2px solid rgba(196, 40, 26, .25);
    border-top-color: #c4281a;
    border-radius: 50%;
    animation: quoteSpin .7s linear infinite;
}

@keyframes quoteSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .quoteSpinner { animation-duration: 2.4s; }
    .quoteUnitBtn:hover { transform: none; }
}

/* Confirmación */
.quoteDone { padding: 14px 4px 4px; text-align: center; }

.quoteDoneMark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #e8f5ef;
    color: #16704f;
}

.quoteDoneMark svg { width: 26px; height: 26px; }
.quoteDone h4 { margin: 0 0 6px; font-size: 1.12rem; color: #1c1a17; }
.quoteDone p { margin: 0; color: #5d5951; }
.quoteDoneSmall { margin-top: 4px !important; font-size: .82rem; color: #9a938a; }
.quoteModalCloseDone { margin-top: 18px; }

@media (max-width: 560px) {
    .quoteFieldGrid { grid-template-columns: 1fr; }
    .quoteUnitsList { grid-template-columns: 1fr; max-height: 40vh; }
    .quoteSteps { gap: 12px; font-size: .68rem; }
}

/* [hidden] no gana contra display:flex/grid: hay que forzarlo. */
.quoteUnitsState[hidden],
.quoteUnitsList[hidden],
.quoteExtras[hidden],
.quoteCheck[hidden],
.quoteUnitsFilters[hidden],
.quoteModalStep[hidden] { display: none !important; }

/* El precio no debe partirse en dos líneas. */
.quoteUnitPrice { white-space: nowrap; }
.quoteUnitPrice b { display: block; }

/* Un poco más de aire entre el número y el detalle. */
.quoteUnitBtn { gap: 14px; padding: 13px 15px; }
.quoteUnitBody small { line-height: 1.45; }

/* ===========================================================================
   Cotizador en la página (dos columnas). Reemplaza al popup.
   ======================================================================== */

.cotizador { padding: 72px 0; background: #faf9f7; }

.cotizadorHead { text-align: center; margin-bottom: 34px; }
.cotizadorHead p { margin: 8px 0 0; color: #5d5951; }

.cotizadorGrid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 26px;
    align-items: start;
}

/* --- columna de unidades --- */
.cotizadorUnits {
    background: #fff;
    border: 1px solid #e6e2dc;
    border-radius: 16px;
    padding: 18px;
}

.cotizadorUnitsBar { display: grid; gap: 12px; margin-bottom: 14px; }

.cotizadorUnitsTitle {
    font-weight: 600;
    color: #1c1a17;
    font-size: .95rem;
}

.cotizadorFilters { display: flex; flex-wrap: wrap; gap: 7px; }

.cotizadorState {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 2px;
    color: #7a756c;
    font-size: .9rem;
}

.cotizadorList {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 2px;
    list-style: none;
    max-height: 520px;
    overflow-y: auto;
}

.cotizadorUnitBtn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border: 1px solid #e6e2dc;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.cotizadorUnitBtn:hover { border-color: #c8c4bc; }

.cotizadorUnit.is-selected .cotizadorUnitBtn {
    border-color: #c4281a;
    background: #fdf0ee;
}

.cotizadorUnitNum {
    flex: none;
    padding: 5px 10px;
    border-radius: 8px;
    background: #f4f2ef;
    font-size: .78rem;
    font-weight: 600;
    color: #45423b;
}

.cotizadorUnit.is-selected .cotizadorUnitNum { background: #c4281a; color: #fff; }

.cotizadorUnitBody { display: grid; gap: 2px; min-width: 0; }
.cotizadorUnitBody b { font-size: .92rem; color: #1c1a17; }
.cotizadorUnitBody small { font-size: .78rem; color: #7a756c; }

/* --- columna de imagen y formulario --- */
.cotizadorPanel {
    background: #fff;
    border: 1px solid #e6e2dc;
    border-radius: 16px;
    padding: 18px;
}

.cotizadorFigure { margin: 0 0 18px; }

.cotizadorFigure img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #f4f2ef;
    border-radius: 12px;
    display: block;
}

.cotizadorFigure figcaption {
    margin-top: 9px;
    font-size: .82rem;
    color: #7a756c;
    text-align: center;
}

.cotizadorKnown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 10px 13px;
    border: 1px solid #e0ddd7;
    border-radius: 10px;
    background: #f9f8f6;
    font-size: .84rem;
    color: #5d5951;
}

.cotizadorKnown button {
    margin-left: auto;
    border: 0;
    background: none;
    color: #c4281a;
    font: inherit;
    font-size: .82rem;
    text-decoration: underline;
    cursor: pointer;
}

.cotizadorFields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.cotizadorExtras { display: grid; gap: 8px; margin-bottom: 12px; }

.cotizadorConsent {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #ece8e2;
    border-radius: 12px;
    background: #fbfaf8;
}

.cotizadorConsent .quoteCheck { align-items: flex-start; }
.cotizadorConsent .quoteCheck input { margin-top: 2px; }

.cotizadorConsentNote {
    margin: 0;
    font-size: .76rem;
    line-height: 1.55;
    color: #8a847a;
}

.cotizadorLegalLink {
    border: 0;
    padding: 0;
    background: none;
    color: #c4281a;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.cotizadorSubmit { width: 100%; justify-content: center; }
.cotizadorSubmit[disabled] { opacity: .55; cursor: not-allowed; }

.cotizadorLegal {
    margin: 12px 0 0;
    font-size: .74rem;
    line-height: 1.55;
    color: #8a847a;
}

.cotizadorDone { text-align: center; padding: 20px 6px; }
.cotizadorDone h3 { margin: 0 0 6px; font-size: 1.15rem; color: #1c1a17; }
.cotizadorDone p { margin: 0; color: #5d5951; }
.cotizadorDoneSmall { margin-top: 4px !important; font-size: .84rem; color: #9a938a; }
.cotizadorDone .btn { margin-top: 18px; }

/* --- popup de textos legales --- */
.legalModal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(20, 18, 16, .55);
}

.legalModal[hidden] { display: none; }

.legalDialog {
    width: min(100%, 640px);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.legalHead {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 22px 8px;
}

.legalHead h3 { margin: 0; font-size: 1.15rem; color: #1c1a17; }

.legalClose {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f4f2ef;
    color: #45423b;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.legalUpdated {
    margin: 0;
    padding: 0 22px 12px;
    font-size: .76rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9a938a;
}

.legalBody {
    padding: 0 22px 18px;
    overflow-y: auto;
    border-top: 1px solid #ece8e2;
    padding-top: 16px;
}

.legalBody h4 { margin: 16px 0 5px; font-size: .92rem; color: #1c1a17; }
.legalBody h4:first-child { margin-top: 0; }
.legalBody p { margin: 0; font-size: .87rem; line-height: 1.65; color: #5d5951; }

.legalFoot { padding: 14px 22px 20px; border-top: 1px solid #ece8e2; text-align: right; }

@media (max-width: 900px) {
    .cotizador { padding: 48px 0; }
    .cotizadorGrid { grid-template-columns: 1fr; gap: 18px; }
    .cotizadorList { max-height: 340px; }
}

@media (max-width: 560px) {
    .cotizadorFields { grid-template-columns: 1fr; }
    .cotizadorUnits, .cotizadorPanel { padding: 14px; }
}

/* [hidden] no gana contra display:flex/grid. */
.cotizadorState[hidden],
.cotizadorList[hidden],
.cotizadorExtras[hidden],
.cotizadorFilters[hidden],
.cotizadorDone[hidden],
.cotizadorForm[hidden] { display: none !important; }

/* ===========================================================================
   Animaciones del cotizador.
   Todas se desactivan con prefers-reduced-motion (más abajo).
   ======================================================================== */

:root { --cot-ease: cubic-bezier(.16, 1, .3, 1); }

/* --- entrada escalonada de las unidades --- */
@keyframes cotEntrada {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.cotizadorUnit {
    opacity: 0;
    animation: cotEntrada .45s var(--cot-ease) forwards;
    animation-delay: calc(var(--i, 0) * 35ms);
}

/* --- esqueleto mientras cargan --- */
@keyframes cotBrillo {
    from { background-position: -180% 0; }
    to   { background-position: 180% 0; }
}

.cotizadorSkeleton { display: grid; gap: 8px; }

.cotizadorSkeleton span {
    display: block;
    height: 62px;
    border-radius: 12px;
    background: linear-gradient(100deg, #f2f0ec 30%, #e9e6e1 50%, #f2f0ec 70%);
    background-size: 220% 100%;
    animation: cotBrillo 1.5s ease-in-out infinite;
}

/* --- selección de unidad --- */
.cotizadorUnitBtn {
    transition: border-color .2s var(--cot-ease), background .2s var(--cot-ease),
                transform .2s var(--cot-ease), box-shadow .2s var(--cot-ease);
}

.cotizadorUnitBtn:hover { transform: translateX(2px); }
.cotizadorUnitBtn:active { transform: scale(.99); }

.cotizadorUnit.is-selected .cotizadorUnitBtn {
    box-shadow: 0 8px 22px -16px rgba(196, 40, 26, .7);
}

.cotizadorUnitNum { transition: background .2s var(--cot-ease), color .2s var(--cot-ease); }

/* --- cambio de plano con fundido --- */
.cotizadorFigure img {
    transition: opacity .3s var(--cot-ease), transform .45s var(--cot-ease);
}

.cotizadorFigure.is-swapping img { opacity: 0; transform: scale(.985); }

.cotizadorFigure figcaption { transition: opacity .25s var(--cot-ease); }
.cotizadorFigure.is-swapping figcaption { opacity: 0; }

/* --- el formulario se enciende al elegir unidad --- */
.cotizadorForm { transition: opacity .3s var(--cot-ease); }
.cotizadorForm.is-waiting { opacity: .55; }

@keyframes cotDestello {
    0%   { box-shadow: 0 0 0 0 rgba(196, 40, 26, .28); }
    100% { box-shadow: 0 0 0 14px rgba(196, 40, 26, 0); }
}

.cotizadorSubmit.is-ready { animation: cotDestello .8s var(--cot-ease) 1; }

/* --- aviso de error --- */
@keyframes cotSacudida {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

.quoteModalAlert[data-form-alert]:not([hidden]) {
    animation: cotSacudida .32s var(--cot-ease) 1;
}

/* --- confirmación --- */
@keyframes cotSubir {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.cotizadorDone:not([hidden]) { animation: cotSubir .5s var(--cot-ease) 1; }

@keyframes cotMarca {
    from { stroke-dashoffset: 30; }
    to   { stroke-dashoffset: 0; }
}

@keyframes cotPulso {
    0%   { transform: scale(.6); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

.cotizadorDone .quoteDoneMark { animation: cotPulso .5s var(--cot-ease) 1; }

.cotizadorDone .quoteDoneMark path {
    stroke-dasharray: 30;
    animation: cotMarca .5s var(--cot-ease) .25s backwards;
}

/* --- popup legal --- */
@keyframes cotFundido { from { opacity: 0; } to { opacity: 1; } }
@keyframes cotAsciende {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.legalModal:not([hidden]) { animation: cotFundido .22s ease 1; }
.legalDialog { animation: cotAsciende .34s var(--cot-ease) 1; }

/* --- chips de filtro --- */
.quoteChip { transition: background .18s var(--cot-ease), color .18s var(--cot-ease), border-color .18s var(--cot-ease); }

@media (prefers-reduced-motion: reduce) {
    .cotizadorUnit,
    .cotizadorDone:not([hidden]),
    .legalModal:not([hidden]),
    .legalDialog,
    .cotizadorDone .quoteDoneMark,
    .cotizadorDone .quoteDoneMark path,
    .cotizadorSubmit.is-ready,
    .quoteModalAlert[data-form-alert]:not([hidden]) {
        animation: none;
        opacity: 1;
    }

    .cotizadorSkeleton span { animation-duration: 3s; }
    .cotizadorUnitBtn:hover { transform: none; }
}

/* ===========================================================================
   El cotizador vive dentro de la sección de plantas: se alternan con animación.
   ======================================================================== */

.cotizador[hidden] { display: none !important; }
.cotizador { padding: 0 0 20px; background: transparent; }

@keyframes cotEntraVista {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

@keyframes cotSaleVista {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateY(-12px); }
}

.cotizador.is-entering,
[data-plantas].is-entering { animation: cotEntraVista .42s var(--cot-ease) 1; }

.cotizador.is-leaving,
[data-plantas].is-leaving { animation: cotSaleVista .22s ease-in 1 forwards; }

/* Volver a las plantas */
.cotizadorHead { position: relative; }

.cotizadorBack {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 15px 8px 12px;
    border: 1px solid #e0ddd7;
    border-radius: 999px;
    background: #fff;
    color: #45423b;
    font: inherit;
    font-size: .84rem;
    cursor: pointer;
    transition: border-color .18s var(--cot-ease), transform .18s var(--cot-ease), background .18s var(--cot-ease);
}

.cotizadorBack svg { width: 16px; height: 16px; transition: transform .22s var(--cot-ease); }
.cotizadorBack:hover { border-color: #c4281a; color: #c4281a; background: #fdf7f6; }
.cotizadorBack:hover svg { transform: translateX(-3px); }

/* --- filtros de tipología como tarjetas con planta --- */
.cotizadorFilters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 9px;
}

.cotizadorTipo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #e6e2dc;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color .18s var(--cot-ease), box-shadow .18s var(--cot-ease), transform .18s var(--cot-ease);
}

.cotizadorTipo:hover { border-color: #c8c4bc; transform: translateY(-1px); }

.cotizadorTipo[aria-pressed="true"] {
    border-color: #c4281a;
    box-shadow: 0 0 0 2px rgba(196, 40, 26, .14);
    background: #fdf7f6;
}

.cotizadorTipoImg {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    overflow: hidden;
    background: #f4f2ef;
    display: grid;
    place-items: center;
}

.cotizadorTipoImg img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cotizadorTipoImg--todas {
    background: repeating-linear-gradient(45deg, #f4f2ef, #f4f2ef 5px, #ece9e4 5px, #ece9e4 10px);
}

.cotizadorTipoTexto { display: grid; gap: 1px; min-width: 0; }
.cotizadorTipoTexto b { font-size: .86rem; color: #1c1a17; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cotizadorTipoTexto small { font-size: .72rem; color: #8a847a; }

.cotizadorTipo[aria-pressed="true"] .cotizadorTipoTexto b { color: #c4281a; }

@media (max-width: 560px) {
    .cotizadorFilters { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
    .cotizadorTipoImg { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    .cotizador.is-entering,
    .cotizador.is-leaving,
    [data-plantas].is-entering,
    [data-plantas].is-leaving { animation: none; }

    .cotizadorTipo:hover { transform: none; }
    .cotizadorBack:hover svg { transform: none; }
}

/* La planta debe verse completa, no recortada. */
.cotizadorTipoImg {
    width: 46px;
    height: 46px;
    padding: 3px;
    background: #f7f5f2;
}

.cotizadorTipoImg img { object-fit: contain; }

.cotizadorTipoImg--todas {
    background: #f7f5f2;
    color: #a19c93;
}

.cotizadorTipoImg--todas svg { width: 20px; height: 20px; }

.cotizadorTipo[aria-pressed="true"] .cotizadorTipoImg--todas { color: #c4281a; }

@media (max-width: 560px) {
    .cotizadorTipoImg { width: 40px; height: 40px; }
}

/*
 * Reequilibrio de las dos columnas: la planta se llevaba media pantalla y
 * empujaba el formulario fuera de la vista.
 */
@media (min-width: 901px) {
    .cotizadorGrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
}

.cotizadorFigure {
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid #eeeae4;
    border-radius: 12px;
    background: #fbfaf8;
}

.cotizadorFigure img {
    aspect-ratio: 16 / 10;
    max-height: 260px;
    background: transparent;
    border-radius: 8px;
}

.cotizadorFigure figcaption { margin-top: 8px; font-size: .78rem; }

/* La lista acompaña la altura del panel, sin estirarlo. */
.cotizadorList { max-height: 430px; }

@media (max-width: 900px) {
    .cotizadorFigure img { max-height: 300px; }
    .cotizadorList { max-height: 320px; }
}

/*
 * .tipologias es flex en pantallas grandes: el cotizador es un hijo más y
 * necesita el mismo ancho contenido y centrado que el bloque de plantas.
 */
.cotizador { width: 100%; }

.cotizador > .wrap {
    width: 100%;
    /* Mismo ancho que el bloque de plantas, para que las columnas calcen. */
    max-width: 1240px;
    margin-inline: auto;
    padding: 0 20px;
}

/* El encabezado hereda estilos de la sección: se centra explícitamente. */
.cotizadorHead { text-align: center; }
.cotizadorHead h2 { text-align: center; }
.cotizadorHead p { margin-inline: auto; max-width: 52ch; }

/* El botón de volver se ancla a la izquierda sin descentrar el título. */
.cotizadorHead { display: grid; justify-items: center; gap: 4px; }
.cotizadorBack { justify-self: start; }

@media (max-width: 640px) {
    .cotizadorBack { justify-self: center; }
}

/* La orientación se destaca dentro de los datos de cada unidad. */
.cotizadorUnitOrient {
    color: #c4281a;
    font-weight: 700;
}

.cotizadorUnit.is-selected .cotizadorUnitOrient { color: #a92115; }

/* ===========================================================================
   Móvil: una sola columna y objetivos de toque cómodos.
   ======================================================================== */

@media (max-width: 900px) {
    .cotizadorGrid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* El plano primero: es lo que confirma la elección. */
    .cotizadorPanel { order: 2; }
    .cotizadorUnits { order: 1; }

    .cotizadorFigure img { max-height: 46vh; aspect-ratio: auto; }
    .cotizadorList { max-height: 320px; }
    .cotizadorFields { grid-template-columns: 1fr; }

    .cotizadorUnitBtn { padding: 14px; }
    .cotizadorTipo { padding: 10px; }

    .cotizadorBack { min-height: 42px; padding-block: 10px; }

    /* Enlaces legales dentro del texto: se agranda el área de toque. */
    .cotizadorLegalLink {
        display: inline-block;
        padding: 6px 2px;
        margin: -6px 0;
    }

    .cotizadorSubmit { min-height: 50px; font-size: 1rem; }
    .quoteCheck input { width: 20px; height: 20px; }
}
