/*
 * Checkout de la tienda: dos columnas en escritorio, resumen plegable en el
 * celular, tarjetas de entrega y pago.
 *
 * Vive aparte de css/pages/tienda.css, que ya pasa las 7.000 líneas y donde el
 * checkout se perdía entre el catálogo y la portada. Se carga después de
 * tienda.css y no lleva ningún `!important`: los selectores arrancan con
 * `#t-cart-panel` (un id) y así le ganan a la base por especificidad, sin la
 * carrera de `!important` que había antes. La contraparte está en tienda.css:
 * las reglas base de las tarjetas de radio ya no fuerzan sus valores.
 *
 * El layout del panel vive en index.html (`.t-co-layout`, `#t-cart-foot`,
 * `.t-co-summary` y su zona fija); acá sólo se pinta.
 */

/* Cabecera del panel con productos */
#t-cart-panel.has-items .t-cart-panel__head {
    background: var(--t-nav-bg);
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.14);
    padding: 14px 24px;
}

#t-cart-panel.has-items .t-cart-panel__head h3 {
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 700;
}

#t-cart-panel.has-items .t-cart-panel__close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transition: background-color 0.15s ease;
}

#t-cart-panel.has-items .t-cart-panel__close:hover {
    background: rgba(255, 255, 255, 0.24);
}

#t-cart-panel.has-items .t-cart-panel__close:focus-visible {
    outline: 2px solid var(--t-focus-ring-on-dark);
    outline-offset: 2px;
}

#t-cart-panel:not(.has-items) .t-cart-panel__drawer {
    width: min(460px, 100%);
}

/* Sin productos no hay nada que plegar: el botón sobra y el cuerpo muestra el
   mensaje de carrito vacío. */
#t-cart-panel:not(.has-items) .t-co-summary__toggle {
    display: none;
}

/* Barra plegable del resumen (sólo en pantallas < 960px y con productos) */
.t-co-summary__toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 12px 18px;
    background: var(--t-surface-2);
    border: 0;
    border-bottom: 1px solid var(--t-border);
    color: var(--t-ink);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.t-co-summary__toggle:focus-visible {
    outline: 2px solid var(--t-focus-ring);
    outline-offset: -2px;
}

.t-co-summary__toggle-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.t-co-summary__chevron {
    transition: transform 0.18s ease;
    color: var(--t-muted);
    flex-shrink: 0;
}

.t-co-summary__toggle[aria-expanded="false"] .t-co-summary__chevron {
    transform: rotate(-90deg);
}

.t-co-summary__bar-total {
    font-size: 1rem;
    font-weight: 800;
    color: var(--t-primary-ink);
    white-space: nowrap;
}

/* Zona fija del resumen: el aviso de cambios y el desglose (subtotal,
   modalidad de entrega y total). No se pliega nunca: con el resumen cerrado el
   cliente tiene que seguir viendo lo que decide el dinero. */
.t-co-summary__fijo {
    display: grid;
    gap: 10px;
}

#t-cart-panel.has-items .t-co-summary__fijo .t-cart-alert {
    margin: 0;
    border: 1px solid rgba(151, 96, 15, 0.28);
    border-radius: 12px;
}

body.tienda[data-theme="dark"] #t-cart-panel.has-items .t-co-summary__fijo .t-cart-alert {
    border-color: rgba(255, 201, 120, 0.32);
}

#t-cart-panel.has-items .t-cart-breakdown {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0;
}

#t-cart-panel.has-items .t-cart-breakdown__row--total {
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid var(--t-border);
}

#t-cart-panel.has-items .t-cart-breakdown__row--total strong {
    font-size: 1.18rem;
}

/* Lista de productos */
#t-cart-panel.has-items .t-cart-panel__body {
    padding: 0;
    gap: 0;
}

.t-cart-item__thumb {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

#t-cart-panel .t-cart-item {
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 0;
}

#t-cart-panel .t-cart-item__img,
#t-cart-panel .t-cart-item__noimg {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    border: 1px solid var(--t-border);
    background: var(--t-surface);
}

.t-cart-item__qty-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--t-ink);
    color: var(--t-surface);
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

#t-cart-panel .t-cart-item__qty button {
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
}

/* ── Formulario «Tus datos para coordinar la entrega» ──────────────────────
   Cuatro bloques con el mismo borde y el mismo aire: contacto, entrega,
   destino y dirección. Cada bloque define su grilla adentro, así una columna
   angosta no arrastra a la de al lado y el celular sólo cambia una variable. */
#t-cart-panel.has-items .t-checkout {
    border: 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 18px;
}

#t-cart-panel.has-items .t-checkout > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-block-size: 48px;
    padding: 8px 0 10px;
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--t-ink);
    list-style: none;
    cursor: pointer;
    /* La línea pertenece al formulario abierto: con el bloque cerrado quedaba
       colgando debajo del título y parecía un campo vacío. */
    border-bottom: 1px solid transparent;
}

#t-cart-panel.has-items .t-checkout > summary::-webkit-details-marker {
    display: none;
}

#t-cart-panel.has-items .t-checkout[open] > summary {
    margin-bottom: 14px;
    border-bottom-color: var(--t-border);
}

.t-co-form__title {
    min-width: 0;
}

.t-co-form__req {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--t-muted);
}

.t-co-form__req span,
.t-co-req {
    color: var(--t-danger-ink);
    font-weight: 700;
}

/* Una sola columna de bloques: cada bloque decide cuántas columnas tiene. */
#t-cart-panel.has-items .t-checkout__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 0;
}

.t-co-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--t-border);
    border-radius: 14px;
    /* Un punto de tinta sobre la superficie del panel: el bloque se lee como
       caja en los dos temas, sin un rosa que compita con el resumen de al lado. */
    background: color-mix(in srgb, var(--t-ink) 3%, var(--t-surface));
}

.t-co-block__title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--t-ink);
}

/* «Opcional» junto al rótulo: dice de qué lado está la obligación sin sumar
   otra línea de texto al bloque. */
.t-co-block__tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--t-muted);
}

.t-co-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.t-co-field {
    position: relative;
    display: grid;
    gap: 6px;
    min-width: 0;
    align-content: start;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--t-ink);
}

.t-co-field:has(.t-co-suggest:not([hidden])) {
    z-index: 30;
}

#t-cart-panel.has-items .t-checkout__fields .t-co-field__label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 20px;
    line-height: 1.25;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--t-ink);
}

/* Botón de enlace secundario (ej. «Ver los 12 destinos con adelanto»). */
.t-co-field__action {
    justify-self: start;
    min-block-size: 44px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--t-primary-ink);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.t-co-field__action[hidden] {
    display: none;
}

.t-co-field__action:focus-visible {
    outline: 2px solid var(--t-focus-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Controles parejos: Departamento, Ciudad, Barrio y Sucursal ─────────── */
.t-co-combo {
    display: flex;
    align-items: stretch;
    min-width: 0;
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    border: 1.5px solid var(--t-co-control-border);
    background: var(--t-surface);
    color: var(--t-ink);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.t-co-combo:focus-within {
    border-color: var(--t-primary-dark);
    outline: 2px solid var(--t-focus-ring);
    outline-offset: 2px;
}

.t-co-combo:has(:is(:user-invalid, .is-invalid)) {
    border-color: var(--t-danger-ink);
    border-width: 2px;
}

.t-co-combo.is-tsi-adelanto {
    border-color: var(--t-badge-warn-border);
    background: var(--t-badge-warn-bg);
}

.t-co-combo.is-tsi-adelanto .t-co-combo__btn {
    background: color-mix(in srgb, var(--t-badge-warn-ink) 10%, var(--t-badge-warn-bg));
    border-left-color: var(--t-badge-warn-border);
    color: var(--t-badge-warn-ink);
}

#t-cart-panel.has-items .t-checkout__fields .t-co-combo :is(input[type="text"], input[type="tel"]) {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 45px;
    padding: 10px 10px 10px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--t-ink);
    font: inherit;
    font-size: max(16px, 1rem);
    outline: none;
    scroll-margin-bottom: 120px;
}

.t-co-combo__btn {
    flex: 0 0 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--t-border);
    background: color-mix(in srgb, var(--t-ink) 4%, var(--t-surface));
    color: var(--t-ink);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.t-co-combo__btn:hover {
    background: color-mix(in srgb, var(--t-primary) 10%, var(--t-surface));
    color: var(--t-primary-ink);
}

.t-co-combo__btn:focus-visible {
    outline: 2px solid var(--t-focus-ring);
    outline-offset: -2px;
}

.t-co-combo__btn[hidden] {
    display: none;
}

#t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select {
    width: 100%;
    min-width: 0;
    min-height: 45px;
    padding: 10px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--t-ink);
    font: inherit;
    font-size: max(16px, 1rem);
    cursor: pointer;
    outline: none;
    color-scheme: light;
    scroll-margin-bottom: 120px;
}

body.tienda[data-theme="dark"] #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select {
    color-scheme: dark;
}

body.tienda[data-theme="dark"] #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select option {
    background: var(--t-surface);
    color: var(--t-ink);
}

@supports (appearance: base-select) {
    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select,
    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select::picker(select) {
        appearance: base-select;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select > button {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        flex: 1 1 auto;
        padding: 0;
        border: 0;
        background: transparent;
        color: inherit;
        font: inherit;
        text-align: left;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select selectedcontent {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select selectedcontent .t-co-opt-badge {
        display: none;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select::picker-icon {
        color: var(--t-ink);
        transition: transform 0.2s ease;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select:open::picker-icon {
        transform: rotate(180deg);
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select::picker(select) {
        margin-top: 6px;
        padding: 6px;
        width: anchor-size(width);
        min-width: min(20rem, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        max-height: min(340px, 54dvh);
        border-radius: 14px;
        border: 1px solid var(--t-border);
        background: var(--t-surface);
        color: var(--t-ink);
        box-shadow: 0 14px 32px rgba(10, 8, 25, 0.22);
        opacity: 0;
        transform: translateY(-4px);
        transition-property: display, overlay, opacity, transform;
        transition-duration: 0.2s;
        transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
        transition-behavior: allow-discrete;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select:open::picker(select) {
        opacity: 1;
        transform: translateY(0);
    }

    @starting-style {
        #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select:open::picker(select) {
            opacity: 0;
            transform: translateY(-4px);
        }
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select option {
        padding: 9px 10px;
        border-radius: 10px;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px 8px;
        color: var(--t-ink);
        background: transparent;
        cursor: pointer;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select option:hover,
    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select option:focus-visible {
        background: var(--t-surface-2);
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select option:checked {
        background: color-mix(in srgb, var(--t-primary) 10%, var(--t-surface));
        color: var(--t-primary-ink);
        font-weight: 700;
    }

    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select option::checkmark {
        color: var(--t-primary-ink);
    }

    .t-co-opt-title {
        font-weight: 600;
    }

    .t-co-opt-badge {
        display: inline-flex;
        align-items: center;
        padding: 2px 8px;
        border-radius: 999px;
        font-size: 0.7rem;
        font-weight: 700;
        line-height: 1.25;
        background: var(--t-badge-warn-bg);
        color: var(--t-badge-warn-ink);
        border: 1px solid var(--t-badge-warn-border);
        white-space: nowrap;
    }
}

/* Tarjetas seleccionables para Sucursal de retiro (sincronizadas con #t-co-sucursal-retiro). */
.t-co-sucursales {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.t-co-sucursales:empty {
    display: none;
}

.t-co-sucursales:not(:empty) + #t-co-sucursal-select-wrap {
    display: none;
}

.t-co-sucursal-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--t-border);
    background: var(--t-surface);
    color: var(--t-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.t-co-sucursal-card:hover {
    border-color: var(--t-primary);
}

.t-co-sucursal-card:focus-visible {
    outline: 2px solid var(--t-focus-ring);
    outline-offset: 2px;
}

.t-co-sucursal-card[aria-checked="true"] {
    border-color: var(--t-primary-dark);
    background: color-mix(in srgb, var(--t-primary) 6%, var(--t-surface));
}

.t-co-sucursal-card__copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.t-co-sucursal-card__copy strong {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--t-ink);
    line-height: 1.25;
}

.t-co-sucursal-card__copy small {
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--t-muted);
    line-height: 1.35;
}

.t-co-sucursal-card[aria-checked="true"] .t-co-sucursal-card__copy small {
    color: var(--t-primary-ink);
}

.t-co-sucursal-card__check {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    border: 1.5px solid var(--t-co-control-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    margin-top: 2px;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.t-co-sucursal-card[aria-checked="true"] .t-co-sucursal-card__check {
    border-color: var(--t-primary-dark);
    background: var(--t-primary-dark);
    color: #ffffff;
}

/* ── Cómo lo recibís: una tarjeta por forma de entrega ──────────────────── */
.t-co-choices {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.t-co-choices label.t-co-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 10px;
    min-height: 56px;
    padding: 10px 12px;
    border: 1.5px solid var(--t-border);
    border-radius: 12px;
    background: var(--t-surface);
    white-space: normal;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.t-co-choices label.t-co-choice:hover {
    border-color: var(--t-primary);
}

.t-co-choices label.t-co-choice:has(input:checked) {
    border-color: var(--t-primary-dark);
    background: color-mix(in srgb, var(--t-primary) 6%, var(--t-surface));
}

/* Ajuste-pantallas fija los radios a 18 px con `!important` sólo dentro de
   .t-checkout__radios; estas tarjetas ya no usan esa clase. */
.t-co-choices label.t-co-choice input[type="radio"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    flex: 0 0 18px;
    margin: 0;
    accent-color: var(--t-primary);
}

/* Sobre la tarjeta elegida el gris del subtítulo cae a 4.44:1: el tono de
   marca para texto da 6.01:1 sobre esa mezcla. */
.t-co-choices label.t-co-choice:has(input:checked) .t-co-radio-copy small {
    color: var(--t-primary-ink);
}

.t-co-choice .t-co-radio-price {
    max-width: 100%;
}

.t-co-retiro-fields,
.t-co-dir {
    display: grid;
    gap: 12px;
    min-width: 0;
}

/* Bloque de apoyo dentro de una tarjeta: fondo liso, sin segundo borde. */
.t-co-note,
.t-co-tsi {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--t-surface);
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--t-muted);
    overflow-wrap: anywhere;
}

.t-co-note strong {
    color: var(--t-ink);
    font-size: 0.82rem;
}

.t-cart-panel__secondary-actions .t-btn .icon-svg {
    flex-shrink: 0;
}

.t-checkout__saved-scope {
    display: block;
    margin-top: 2px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--t-primary-ink);
}

/* Cierre del formulario: guardar en la cuenta a la izquierda y confirmar a la
   derecha, los dos en la misma línea del alto táctil. */
#t-cart-panel.has-items .t-checkout__fields > .t-co-datos-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    padding-top: 2px;
}

/* El `display: grid` de las etiquetas del formulario le ganaba a esta clase y
   dejaba el tilde arriba del texto; con el id y la clase alcanza para ganarle. */
#t-cart-panel.has-items .t-checkout__fields .t-co-save-profile {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    flex: 1 1 240px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--t-ink);
    cursor: pointer;
}

#t-cart-panel.has-items .t-checkout__fields .t-co-save-profile input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--t-primary-dark);
}

#t-cart-panel.has-items .t-checkout__fields .t-co-save-profile span {
    min-width: 0;
}

#t-co-datos-done {
    min-height: 44px;
    min-width: 96px;
    margin-left: auto;
}

.t-checkout__accounts-group {
    display: grid;
    gap: 8px;
}

.t-checkout__account--selectable {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.t-checkout__account--selectable input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
    accent-color: var(--t-primary-dark);
}

.t-checkout__account-body {
    display: grid;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
}

.t-checkout__account-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.t-checkout__account--selectable:has(input:checked),
body.tienda[data-theme="dark"] .t-checkout__account--selectable:has(input:checked) {
    border-color: var(--t-primary-dark);
    background: color-mix(in srgb, var(--t-primary) 10%, var(--t-surface));
}

.t-checkout__account--selectable:focus-within {
    outline: 2px solid var(--t-focus-ring);
    outline-offset: 2px;
}

.t-checkout__account.is-disabled {
    cursor: not-allowed;
    border-style: dashed;
}

.t-checkout__account-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-surface-2);
    border: 1px solid var(--t-border);
    color: var(--t-muted);
}

/* La referencia y el bloque del mapa ocupan el renglón entero: son textos
   largos y dos botones que no entran a media columna. */
#t-cart-panel.has-items #t-co-dir-fields > .t-co-block > .t-co-field:has(#t-co-ref),
#t-cart-panel.has-items #t-co-dir-fields > .t-co-block > .t-co-geo-row {
    grid-column: 1 / -1;
}

#t-cart-panel.has-items .t-checkout__fields .t-co-field:has(:is(:user-invalid, .is-invalid)) .t-co-field__label,
#t-cart-panel.has-items .t-checkout__fields label:has(:is(:user-invalid, .is-invalid)) {
    color: var(--t-danger-ink);
}

#t-cart-panel.has-items .t-checkout__fields .t-co-field > :is(input[type="text"], input[type="tel"]) {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--t-co-control-border);
    font: inherit;
    font-size: max(16px, 1rem);
    background: var(--t-surface);
    color: var(--t-ink);
    scroll-margin-bottom: 120px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#t-cart-panel.has-items .t-checkout__fields .t-co-field > :is(input[type="text"], input[type="tel"]):focus-visible {
    /* El foco lo dibuja la regla base de la tienda (2px sólido, 6.65:1): acá sólo se
       refuerza el borde. El halo al 22 % daba 1.42:1 y no se veía. */
    border-color: var(--t-primary-dark);
}

#t-cart-panel.has-items .t-checkout__fields .t-co-field > :is(input[type="text"], input[type="tel"]):is(:user-invalid, .is-invalid) {
    border-color: var(--t-danger-ink);
    border-width: 2px;
}

/* Tarjetas de entrega y pago con subtítulo y costo.
   El `#t-cart-panel` de cada selector es lo que le gana a la base de
   tienda.css (`.t-checkout__radios label`, línea ~1851) sin `!important`. */
#t-cart-panel.has-items .t-checkout__radios {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 2px 0 4px;
}

#t-cart-panel.has-items .t-checkout__radios label {
    display: flex;
    /* El costo ("Sin costo", "A coordinar") no se achica: si a 320 px no entra al
       lado del rótulo, baja a su propia línea en vez de salirse de la tarjeta. */
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    min-height: 56px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--t-border);
    background: var(--t-surface);
    white-space: normal;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#t-cart-panel.has-items .t-checkout__radios label input[type="radio"] {
    margin-top: 2px;
}

#t-cart-panel.has-items .t-checkout__radios label:has(input:checked) {
    border-color: var(--t-primary-dark);
    background: color-mix(in srgb, var(--t-primary) 6%, var(--t-surface));
    box-shadow: 0 2px 10px rgba(26, 6, 41, 0.08);
}

/* La tarjeta elegida tiñe su fondo, y el gris del subtítulo caía a 4.44:1 justo
   por debajo de AA (medido en Chromium a 320, 375, 768 y 1440 px). El tono de
   marca para texto da 6.01:1 sobre esa mezcla. */
#t-cart-panel.has-items :is(.t-checkout__radios label, .t-co-choice):has(input:checked) .t-co-radio-copy small {
    color: var(--t-primary-ink);
}

/* El rótulo hereda `white-space: nowrap` de la regla vieja de las opciones de
   entrega y con el subtítulo nuevo desborda a 375 px: el precio llegaba a
   x=425 fuera de pantalla. Acá se deja envolver. */
#t-cart-panel.has-items :is(.t-checkout__radios label, .t-co-choice) .t-co-radio-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    white-space: normal;
}

#t-cart-panel.has-items :is(.t-checkout__radios label, .t-co-choice) .t-co-radio-copy :is(strong, small) {
    display: block;
    white-space: normal;
}

#t-cart-panel.has-items :is(.t-checkout__radios label, .t-co-choice) .t-co-radio-price {
    white-space: nowrap;
    max-width: 100%;
    margin-left: auto;
    text-align: right;
}

body.tienda #t-cart-panel :is(.t-co-block__title, .t-checkout__pago h4, .t-checkout__transfer h4, .t-checkout__verify h4),
body.tienda #t-review-modal .t-review__block-head h4 {
    font-family: var(--t-font-body);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.t-co-radio-copy strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--t-ink);
    line-height: 1.25;
}

.t-co-radio-copy small {
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--t-muted);
    line-height: 1.35;
}

.t-co-radio-price {
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--t-ink);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

.t-co-radio-price.is-free {
    color: var(--t-success-ink);
}

.t-co-radio-price.is-warn {
    color: var(--t-badge-warn-ink);
}

#t-cart-panel.has-items .t-checkout__pago {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid var(--t-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--t-ink) 3%, var(--t-surface));
}

#t-cart-panel.has-items .t-checkout__pago h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--t-ink);
}

#t-cart-panel.has-items .t-checkout__pago .t-checkout__hint {
    margin: 0;
}

#t-cart-panel.has-items .t-checkout__transfer,
#t-cart-panel.has-items .t-checkout__verify,
#t-cart-panel.has-items .t-checkout__terms {
    border-radius: 14px;
    padding: 16px;
}

/* CTA principal. Blanco sobre el magenta oscurecido da 6.42:1 en los dos temas.
   No se usa --t-primary-dark: en el tema oscuro vale #d94f92 y ahí el blanco
   baja a 3.83:1. La base de tienda.css ya no fuerza tinta oscura acá, así que
   el color gana por especificidad y sin `!important`. */
#t-cart-panel .t-cart-bar .t-btn--checkout {
    min-height: 48px;
    border-radius: 12px;
    background: #b90762;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 700;
}

#t-cart-panel .t-cart-bar .t-btn--checkout:hover {
    background: #9c0652;
}

#t-cart-panel .t-cart-bar .t-btn--checkout:focus-visible {
    outline: 2px solid var(--t-focus-ring);
    outline-offset: 2px;
}

/* Objetivo táctil del "Cambiar" del resumen de datos: sin esto queda en ~50x16 px. */
#t-cart-panel .t-text-link--inline {
    min-height: 44px;
    padding: 10px 8px;
    display: inline-flex;
    align-items: center;
}

/* Escritorio >= 960px: 2 columnas con el resumen a la derecha */
@media (min-width: 960px) {
    #t-cart-panel.has-items .t-cart-panel__drawer {
        width: min(1040px, calc(100vw - 32px));
        max-height: min(92dvh, 880px);
        border-radius: 20px;
    }

    #t-cart-panel.has-items .t-co-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 370px;
        column-gap: 36px;
        padding: 26px 32px 32px;
        align-items: start;
    }

    #t-cart-panel.has-items #t-cart-foot {
        grid-column: 1;
        grid-row: 1;
        padding: 0;
        border-top: 0;
    }

    /* Sin `position: sticky`: el resumen mide más que el alto visible del panel
       (a 1440x900 quedaba el desglose cortado), así que se desplaza con la columna. */
    #t-cart-panel.has-items .t-co-summary {
        grid-column: 2;
        grid-row: 1;
        background: var(--t-surface-2);
        border: 1px solid var(--t-border);
        border-radius: 16px;
        padding: 20px;
    }

    #t-cart-panel.has-items .t-co-layout .t-co-summary__fijo {
        margin-bottom: 16px;
    }

    #t-cart-panel.has-items .t-cart-panel__actions {
        padding: 14px 32px;
    }

    #t-cart-panel.has-items .t-cart-bar .t-btn--checkout {
        max-width: 370px;
    }
}

/* Tablet y móvil < 960px: el resumen se pliega desde su barra */
@media (max-width: 959px) {
    #t-cart-panel.has-items .t-co-summary__toggle {
        display: flex;
    }

    #t-cart-panel.has-items .t-co-summary__body {
        border-bottom: 1px solid var(--t-border);
    }

    /* Lo único que se pliega es la lista de productos. */
    #t-cart-panel.has-items .t-co-summary__body.is-collapsed #t-cart-items {
        display: none;
    }

    #t-cart-panel.has-items #t-cart-items {
        padding: 14px 18px 16px;
    }

    #t-cart-panel.has-items .t-co-summary__fijo {
        padding: 14px 18px 16px;
    }

    #t-cart-panel.has-items #t-cart-foot {
        padding: 18px 18px 24px;
        border-top: 0;
    }
}

@media (max-width: 539px) {
    #t-cart-panel.has-items .t-cart-panel__head {
        padding: 10px 14px;
    }

    #t-cart-panel.has-items .t-co-summary__toggle {
        padding: 12px 14px;
    }

    #t-cart-panel.has-items #t-cart-items {
        padding: 12px 14px 14px;
    }

    #t-cart-panel.has-items .t-co-summary__fijo {
        padding: 12px 14px 14px;
    }

    #t-cart-panel.has-items #t-cart-foot {
        padding: 14px 14px 20px;
    }

    #t-cart-panel.has-items .t-checkout__fields,
    #t-cart-panel.has-items .t-checkout__radios,
    .t-co-grid,
    .t-co-sucursales {
        grid-template-columns: minmax(0, 1fr);
    }

    #t-cart-panel .t-cart-item {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .t-cart-item__thumb,
    #t-cart-panel .t-cart-item__img,
    #t-cart-panel .t-cart-item__noimg {
        width: 52px;
        height: 52px;
    }
}

@media (pointer: coarse) {
    #t-cart-panel.has-items .t-checkout__fields .t-co-field > :is(input[type="text"], input[type="tel"]),
    .t-co-combo {
        min-height: 52px;
    }

    #t-cart-panel .t-cart-item__qty button {
        min-width: 44px;
        min-height: 44px;
    }

    #t-cart-panel .t-checkout__preview-remove {
        width: 44px;
        height: 44px;
    }

    #t-cart-panel .t-checkout__pending li button {
        min-height: 44px;
        padding: 8px 4px;
    }
}

@media (max-width: 640px) {
    .t-co-selector[open] {
        width: 100%;
        max-width: 100%;
        max-height: 90dvh;
        margin: auto 0 0;
        border-radius: 18px 18px 0 0;
        border-bottom: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

@media (max-width: 480px) {
    #t-cart-panel.has-items .t-co-choice {
        grid-template-columns: auto minmax(0, 1fr);
        row-gap: 4px;
        padding: 12px;
    }

    #t-cart-panel.has-items .t-co-choice .t-co-radio-price {
        grid-column: 2;
        justify-self: start;
        white-space: normal;
        font-size: 0.78rem;
    }

    #t-cart-panel .t-checkout__saved-body small {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 430px) {
    #t-cart-panel .t-cart-item {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 8px 10px;
    }

    #t-cart-panel .t-cart-item__qty {
        grid-column: 2;
        justify-self: start;
    }

    .t-cart-item__thumb,
    #t-cart-panel .t-cart-item__img,
    #t-cart-panel .t-cart-item__noimg {
        width: 48px;
        height: 48px;
    }

    #t-cart-panel .t-cart-bar .t-btn--checkout {
        font-size: 0.84rem;
        padding: 10px 14px;
    }
}

@media (max-width: 360px) {
    #t-cart-panel .t-cart-bar .t-btn--checkout {
        font-size: 0.78rem;
        padding: 10px 10px;
    }
}

/* Tokens semánticos compartidos para avisos de envío, controles y mapa */
:root {
    --t-co-control-border: #8b7a8a;
    --t-badge-warn-bg: #fff7ed;
    --t-badge-warn-ink: #9a3412;
    --t-badge-warn-border: #fdba74;
    --t-badge-ok-bg: #ecfdf5;
    --t-badge-ok-ink: #065f46;
    --t-badge-ok-border: #6ee7b7;
}

body.tienda[data-theme="dark"] {
    --t-co-control-border: #8f85a3;
    --t-badge-warn-bg: #2d1a0b;
    --t-badge-warn-ink: #fdba74;
    --t-badge-warn-border: #9a3412;
    --t-badge-ok-bg: #072b20;
    --t-badge-ok-ink: #6ee7b7;
    --t-badge-ok-border: #047857;
}

#t-cart-panel #t-co-dir-fields[hidden],
#t-cart-panel #t-co-retiro-fields[hidden],
#t-cart-panel .t-co-save-profile[hidden],
#t-cart-panel .t-co-summary__fijo[hidden],
#t-cart-panel .t-co-hint[hidden],
#t-cart-panel #t-co-pago[hidden],
#t-cart-panel #t-co-pago[hidden] + #t-co-pago-nota,
#t-cart-panel .t-checkout__radios label[hidden],
/* La tarjeta de encomienda viene oculta hasta que tienda_config la habilita;
   el `display: grid` de la tarjeta le gana al `display: none` de [hidden]. */
#t-cart-panel .t-co-choice[hidden],
#t-cart-panel .t-co-pago-envio[hidden],
#t-cart-panel .t-co-tsi[hidden] {
    display: none;
}

/* En Delivery o Retiro los badges de Encomienda TSI del select no aplican. */
#t-checkout:not([data-entrega="encomienda"]) .t-co-opt-badge {
    display: none;
}

#t-cart-panel .t-checkout > summary:focus-visible,
#t-cart-panel .t-checkout__radios label:has(input:focus-visible),
#t-cart-panel .t-co-choice:has(input:focus-visible) {
    outline: 2px solid var(--t-primary-ink);
    outline-offset: 2px;
}

.t-checkout__radios legend {
    margin-block-end: 8px;
    padding: 0;
    color: var(--t-ink);
    font-weight: 700;
}

#t-cart-panel :is(#t-co-datos-done, .t-co-geo-actions .t-btn) {
    min-block-size: 48px;
}

/* ── Pago del envío: la respuesta al destino elegido ─────────────────────
   Un solo bloque dice, con la ciudad ya puesta, si el flete de 35.000 Gs.
   viaja adelantado con la transferencia o se paga al retirar. El tono cambia
   con el estado que fija checkout-mapa.js (`is-*`). */
.t-co-pago-envio {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--t-border);
    background: var(--t-surface);
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--t-muted);
    overflow-wrap: anywhere;
}

.t-co-pago-envio__title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--t-ink);
}

.t-co-pago-envio.is-tsi-adelanto,
.t-co-pago-envio.is-delivery-lejos {
    background: var(--t-badge-warn-bg);
    border-color: var(--t-badge-warn-border);
    color: var(--t-badge-warn-ink);
}

.t-co-pago-envio.is-tsi-adelanto .t-co-pago-envio__title,
.t-co-pago-envio.is-delivery-lejos .t-co-pago-envio__title {
    color: var(--t-badge-warn-ink);
}

.t-co-pago-envio.is-delivery-cerca {
    background: var(--t-badge-ok-bg);
    border-color: var(--t-badge-ok-border);
    color: var(--t-badge-ok-ink);
}

.t-co-pago-envio.is-delivery-cerca .t-co-pago-envio__title {
    color: var(--t-badge-ok-ink);
}

/* ── Diálogo selector interactivo (Ciudad, Barrio, Destinos TSI) ───────── */
.t-co-selector {
    width: min(28rem, calc(100% - 1.5rem));
    max-height: min(80dvh, 620px);
    box-sizing: border-box;
    margin: auto;
    padding: 0;
    border: 1px solid var(--t-border);
    border-radius: 16px;
    background: var(--t-surface);
    color: var(--t-ink);
    box-shadow: 0 20px 44px rgba(10, 8, 25, 0.3);
    overflow: hidden;
}

.t-co-selector[open] {
    display: flex;
    flex-direction: column;
}

.t-co-selector::backdrop {
    background: rgb(20 10 22 / 58%);
    overscroll-behavior: contain;
}

.t-co-selector__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--t-nav-bg);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.t-co-selector__titles {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.t-co-selector__head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.t-co-selector__sub {
    margin: 0;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.85);
}

.t-co-selector__sub[hidden] {
    display: none;
}

.t-co-selector__close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.t-co-selector__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.t-co-selector__close:focus-visible {
    outline: 2px solid var(--t-focus-ring-on-dark);
    outline-offset: 2px;
}

.t-co-selector__search {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--t-border);
    background: var(--t-surface-2);
    flex-shrink: 0;
}

.t-co-selector__search[hidden] {
    display: none;
}

.t-co-selector__search-ico {
    position: absolute;
    left: 26px;
    color: var(--t-muted);
    pointer-events: none;
}

#t-co-selector-buscar {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px 8px 36px;
    border-radius: 10px;
    border: 1.5px solid var(--t-co-control-border);
    background: var(--t-surface);
    color: var(--t-ink);
    font: inherit;
    font-size: max(16px, 1rem);
}

#t-co-selector-buscar:focus-visible {
    border-color: var(--t-primary-dark);
    outline: 2px solid var(--t-focus-ring);
    outline-offset: 2px;
}

.t-co-selector__banner {
    margin: 0;
    padding: 8px 14px;
    background: var(--t-badge-warn-bg);
    color: var(--t-badge-warn-ink);
    border-bottom: 1px solid var(--t-badge-warn-border);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    flex-shrink: 0;
}

.t-co-selector__banner[hidden] {
    display: none;
}

.t-co-selector__list {
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px 12px 12px;
    flex: 1 1 auto;
}

.t-co-selector__group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0 4px;
    padding: 4px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--t-muted);
    letter-spacing: 0.02em;
}

.t-co-selector__group--tsi {
    color: var(--t-badge-warn-ink);
}

.t-co-selector__group:first-child {
    margin-top: 2px;
}

#t-co-selector-opciones ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 4px;
}

.t-co-selector__opt,
#t-co-selector-opciones li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--t-ink);
    font: inherit;
    font-size: 0.92rem;
    text-align: left;
}

.t-co-selector__opt {
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.t-co-selector__opt:hover,
.t-co-selector__opt:focus-visible {
    background: var(--t-surface-2);
}

.t-co-selector__opt:focus-visible {
    outline: 2px solid var(--t-focus-ring);
    outline-offset: -2px;
}

.t-co-selector__opt.is-selected {
    background: color-mix(in srgb, var(--t-primary) 9%, var(--t-surface));
    border-color: var(--t-primary-dark);
    color: var(--t-primary-ink);
    font-weight: 700;
}

.t-co-selector__opt--tsi {
    background: color-mix(in srgb, var(--t-badge-warn-bg) 70%, var(--t-surface));
    border-color: var(--t-badge-warn-border);
}

.t-co-selector__opt--tsi:hover,
.t-co-selector__opt--tsi:focus-visible {
    background: var(--t-badge-warn-bg);
}

.t-co-selector__opt--custom {
    margin-top: 6px;
    border-style: dashed;
    border-color: var(--t-co-control-border);
    background: var(--t-surface-2);
    font-weight: 600;
}

.t-co-selector__opt-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.t-co-selector__tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--t-badge-warn-bg);
    color: var(--t-badge-warn-ink);
    border: 1px solid var(--t-badge-warn-border);
    white-space: nowrap;
}

.t-co-selector__tag--ok {
    background: var(--t-badge-ok-bg);
    color: var(--t-badge-ok-ink);
    border-color: var(--t-badge-ok-border);
}

.t-co-selector__empty {
    margin: 8px 4px;
    padding: 14px 12px;
    border-radius: 10px;
    background: var(--t-surface-2);
    color: var(--t-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

#t-co-selector-opciones li {
    border-bottom: 1px solid var(--t-border);
    border-radius: 0;
}

#t-co-selector-opciones li:last-child {
    border-bottom: 0;
}

/* ── Autocompletado inline en Ciudad y Barrio ───────────────────────────── */
.t-co-suggest {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    z-index: 40;
    display: grid;
    gap: 2px;
    max-height: 256px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    border-radius: 14px;
    border: 1.5px solid var(--t-co-control-border);
    background: var(--t-surface);
    color: var(--t-ink);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.t-co-suggest[hidden] {
    display: none;
}

body.tienda[data-theme="dark"] .t-co-suggest {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48);
}

.t-co-suggest__group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--t-muted);
}

.t-co-suggest__group--tsi {
    color: var(--t-badge-warn-ink);
}

.t-co-suggest__opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 8px;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--t-ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.t-co-suggest__opt:hover,
.t-co-suggest__opt.is-active {
    background: color-mix(in srgb, var(--t-primary) 10%, var(--t-surface));
    border-color: color-mix(in srgb, var(--t-primary) 26%, transparent);
}

.t-co-suggest__opt.is-selected {
    background: color-mix(in srgb, var(--t-primary) 13%, var(--t-surface));
    border-color: var(--t-primary-dark);
    color: var(--t-primary-ink);
    font-weight: 700;
}

.t-co-suggest__opt--tsi {
    background: color-mix(in srgb, var(--t-badge-warn-bg) 52%, var(--t-surface));
    border-color: color-mix(in srgb, var(--t-badge-warn-border) 55%, transparent);
}

.t-co-suggest__opt--tsi:hover,
.t-co-suggest__opt--tsi.is-active {
    background: var(--t-badge-warn-bg);
    border-color: var(--t-badge-warn-border);
}

.t-co-suggest__opt--custom {
    border: 1px dashed var(--t-co-control-border);
    background: var(--t-surface-2);
    color: var(--t-primary-ink);
    font-weight: 600;
}

.t-co-suggest__empty {
    margin: 0;
    padding: 10px;
    border-radius: 10px;
    background: var(--t-surface-2);
    color: var(--t-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

/* ── Encomienda por TSI: el veredicto del destino elegido ─────────────────
   Reemplaza a `.t-co-depto-encomienda` cuando la entrega es encomienda: el
   importe adelantado, el detalle y la lista de los 12 destinos, en el mismo
   bloque de apoyo para no anidar cajas. */
.t-co-tsi__pago {
    display: grid;
    gap: 3px;
    line-height: 1.45;
}

.t-co-tsi__pago strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--t-ink);
}

.t-co-tsi[data-pago='tsi-adelanto'] {
    background: var(--t-badge-warn-bg);
    color: var(--t-badge-warn-ink);
}

.t-co-tsi[data-pago='tsi-adelanto'] .t-co-tsi__pago,
.t-co-tsi[data-pago='tsi-adelanto'] .t-co-tsi__pago strong {
    color: var(--t-badge-warn-ink);
}

.t-co-geo-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.t-co-geo-actions .t-btn {
    min-height: 44px;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
}

@media (max-width: 440px) {
    .t-co-geo-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    #t-cart-panel.has-items .t-cart-panel__close,
    .t-co-summary__chevron,
    #t-cart-panel.has-items .t-checkout__radios label,
    #t-cart-panel.has-items .t-co-choice,
    .t-co-combo,
    .t-co-combo__btn,
    .t-co-sucursal-card,
    .t-co-sucursal-card__check,
    .t-co-selector__close,
    .t-co-selector__opt,
    .t-co-suggest__opt,
    .t-checkout__account--selectable,
    #t-cart-panel.has-items .t-checkout__fields :is(input, select),
    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select::picker(select),
    #t-cart-panel.has-items .t-checkout__fields .t-co-combo--select select::picker-icon {
        transition: none;
    }
}
