













.thf-cr,
.thf-cr-salida {
    --cr-bg:        var(--th-bg, #08080A);
    --cr-surface:   var(--th-surface, #0F0F12);
    --cr-surface-2: var(--th-surface-2, #16161A);
    --cr-line:      var(--th-line, #23232A);
    --cr-line-2:    var(--th-line-strong, #35353E);
    --cr-ink:       var(--th-ink, #F2F2EF);
    --cr-ink-2:     var(--th-ink-2, #A5A5A2);
    --cr-ink-3:     var(--th-ink-3, #8C8C8E);
    --cr-metal:     var(--th-metal, #D2A72C);
    --cr-metal-2:   var(--th-metal-2, #E7BF4A);
    --cr-metal-ink: var(--th-metal-ink, #08080A);
    --cr-metal-dim: rgba(210, 167, 44, .10);
    --cr-danger:    #FF7A70;
    --cr-sans:      'Archivo', system-ui, -apple-system, sans-serif;
    --cr-mono:      'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --cr-ease:      cubic-bezier(.16, 1, .3, 1);
    --cr-fast:      120ms;
    --cr-base:      220ms;
    color: var(--cr-ink);
    font-family: var(--cr-mono);
}

.thf-cr [hidden],
.thf-cr-salida[hidden] { display: none !important; }

 
body.thf-cr-abierta #ast-scroll-top { display: none !important; }

.thf-cr.is-entrando { animation: thf-cr-entra var(--cr-base) var(--cr-ease) both; }
@keyframes thf-cr-entra {
    from { opacity: 0; transform: translate3d(0, 10px, 0); }
    to   { opacity: 1; transform: none; }
}

 
.thf-cr-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: -6px 0 6px -12px;
    padding: 0 14px 0 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--cr-ink-2);
    font: 500 .8125rem/1 var(--cr-mono);
    cursor: pointer;
    transition: color var(--cr-fast) ease, background-color var(--cr-fast) ease;
}
.thf-cr-back:active { transform: scale(.97); }
@media (hover: hover) { .thf-cr-back:hover { color: var(--cr-ink); background: var(--cr-surface-2); } }

.thf-cr-h {
    margin: 0 0 14px;
    font: 800 clamp(1.5rem, 1.2rem + 1vw, 1.875rem)/1.05 var(--cr-sans);
    font-stretch: 112%;
    letter-spacing: -.02em;
    color: var(--cr-ink);
    outline: none;
}

.thf-cr-pieza {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    border: 1px solid var(--cr-line);
    border-radius: 18px;
    background: var(--cr-surface);
}
.thf-cr-pieza-img {
    width: 56px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--cr-surface-2);
}
.thf-cr-pieza-txt { min-width: 0; }
.thf-cr-pieza-nombre {
    margin: 0;
    font: 700 .9375rem/1.25 var(--cr-sans);
    color: var(--cr-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.thf-cr-pieza-meta { margin: 3px 0 0; font-size: .75rem; color: var(--cr-ink-3); }
.thf-cr-pieza-precio { margin: 0; font: 600 .9375rem/1 var(--cr-mono); color: var(--cr-ink); }

 
.thf-cr-form { margin: 0; }

.thf-cr-sec {
    min-width: 0;
    margin: 22px 0 0;
    padding: 0;
    border: 0;
}
.thf-cr-leg {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 0;
    font: 700 1.0625rem/1.2 var(--cr-sans);
    color: var(--cr-ink);
}
.thf-cr-num {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 50%;
    background: var(--cr-metal-dim);
    color: var(--cr-metal);
    font: 600 .75rem/1 var(--cr-mono);
}
.thf-cr-intro { margin: -4px 0 12px; font-size: .8125rem; line-height: 1.55; color: var(--cr-ink-2); }

 
.thf-cr-opts { display: grid; gap: 8px; }
.thf-cr-opt {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 12px 16px;
    border: 1px solid var(--cr-line-2);
    border-radius: 16px;
    background: var(--cr-surface);
    cursor: pointer;
    transition: border-color var(--cr-fast) ease, background-color var(--cr-fast) ease;
}
.thf-cr-opt:has(input:checked) { border-color: var(--cr-metal); background: var(--cr-metal-dim); }
.thf-cr-opt:has(input:focus-visible) { outline: 2px solid var(--cr-metal); outline-offset: 3px; }
.thf-cr-opt input:not(#cr-a):not(#cr-b):not(#cr-c):not(#cr-d):not(#cr-e) {
    -webkit-appearance: none;
            appearance: none;
    width: 20px !important;
    height: 20px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1.5px solid var(--cr-line-2) !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: border-color var(--cr-fast) ease, box-shadow var(--cr-fast) ease !important;
}
.thf-cr-opt input:checked:not(#cr-a):not(#cr-b):not(#cr-c):not(#cr-d):not(#cr-e) {
    border-color: var(--cr-metal) !important;
    box-shadow: inset 0 0 0 4px var(--cr-bg), inset 0 0 0 10px var(--cr-metal) !important;
}
.thf-cr-opt input:focus { outline: none; }
.thf-cr-opt-txt { display: grid; gap: 2px; min-width: 0; }
.thf-cr-opt-name { font: 600 .9375rem/1.25 var(--cr-sans); color: var(--cr-ink); }
.thf-cr-opt-time { font-size: .75rem; color: var(--cr-ink-3); }
.thf-cr-opt-price { font: 600 .875rem/1 var(--cr-mono); color: var(--cr-ink); }

 
.thf-cr-guardada {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--cr-line-2);
    border-radius: 16px;
    background: var(--cr-surface);
}
.thf-cr-guardada-txt p { margin: 0; font-size: .8125rem; line-height: 1.55; color: var(--cr-ink-2); }
.thf-cr-guardada-txt .thf-cr-guardada-nombre { font: 600 .9375rem/1.4 var(--cr-sans); color: var(--cr-ink); }
.thf-cr-guardada-txt .thf-cr-guardada-tel { margin-top: 4px; color: var(--cr-ink-3); }

 
.thf-cr-campos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
}
.thf-cr-campos.is-abriendo { animation: thf-cr-entra var(--cr-base) var(--cr-ease) both; }
.thf-cr-f { display: grid; gap: 6px; min-width: 0; align-content: start; }
.thf-cr-f--wide { grid-column: 1 / -1; }
.thf-cr-sec[data-cr-cuenta] .thf-cr-f + .thf-cr-f { margin-top: 14px; }
.thf-cr-f label {
    font: 500 .75rem/1.2 var(--cr-mono);
    letter-spacing: .02em;
    color: var(--cr-ink-2);
}
.thf-cr-opc { color: var(--cr-ink-3); font-weight: 400; }

body .thf-cr .thf-cr-in:not(#cr-a):not(#cr-b):not(#cr-c):not(#cr-d):not(#cr-e) {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 0 14px !important;
    border: 1px solid var(--cr-line-2) !important;
    border-radius: 14px !important;
    background: var(--cr-bg) !important;
    color: var(--cr-ink) !important;
    font: 500 16px/1.2 var(--cr-mono) !important;
    box-shadow: none !important;
    transition: border-color var(--cr-fast) ease, box-shadow var(--cr-fast) ease !important;
}
body .thf-cr select.thf-cr-in:not(#cr-a):not(#cr-b):not(#cr-c):not(#cr-d):not(#cr-e) {
    -webkit-appearance: none;
            appearance: none;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23A5A5A2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
}
body .thf-cr .thf-cr-in::placeholder { color: var(--cr-ink-3); opacity: 1; }
body .thf-cr .thf-cr-in:focus:not(#cr-a):not(#cr-b):not(#cr-c):not(#cr-d):not(#cr-e) {
    border-color: var(--cr-metal) !important;
    box-shadow: 0 0 0 3px rgba(210, 167, 44, .16) !important;
    outline: none;
}
body .thf-cr .thf-cr-in[aria-invalid="true"]:not(#cr-a):not(#cr-b):not(#cr-c):not(#cr-d):not(#cr-e) {
    border-color: var(--cr-danger) !important;
}
body .thf-cr .thf-cr-in.is-auto:not(#cr-a):not(#cr-b):not(#cr-c):not(#cr-d):not(#cr-e) {
    animation: thf-cr-auto 900ms var(--cr-ease) both;
}
@keyframes thf-cr-auto {
    from { box-shadow: 0 0 0 3px rgba(210, 167, 44, .28); }
    to   { box-shadow: 0 0 0 3px rgba(210, 167, 44, 0); }
}

.thf-cr-hint { margin: 0; font-size: .75rem; line-height: 1.45; color: var(--cr-ink-3); }
.thf-cr-hint.is-ok { color: var(--cr-metal); }
.thf-cr-err { margin: 0; font-size: .75rem; line-height: 1.45; color: var(--cr-danger); }

.thf-cr-pass { position: relative; }
body .thf-cr .thf-cr-pass .thf-cr-in:not(#cr-a):not(#cr-b):not(#cr-c):not(#cr-d):not(#cr-e) { padding-right: 68px !important; }
.thf-cr-ver {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    min-width: 52px;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--cr-ink-2);
    font: 500 .75rem/1 var(--cr-mono);
    cursor: pointer;
}
@media (hover: hover) { .thf-cr-ver:hover { color: var(--cr-ink); background: var(--cr-surface-2); } }

.thf-cr-swap { margin: 12px 0 0; font-size: .8125rem; color: var(--cr-ink-2); }
.thf-cr-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 2px;
    border: 0;
    background: none;
    color: var(--cr-metal);
    font: 600 .8125rem/1 var(--cr-mono);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.thf-cr-guardada .thf-cr-link { min-height: 44px; padding: 0 6px; }

 
.thf-cr-cierre { margin-top: 24px; }
.thf-cr-cuenta-total {
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--cr-line);
}
.thf-cr-cuenta-total > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    font-size: .8125rem;
    color: var(--cr-ink-2);
}
.thf-cr-cuenta-total dt, .thf-cr-cuenta-total dd { margin: 0; }
.thf-cr-cuenta-total .thf-cr-total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--cr-line);
    font: 700 1.0625rem/1.2 var(--cr-sans);
    color: var(--cr-ink);
}
.thf-cr-cuenta-total .thf-cr-total dd { font-family: var(--cr-mono); font-weight: 600; }

.thf-cr-error {
    display: none;
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 122, 112, .35);
    border-radius: 14px;
    background: rgba(255, 59, 48, .08);
    color: var(--cr-danger);
    font-size: .8125rem;
    line-height: 1.5;
}
.thf-cr-error.is-on { display: block; animation: thf-cr-entra var(--cr-base) var(--cr-ease) both; }

.thf-cr-pay:not(#cr-a):not(#cr-b) {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    margin: 14px 0 0;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--cr-metal);
    color: var(--cr-metal-ink);
    font: 700 1rem/1 var(--cr-sans);
    letter-spacing: -.005em;
    cursor: pointer;
    transition: background-color var(--cr-fast) ease, transform var(--cr-fast) ease, opacity var(--cr-fast) ease;
}
@media (hover: hover) { .thf-cr-pay:not(#cr-a):not(#cr-b):hover { background: var(--cr-metal-2); } }
.thf-cr-pay:not(#cr-a):not(#cr-b):active { transform: scale(.985); }
.thf-cr-pay:not(#cr-a):not(#cr-b):disabled { opacity: .6; cursor: progress; transform: none; }

.thf-cr-nota {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 0;
    font-size: .75rem;
    line-height: 1.5;
    color: var(--cr-ink-3);
    text-align: center;
}
.thf-cr-nota svg { flex: none; margin-top: 2px; color: var(--cr-metal); }

 
@media (max-width: 900px) {
    .thf-cr-cierre {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin-inline: calc(var(--cme-gutter, 20px) * -1);
        padding: 0 var(--cme-gutter, 20px) calc(12px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(to bottom, rgba(8, 8, 10, 0), var(--cr-bg) 18px);
    }
    .thf-cr-cuenta-total { padding-top: 22px; border-top: 0; }
    .thf-cr-cuenta-total > div:not(.thf-cr-total) { display: none; }
    .thf-cr-cuenta-total .thf-cr-total { margin: 0; padding: 0; border: 0; }
    .thf-cr-pay:not(#cr-a):not(#cr-b) { margin-top: 10px; }
    .thf-cr-nota { margin-top: 8px; }
}
@media (max-width: 380px) {
    .thf-cr-campos { grid-template-columns: minmax(0, 1fr); }
}

 
.thf-cr-salida {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    padding: 24px;
    background: rgba(8, 8, 10, .92);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    text-align: center;
    animation: thf-cr-fade var(--cr-base) ease both;
}
@keyframes thf-cr-fade { from { opacity: 0; } to { opacity: 1; } }
.thf-cr-salida .thd-halo { margin-bottom: 10px; }
.thf-cr-salida-t { margin: 0; font: 800 1.375rem/1.15 var(--cr-sans); font-stretch: 112%; color: var(--cr-ink); }
.thf-cr-salida-s { margin: 0; max-width: 22rem; font-size: .8125rem; line-height: 1.55; color: var(--cr-ink-2); }

@media (prefers-reduced-motion: reduce) {
    .thf-cr *, .thf-cr.is-entrando, .thf-cr-salida { animation: none !important; transition: none !important; }
}
