/* --- GLOBAL MEDIA QUERIES (pre-mobile) --- */

@media (max-width: 1100px) {
  .header-resultados .header-inner {
    grid-template-areas: "izq der" "ajustes ajustes";
    grid-template-columns: 1fr max-content;
  }
}

@media (max-width: 720px) {
  .header-resultados .header-inner {
    grid-template-areas: "izq" "ajustes" "der";
    grid-template-columns: 1fr;
    padding-block: var(--s-10);
    padding-inline: clamp(10px, 4vw, 16px);
    row-gap: var(--s-8);
    --glass-blur: 8px;
  }

  .hr-contador {
    inline-size: auto;
  }

  .busq-input {
    inline-size: 14ch;
  }
}

@media (max-width: 420px) {
  #covDeseadaWrap .cobertura-grid {
    grid-template-columns: 1fr;
  }
}

@media (pointer: coarse) {
  .chip .chip-x {
    inline-size: 24px;
    block-size: 24px;
  }

  .filtroSelect,
  .vista-btn,
  .boton-filtro,
  .hr-select,
  .hr-busqueda {
    block-size: 44px;
  }

  .filtroInput {
    block-size: 44px;
  }

  .autocomplete-item {
    padding: var(--s-10) var(--s-12);
  }

  .vista-btn {
    inline-size: 44px;
  }

  .boton-filtro.redondo {
    inline-size: 44px;
    block-size: 44px;
  }

  #fpSlider {
    --fp-thumb: var(--s-16);
  }
}

@media (forced-colors: active) {

  .vista-switch,
  .caja-criterios,
  .hr-busqueda,
  .hr-select,
  .filtroSelect {
    border: 1px solid CanvasText;
    background: none;
  }

  .vista-btn[aria-pressed="true"],
  .boton-filtro[aria-pressed="true"] {
    background: Highlight;
    color: HighlightText;
  }

  .select-wrap::after {
    background: CanvasText;
  }

  .ordenamiento-filtros .caja,
  .bloque-filtros-activos {
    border: 1px solid CanvasText;
    background: Canvas;
  }

  .chip {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  .chip .chip-x {
    color: CanvasText;
  }

  #sugClinicas.autocomplete-list {
    border: 1px solid CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  .autocomplete-item {
    border-bottom: 1px solid CanvasText;
  }

  .resaltado {
    background: Highlight;
    color: HighlightText;
  }
}

@media (prefers-contrast: more) {

  .vista-btn[aria-pressed="true"],
  .boton-filtro[aria-pressed="true"] {
    outline: 2px solid color-mix(in oklch, var(--brand) 40%, black);
  }

  .hr-busqueda:focus-within {
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 35%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {

  .steps .dot,
  .stepper>button,
  .vista-btn,
  .boton-filtro,
  .hr-select,
  .hr-busqueda,
  .busq-input,
  .chip .chip-x,
  .toggle-slider::before,
  .r7-ts::before,
  .r7-dd,
  .mobile-overlay,
  .mobile-overlay--left,
  .mobile-overlay--bottom,
  .mobile-overlay--top,
  #resumen7,
  .mobile-results-dock,
  #snackbar {
    transition: none !important;
    animation: none !important;
  }
}

/* --- MOBILE BASE --- */

.mobile-results-dock {
  display: none;
}

@media (min-width: 1025px) {
  #r7ToolsShortcut {
    display: none !important;
  }
}

/* --- MOBILE LAYOUT & OVERLAY SYSTEM --- */

@media (max-width: 1024px),
(hover: none) and (pointer: coarse) {

  /* --- CSS CUSTOM PROPERTIES --- */
  :root {
    --mobile-results-dock-h: calc(68px + env(safe-area-inset-bottom, 0));
    --mobile-results-gutter: clamp(12px, 4vw, 18px);
    --mobile-results-max: 760px;
    --safe-top: env(safe-area-inset-top, 0);
    --mobile-overlay-radius: 32px;
    --mobile-overlay-backdrop: rgba(0, 0, 0, 0.45);
    --mobile-overlay-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    --mobile-overlay-section-gap: 20px;
    --mobile-overlay-section-pad: 16px;
    --mobile-overlay-control-h: 50px;
    --mobile-overlay-surface: var(--surface);
    --mobile-overlay-card-bg: var(--surface);
    --mobile-overlay-border: var(--separator);
  }

  /* --- FONT-SIZE OVERRIDE (prevents iOS zoom) --- */
  #resumen7 .busq-input,
  #resumen7 .busq-input::placeholder {
    font-size: 16px;
  }

  /* --- LAYOUT --- */
  #resultados {
    background: color-mix(in oklch, var(--surface) 95%, var(--brand) 5%);
  }

  .contenedor-dos-columnas {
    display: block;
    max-width: 100%;
    gap: 0;
  }

  .contenedor-dos-columnas::after {
    display: none;
  }

  .columna-izquierda {
    position: static;
    z-index: auto;
    top: auto;
    display: none !important;
  }

  .columna-izquierda>.sidebar-panel {
    border-radius: 0;
  }

  .columna-izquierda>.sidebar-panel>.sidebar-scroll {
    max-block-size: none;
    padding: 0;
    overflow: visible;
    contain: none;
  }

  #header-resultados {
    display: none !important;
  }

  .contenedor-dos-columnas .columna-derecha {
    padding-inline: var(--mobile-results-gutter);
    padding-top: var(--filters-gap);
    padding-bottom: calc(var(--mobile-results-dock-h, 80px) + 40px);
  }

  .contenedor-dos-columnas .columna-derecha>#planes-recomendados,
  .contenedor-dos-columnas .columna-derecha>#paginacion,
  .contenedor-dos-columnas .columna-derecha>#vista-transparencia {
    max-inline-size: var(--mobile-results-max);
    margin-inline: auto;
  }

  #planes-recomendados[data-vista="tarjeta"] {
    display: grid;
    gap: var(--s-12);
  }

  #planes-recomendados[data-vista="tarjeta"]>.item-plan,
  #planes-recomendados[data-vista="tarjeta"]>.flip-card,
  #planes-recomendados[data-vista="tarjeta"]>.tarjeta-plan {
    inline-size: 100%;
    max-inline-size: 100%;
    margin-inline: auto;
  }

  /* --- OVERLAY BACKDROP & SHELL ---
     Sin position/z-index propios: los hijos (.mobile-results-backdrop y
     .mobile-overlay) son position:fixed y se apilan globalmente con su
     propio z-index. Antes el shell creaba un stacking context que
     atrapaba al overlay y lo dejaba invisible aunque diga z-index:2000. */
  .mobile-results-shell { /* sin reglas — flujo normal */ }

  .mobile-results-backdrop {
    position: fixed;
    z-index: calc(var(--z-modal, 4000) - 1);
    inset-block-start: var(--r7-overlay-top, calc(var(--header-h) + var(--safe-top)));
    inset-block-end: 0;
    inset-inline: 0;
    display: block !important;
    background: var(--mobile-overlay-backdrop);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    transition: opacity 0.15s linear, visibility 0.15s linear;
  }

  body.mobile-overlay-open .mobile-results-backdrop {
    opacity: 1;
    visibility: visible;
  }

  /* --- OVERLAY BASE --- */
  .mobile-overlay {
    position: fixed !important;
    z-index: var(--z-modal, 4000) !important;
    inset-block-start: var(--r7-overlay-top, calc(var(--header-h) + var(--safe-top))) !important;
    inset-block-end: 0 !important;
    inset-inline: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    background: none !important;
    pointer-events: none !important;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s step-end;
  }

  .mobile-overlay.is-open {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: opacity 0.3s ease, visibility 0s;
  }

  .mobile-overlay__sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    inline-size: 100%;
    block-size: 100%;
    background: var(--mobile-overlay-surface);
    box-shadow: var(--mobile-overlay-shadow);
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  }

  /* VARIANTES: TOP Y BOTTOM */
  .mobile-overlay--bottom,
  .mobile-overlay--top {
    justify-content: flex-end !important;
    inset-block-start: var(--r7-overlay-top, calc(var(--header-h) + var(--safe-top))) !important;
  }

  .mobile-overlay--bottom .mobile-overlay__sheet,
  .mobile-overlay--top .mobile-overlay__sheet {
    max-height: calc(100vh - (var(--header-h) + var(--safe-top)));
    height: 100%;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }

  .mobile-overlay.is-open .mobile-overlay__sheet {
    transform: translateY(0) !important;
  }

  /* --- OVERLAY HEADER --- */
  .mobile-overlay__head {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-block-size: 72px;
    padding: calc(var(--safe-top, 20px) + 12px) 20px 16px;
    gap: var(--s-16);
    background: color-mix(in oklch, var(--surface) 80%, transparent);
    border-bottom: 1px solid color-mix(in oklch, var(--separator) 80%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-sizing: border-box;
  }

  .mobile-overlay__headcopy {
    flex: 1 1 auto;
    align-self: center;
    min-width: 0;
  }

  .mobile-overlay__eyebrow {
    display: block;
    margin: 0 0 4px;
    font-size: var(--fs-14);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted-2);
  }

  .mobile-overlay__title {
    margin: 0;
    font-size: clamp(1rem, 3.9vw, 1.125rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--label);
  }

  .mobile-overlay__headright {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
  }

  .mobile-overlay__close {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 40px;
    block-size: 40px;
    border-radius: 999px;
    background: color-mix(in oklch, var(--label) 6%, transparent);
    color: var(--label);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-overlay__close svg,
  .mobile-overlay__close [data-lucide] {
    inline-size: 18px;
    block-size: 18px;
    stroke-width: 2.5;
  }

  /* --- OVERLAY BODY --- */
  .mobile-overlay__body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px 20px calc(44px + env(safe-area-inset-bottom, 0));
  }

  /* --- CONFIG GRID & SWITCH --- */
  .r7-switch-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 0;
  }

  .r7-config-grid {
    display: grid;
    min-inline-size: 0;
    gap: 18px;
  }

  /* --- CONFIG CARDS --- */
  .r7-config-card {
    display: block;
    min-inline-size: 0;
    padding: 0;
    overflow: hidden;
    background: var(--mobile-overlay-card-bg);
    border: 1px solid var(--mobile-overlay-border);
    border-radius: 16px;
    box-shadow: none;
  }

  .r7-config-card[open] {
    background: var(--mobile-overlay-card-bg);
  }

  .r7-config-card>summary {
    list-style: none;
    cursor: pointer;
  }

  .r7-config-card>summary::-webkit-details-marker {
    display: none;
  }

  .r7-config-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 14px 16px;
    gap: 12px;
  }

  .r7-config-card__head::after {
    content: "";
    flex: 0 0 auto;
    inline-size: 10px;
    block-size: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    opacity: 0.55;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .r7-config-card[open]>.r7-config-card__head::after {
    opacity: 0.8;
    transform: rotate(225deg) translateY(-1px);
  }

  .r7-config-card__head--static::after {
    display: none;
  }

  .r7-config-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--label);
  }

  .r7-config-card__title i,
  .r7-config-card__title svg,
  .r7-config-card__title [data-lucide] {
    display: none;
  }

  .r7-config-card>.r7-config-form,
  .r7-config-card>.r7-config-grid {
    padding: 0 16px 16px;
  }

  /* --- CONFIG CARD: PERSONA --- */
  .r7-config-card--persona {
    border-style: dashed;
    border-color: color-mix(in oklch, var(--label) 14%, var(--separator) 86%);
    background: color-mix(in oklch, var(--surface) 97%, white 3%);
  }

  .r7-config-card--persona[open] {
    border-style: solid;
    border-color: color-mix(in oklch, var(--brand) 14%, var(--separator) 86%);
    background: var(--mobile-overlay-card-bg);
  }

  .r7-config-card--persona>.r7-config-card__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding: 14px 14px 14px 16px;
    gap: 12px;
  }

  .r7-config-card--persona>.r7-config-card__head::after {
    display: none;
  }

  .r7-config-card--persona>.r7-config-form,
  .r7-config-card--persona>.r7-config-grid {
    padding: 0 16px 16px;
  }

  .r7-persona-headicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 46px;
    block-size: 46px;
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.04);
  }

  .r7-persona-headicon svg,
  .r7-persona-headicon [data-lucide] {
    inline-size: 24px;
    block-size: 24px;
    stroke-width: 1.8; /* Bajando un pelín el peso */
  }

  .r7-persona-headicon--soft {
    border: 1px solid color-mix(in oklch, var(--separator) 82%, white 18%);
    background: color-mix(in oklch, var(--surface) 90%, var(--bg) 10%);
    color: color-mix(in oklch, var(--label) 54%, var(--muted-2) 46%);
  }

  .r7-persona-headcopy {
    display: grid;
    min-inline-size: 0;
    gap: 4px;
  }

  .r7-persona-headtitle {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--label);
  }

  .r7-persona-headsub {
    margin: 0;
    font-size: 13px;
    line-height: 1.28;
    color: var(--muted-2);
  }

  .r7-persona-headcta {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 42px;
    block-size: 42px;
    border-radius: 999px;
    background: #8b5cf6;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2);
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  }

  .r7-persona-headcta svg,
  .r7-persona-headcta [data-lucide] {
    inline-size: 20px;
    block-size: 20px;
    stroke-width: 2.2;
    transition: transform 180ms ease;
  }

  .r7-config-card--persona[open] .r7-persona-headcta svg,
  .r7-config-card--persona[open] .r7-persona-headcta [data-lucide] {
    transform: rotate(45deg);
  }

  @media (hover: hover) {
    .r7-persona-headcta:hover {
      transform: translateY(-1px);
      background-color: #6d28d9;
      box-shadow: 0 6px 12px rgba(124, 58, 237, 0.25);
    }
  }

  .r7-persona-headcta:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
  }

  /* --- CONFIG CARD: CARGAS --- */
  .r7-config-card--cargas .r7-persona-headicon {
    border-color: rgba(255, 179, 0, 0.22);
    background: rgba(255, 179, 0, 0.14);
    color: #ffb300;
  }

  .r7-config-card--cargas .r7-persona-headcta {
    background: #ffb300;
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 179, 0, 0.2);
  }

  @media (hover: hover) {
    .r7-config-card--cargas .r7-persona-headcta:hover {
      background-color: #f59e0b;
      box-shadow: 0 6px 12px rgba(255, 179, 0, 0.25);
    }
  }

  /* --- CONFIG CARD: KPI7 --- */
  .r7-config-card--kpi7 {
    position: relative;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .r7-config-card--kpi7::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        color-mix(in oklch, var(--separator) 82%, white 18%) 14%,
        color-mix(in oklch, var(--separator) 88%, white 12%) 50%,
        color-mix(in oklch, var(--separator) 82%, white 18%) 86%,
        transparent 100%);
  }

  .r7-config-kpi7--inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 16px 4px 2px;
    gap: 14px;
  }

  .r7-config-kpi7-main {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    min-inline-size: 0;
    gap: 10px;
  }

  .r7-config-kpi7-main .r7-ico,
  .r7-config-kpi7-main svg,
  .r7-config-kpi7-main [data-lucide] {
    color: #10b981;
    stroke-width: 2.3;
  }

  .r7-config-kpi7-headicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 20px;
    block-size: 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted-2);
    box-shadow: none;
  }

  .r7-config-kpi7-headicon svg,
  .r7-config-kpi7-headicon [data-lucide] {
    inline-size: 17px;
    block-size: 17px;
    stroke-width: 1.9;
  }

  .r7-config-kpi7-headcopy {
    min-inline-size: 0;
  }

  .r7-config-kpi7-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--muted-2);
  }

  .r7-config-kpi7-values {
    display: grid;
    justify-items: end;
    gap: 2px;
    text-align: right;
    white-space: nowrap;
  }

  .r7-config-kpi7__uf {
    font-size: clamp(19px, 5vw, 25px);
    font-weight: 740;
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--label);
  }

  .r7-config-kpi7__clp {
    font-size: 12.5px;
    line-height: 1.1;
    color: var(--muted-2);
  }

  /* --- CONFIG CARD: ASESOR --- */
  .r7-config-card--asesor {
    border-style: dashed;
    border-color: color-mix(in oklch, var(--label) 14%, var(--separator) 86%);
    background: color-mix(in oklch, var(--surface) 97%, white 3%);
  }

  .r7-config-card--asesor .r7-config-card__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 14px 14px 14px 16px;
    gap: 12px;
  }

  .r7-config-card--asesor .r7-config-form--asesor {
    display: grid;
    grid-template-columns: minmax(68px, 0.62fr) minmax(76px, 0.72fr) minmax(0, 1.2fr);
    align-items: end;
    gap: 10px;
  }

  .r7-config-card--asesor .r7-config-form--asesor .r7-config-field--full {
    grid-column: auto;
  }

  .r7-config-card--asesor .r7-config-form--asesor .r7-config-field--cotizantes {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block-end: 4px;
  }

  /* Slot familia en overlay mobile — CTA hero (vacío) o summary chip (construido) */
  .r7-config-card--asesor .r7-config-form--asesor .r7-config-field--familia {
    grid-column: 1 / -1;
    display: flex;
    align-items: stretch;
    padding-block-end: 4px;
  }

  .r7-config-fb-cta {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    inline-size: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--brand);
    color: white;
    font: 600 14px/1 var(--ff-sans);
    cursor: pointer;
    box-shadow: 0 4px 14px color-mix(in oklch, var(--brand) 28%, transparent);
    transition: background-color .15s ease, transform .12s ease;
  }

  .r7-config-fb-cta:hover {
    background: color-mix(in oklch, var(--brand) 88%, black 12%);
  }

  .r7-config-fb-cta:active {
    transform: scale(0.985);
  }

  .r7-config-fb-cta svg,
  .r7-config-fb-cta [data-lucide] {
    inline-size: 16px;
    block-size: 16px;
  }

  .r7-config-fb-summary {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    inline-size: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    background: color-mix(in oklch, var(--brand) 8%, var(--surface) 92%);
    border: 1px solid color-mix(in oklch, var(--brand) 22%, transparent);
    color: var(--brand);
    font: 500 13.5px/1.2 var(--ff-sans);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
  }

  .r7-config-fb-summary:hover {
    background: color-mix(in oklch, var(--brand) 14%, var(--surface) 86%);
    border-color: color-mix(in oklch, var(--brand) 32%, transparent);
  }

  .r7-config-fb-summary strong {
    font-weight: 700;
  }

  .r7-config-fb-summary__sep {
    opacity: 0.55;
  }

  .r7-config-fb-summary__edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 22px;
    block-size: 22px;
    border-radius: 999px;
    background: color-mix(in oklch, var(--brand) 18%, transparent);
    margin-inline-start: auto;
  }

  .r7-config-fb-summary__edit svg,
  .r7-config-fb-summary__edit [data-lucide] {
    inline-size: 13px;
    block-size: 13px;
  }

  .r7-config-card--asesor #autoOverlayTrash {
    border-color: color-mix(in oklch, var(--brand) 16%, transparent);
    background: color-mix(in oklch, var(--brand) 8%, var(--surface) 92%);
    color: color-mix(in oklch, var(--brand) 82%, var(--label) 18%);
  }

  .r7-config-card--asesor #autoOverlayTrash:hover,
  .r7-config-card--asesor #autoOverlayTrash:focus-visible {
    border-color: color-mix(in oklch, var(--brand) 24%, transparent);
    background: color-mix(in oklch, var(--brand) 12%, var(--surface) 88%);
    color: color-mix(in oklch, var(--brand) 82%, var(--label) 18%);
  }

  /* --- CONFIG CARD: ASESOR PRESETS --- */
  .r7-config-card--asesor-presets {
    border: 1px solid color-mix(in oklch, var(--separator) 84%, white 16%);
    background: linear-gradient(180deg,
        color-mix(in oklch, var(--surface) 98%, white 2%) 0%,
        color-mix(in oklch, var(--surface) 96%, white 4%) 100%);
  }

  .r7-config-card--asesor-presets .r7-config-card__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 14px 14px 12px 16px;
    gap: 12px;
  }

  .r7-config-presets-wrap {
    padding: 0 16px 16px;
  }

  .r7-config-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .r7-config-preset {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 42px;
    padding-inline: 12px;
    border: 1px solid color-mix(in oklch, var(--brand) 12%, var(--separator) 88%);
    border-radius: 14px;
    background: color-mix(in oklch, var(--surface) 96%, white 4%);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    color: color-mix(in oklch, var(--label) 88%, var(--brand) 12%);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  }

  .r7-config-preset:hover,
  .r7-config-preset:focus-visible {
    border-color: color-mix(in oklch, var(--brand) 20%, var(--separator) 80%);
    background: color-mix(in oklch, var(--brand) 8%, var(--surface) 92%);
    color: color-mix(in oklch, var(--brand) 72%, var(--label) 28%);
  }

  .r7-config-preset:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
  }

  /* --- CONFIG FORM --- */
  .r7-config-form {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    min-inline-size: 0;
    gap: 12px;
  }

  .r7-config-field {
    display: grid;
    min-inline-size: 0;
    gap: 6px;
  }

  .r7-config-field--full {
    grid-column: auto;
  }

  .r7-config-form>.r7-config-actionsbar {
    grid-column: 1 / -1;
  }

  .r7-config-field__label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--muted-2);
  }

  .r7-config-input {
    all: unset;
    display: block;
    inline-size: 100%;
    min-inline-size: 0;
    block-size: 46px;
    padding-inline: 14px;
    border: 1px solid var(--separator);
    border-radius: 14px;
    background: var(--surface);
    font-size: 16px;
    line-height: 1.2;
    color: var(--label);
    caret-color: var(--brand);
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  }

  .r7-config-input::placeholder {
    font-size: 16px;
    color: color-mix(in oklch, var(--muted-2) 75%, transparent); /* Tono más bajo */
  }

  .r7-config-input:focus {
    border-color: var(--brand);
    box-shadow: var(--focus-ring);
  }

  .r7-config-input.is-invalid,
  .r7-config-input[aria-invalid="true"] {
    border-color: #d63b3b !important;
    box-shadow: 0 0 0 4px rgba(214, 59, 59, 0.12) !important;
  }

  .r7-config-input--carga {
    min-inline-size: 0;
  }

  /* --- CONFIG CARGAS LIST --- */
  .r7-config-cargas-list {
    display: grid;
    gap: 10px;
  }

  .r7-config-carga-row {
    display: block;
  }

  .r7-config-carga-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding: 12px 12px 12px 14px;
    border: 1px solid color-mix(in oklch, var(--separator) 78%, transparent);
    border-radius: 16px;
    background: color-mix(in oklch, var(--surface) 96%, white 4%);
    gap: 12px;
  }

  .r7-config-carga-icon {
    display: none;
  }

  .r7-config-carga-icon svg,
  .r7-config-carga-icon [data-lucide] {
    inline-size: 20px;
    block-size: 20px;
    stroke-width: 1.9;
  }

  .r7-config-carga-main {
    display: grid;
    min-inline-size: 0;
    gap: 8px;
  }

  .r7-config-carga-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: var(--muted-2);
  }

  .r7-config-carga-main .r7-config-input--carga {
    min-inline-size: 0;
  }

  .r7-config-carga-remove {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 34px;
    block-size: 34px;
    border-radius: 999px;
    background: color-mix(in oklch, var(--surface) 90%, var(--bg) 10%);
    color: var(--muted-2);
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  }

  .r7-config-carga-remove svg,
  .r7-config-carga-remove [data-lucide] {
    inline-size: 16px;
    block-size: 16px;
    stroke-width: 2.1;
  }

  @media (hover: hover) {
    .r7-config-carga-remove:hover {
      background: color-mix(in oklch, var(--brand) 10%, white 90%);
      color: color-mix(in oklch, var(--brand) 72%, var(--label) 28%);
    }
  }

  .r7-config-carga-remove:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
  }

  /* --- CONFIG ACTIONS BAR --- */
  .r7-config-actionsbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 2px;
    gap: 10px;
  }

  .r7-config-actionsbar--asesor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    grid-column: 1 / -1;
    margin-top: 4px;
    gap: 10px;
  }

  .r7-config-hint {
    flex: 1 1 auto;
    min-inline-size: 0;
    font-size: 12.5px;
    line-height: 1.2;
    color: var(--muted-2);
  }

  /* --- CONFIG BUTTONS --- */
  .r7-config-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 38px;
    padding-inline: 14px;
    border: 1px solid color-mix(in oklch, var(--brand) 16%, transparent);
    border-radius: 12px;
    background: color-mix(in oklch, var(--brand) 8%, var(--surface) 92%);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: color-mix(in oklch, var(--brand) 82%, var(--label) 18%);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  }

  .r7-config-btn:hover,
  .r7-config-btn:focus-visible {
    border-color: color-mix(in oklch, var(--brand) 24%, transparent);
    background: color-mix(in oklch, var(--brand) 12%, var(--surface) 88%);
  }

  .r7-config-btn:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
  }

  .r7-config-btn--ghost {
    border-color: var(--separator);
    background: var(--surface);
    color: var(--label);
  }

  .r7-config-btn--ghost:hover,
  .r7-config-btn--ghost:focus-visible {
    border-color: color-mix(in oklch, var(--brand) 16%, var(--separator) 84%);
    background: color-mix(in oklch, var(--surface) 94%, var(--bg) 6%);
  }

  .r7-config-btn__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.01em;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .r7-config-btn.is-success {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.08);
  }

  /* --- AJUSTES SECTION: HEADER --- */
  .mobile-ajustes__section--header .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "topbox" "orden-label" "orden" "coberturas";
    align-items: start;
    max-width: none;
    margin: 0;
    padding-block: 10px 12px;
    padding-inline: 0;
    column-gap: 0;
    row-gap: 12px;
  }

  .mobile-ajustes__section--header .mobile-ajustes__topbox {
    display: grid;
    grid-area: topbox;
    grid-template-columns: max-content max-content;
    justify-content: center;
    margin-bottom: 10px;
    padding: 24px 16px;
    border: 1px dashed color-mix(in oklch, var(--label) 16%, var(--separator) 84%);
    border-radius: 18px;
    background: color-mix(in oklch, var(--surface) 97%, white 3%);
    column-gap: 26px;
    row-gap: 10px;
  }

  .mobile-ajustes__section--header .mobile-ajustes__topcol {
    display: grid;
    align-content: start;
    justify-items: center;
    min-inline-size: 0;
    row-gap: 10px;
  }

  .mobile-ajustes__section--header .hr-izq {
    display: contents;
  }

  .mobile-ajustes__section--header .hr-ajustes {
    display: none;
  }

  .mobile-ajustes__section--header .mobile-ajustes__topcol--vista {
    grid-column: 1;
  }

  .mobile-ajustes__section--header .mobile-ajustes__topcol--resultados {
    grid-column: 2;
  }

  .mobile-ajustes__section--header .hr-izq>.sidebar-title {
    grid-area: orden-label;
    align-self: center;
    justify-self: start;
    margin-top: 12px;
  }

  .mobile-ajustes__section--header .hr-izq>.hr-orden-shell {
    display: grid;
    grid-area: orden;
    align-self: stretch;
    justify-self: stretch;
    justify-content: stretch;
    min-inline-size: 0;
  }

  .mobile-ajustes__section--header .hr-izq>.hr-coberturas {
    display: contents;
  }

  .mobile-ajustes__section--header .hr-label {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--muted-2);
  }

  .mobile-ajustes__section--header .hr-group,
  .mobile-ajustes__section--header .select-wrap,
  .mobile-ajustes__section--header .hr-busqueda {
    inline-size: 100%;
  }

  .mobile-ajustes__section--header .hr-label+ :is(.hr-group, .select-wrap, .hr-busqueda) {
    margin-inline-start: 0;
  }

  .mobile-ajustes__section--header .mobile-ajustes__topcol .hr-group,
  .mobile-ajustes__section--header .mobile-ajustes__results-group {
    display: grid;
    justify-self: center;
    justify-content: center;
    min-inline-size: 0;
  }

  .mobile-ajustes__section--header .hr-orden,
  .mobile-ajustes__section--header .hr-coberturas,
  .mobile-ajustes__section--header .hr-orden-shell {
    min-inline-size: 0;
  }

  .mobile-ajustes__section--header .mobile-ajustes__topcol .hr-group {
    align-self: start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-ajustes__section--header .mobile-ajustes__results-group {
    align-self: start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-ajustes__section--header .vista-btn[data-proxy-click="#btnVistaAprender"],
  .mobile-ajustes__section--header .vista-btn[data-proxy-click="#btnHerramientas"],
  .mobile-ajustes__section--header .vista-btn[title="Aprender"],
  .mobile-ajustes__section--header .vista-btn[title="Herramientas"],
  .mobile-ajustes__section--header .hr-der,
  .mobile-ajustes__section--header .hr-busqueda,
  .mobile-ajustes__section--header .hr-der .btn-cart-icon {
    display: none !important;
  }

  .mobile-ajustes__section--header .vista-switch {
    --pad: 4px;
    position: relative;
    display: inline-grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    inline-size: auto;
    min-block-size: 42px;
    padding: var(--pad);
    border: 1px solid #d7dde8;
    border-radius: 999px;
    background: #f3f5f8;
    box-shadow: none;
    overflow: hidden;
    gap: 0;
  }

  .mobile-ajustes__section--header .vista-switch--mobile-ajustes::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: var(--pad);
    left: var(--pad);
    right: var(--pad);
    height: calc(100% - (var(--pad) * 2));
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.06);
  }

  .mobile-ajustes__section--header .vista-switch--mobile-ajustes .vista-btn:nth-child(2) {
    display: none !important;
  }

  .mobile-ajustes__section--header .vista-btn {
    all: unset;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 34px;
    min-inline-size: 44px;
    padding-inline: 12px;
    border-radius: 999px;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 180ms ease;
  }

  .mobile-ajustes__section--header .vista-btn:hover,
  .mobile-ajustes__section--header .vista-btn:active {
    background: transparent !important;
    box-shadow: none !important;
    color: #111827;
  }

  .mobile-ajustes__section--header .vista-btn.activo,
  .mobile-ajustes__section--header .vista-btn[aria-pressed="true"] {
    color: #111827;
  }

  .mobile-ajustes__section--header .vista-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
  }

  .mobile-ajustes__section--header .vista-btn svg,
  .mobile-ajustes__section--header .vista-btn [data-lucide] {
    inline-size: 20px;
    block-size: 20px;
    stroke-width: 1.9;
  }

  .mobile-ajustes__topmeta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 0;
  }

  .mobile-ajustes__results-kpi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    block-size: 38px;
    min-inline-size: 0;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: none;
    gap: 6px;
  }

  .mobile-ajustes__results-value {
    display: inline;
    font-size: clamp(21px, 4.1vw, 26px);
    font-weight: 760;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #fff;
    font-variant-numeric: tabular-nums;
  }

  .mobile-ajustes__results-label {
    display: inline;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.01em;
    text-transform: none;
    color: rgba(255, 255, 255, 0.96);
  }

  .mobile-ajustes__section--header .hr-orden-shell {
    display: grid;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 10px;
  }

  .mobile-ajustes__section--header .hr-orden {
    display: grid;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    gap: 0;
  }

  .mobile-ajustes__section--header .hr-coberturas {
    display: grid;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    gap: 0;
  }

  .mobile-ajustes__section--header .hr-orden .boton-filtro,
  .mobile-ajustes__section--header .hr-coberturas .boton-filtro,
  .mobile-ajustes__section--header .hr-coberturas .boton-filtro.redondo {
    inline-size: 100%;
    min-block-size: 44px;
    justify-content: center;
    font-size: 15px;
  }

  .mobile-ajustes__section--header .hr-orden .caja-criterios {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr) minmax(0, 0.95fr) minmax(0, 0.7fr);
    inline-size: 100%;
    overflow: hidden;
    padding: 6px;
    border: 1px solid color-mix(in oklch, var(--separator) 88%, white 12%);
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
  }

  .mobile-ajustes__section--header .hr-orden .boton-filtro {
    display: flex;
    align-items: center;
    min-inline-size: 0;
    padding-inline: 0;
    border-radius: 10px;
    text-align: center;
    white-space: nowrap;
  }

  .mobile-ajustes__section--header .hr-orden .boton-filtro+.boton-filtro {
    border-inline-start: 0;
  }

  .mobile-ajustes__section--header .hr-coberturas .caja-criterios {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    inline-size: 100%;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 8px;
  }

  .mobile-ajustes__section--header .hr-coberturas .boton-filtro.redondo {
    block-size: 44px;
    border-radius: 14px;
  }

  .mobile-ajustes__section--header .hr-coberturas .boton-filtro.redondo>span {
    display: inline;
  }

  .mobile-ajustes__section--header .hr-coberturas .boton-filtro.redondo::before {
    content: none !important;
  }

  .mobile-ajustes__section--header .select-wrap {
    display: block;
  }

  .mobile-ajustes__section--header .select-wrap::after {
    inset-inline-end: 24px;
  }

  .mobile-ajustes__section--header .hr-select {
    display: block;
    inline-size: 100%;
    min-inline-size: 0;
    block-size: var(--mobile-overlay-control-h);
    padding-inline: 14px 40px;
    border-radius: 14px;
    font-size: 15px;
  }

  .mobile-ajustes__section--header .select-wrap::after,
  .mobile-ajustes__section--header .select-wrap svg,
  .mobile-ajustes__section--header .select-wrap [data-lucide],
  .mobile-ajustes__section--header .hr-der .btn-cart-icon svg,
  .mobile-ajustes__section--header .hr-der .btn-cart-icon [data-lucide] {
    inline-size: 18px;
    block-size: 18px;
  }

  .mobile-ajustes__section--header .busq-input {
    inline-size: 100%;
    max-inline-size: none;
    min-inline-size: 0;
    font-size: 16px;
  }

  /* --- AJUSTES SECTION: SIDEBAR --- */
  .mobile-ajustes__section--sidebar .sidebar-panel {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-ajustes__section--sidebar .sidebar-scroll {
    max-block-size: none !important;
    padding: 0;
    overflow: visible !important;
  }

  .mobile-ajustes__section--sidebar .sidebar-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 10px;
    padding: 24px 0 10px;
    border-bottom: 0;
    background: transparent;
    gap: 0.75rem;
  }

  .mobile-ajustes__section--sidebar .sidebar-head::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        color-mix(in oklch, var(--separator) 82%, white 18%) 16%,
        color-mix(in oklch, var(--separator) 88%, white 12%) 50%,
        color-mix(in oklch, var(--separator) 82%, white 18%) 84%,
        transparent 100%);
    pointer-events: none;
  }

  .mobile-ajustes__section--sidebar .sidebar-title,
  .mobile-ajustes__section--header .sidebar-title {
    margin: 0;
    font-size: clamp(1rem, 3.9vw, 1.125rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--label);
  }

  .mobile-ajustes__section--sidebar .sidebar-title [data-lucide] {
    inline-size: 18px;
    block-size: 18px;
    stroke-width: 2;
    color: currentColor;
  }

  .mobile-ajustes__section--sidebar .sidebar-head .hr-contador {
    display: none !important;
  }

  .mobile-ajustes__section--sidebar #ordenamiento {
    display: grid;
    gap: 12px;
  }

  .mobile-ajustes__section--sidebar #ordenamiento>.caja {
    padding: 14px 16px 13px;
    border: 1px solid color-mix(in oklch, var(--separator) 72%, white 28%);
    border-radius: 18px;
    background: color-mix(in oklch, var(--brand) 3.8%, white 96.2%);
    backdrop-filter: blur(var(--blur-md)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--blur-md)) saturate(120%);
    box-shadow: none;
  }

  .mobile-ajustes__section--sidebar #ordenamiento>.caja:has(.bloque-filtro-precio) {
    border: 1px solid color-mix(in oklch, var(--separator) 72%, white 28%);
    background: color-mix(in oklch, var(--brand) 3.8%, white 96.2%);
  }

  /* --- MONEDA SLOT --- */
  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-slot {
    display: grid;
    margin-bottom: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    gap: 10px;
  }

  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-slot .label-select {
    display: none;
  }

  /* --- LABEL SELECT --- */
  .mobile-ajustes__section--sidebar .label-select {
    display: flex;
    align-items: center;
    width: 100%;
    margin-block-end: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: color-mix(in oklch, var(--brand) 65%, var(--label) 35%);
    cursor: default;
    pointer-events: none;
    gap: 10px;
  }

  .mobile-ajustes__section--sidebar .label-select::after {
    content: "";
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.15;
  }

  .mobile-ajustes__section--sidebar .label-select__inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-ajustes__section--sidebar .label-select__icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    opacity: 1;
    color: currentColor;
    stroke: currentColor;
    stroke-width: 1.9;
  }

  /* --- MONEDA CHIPS --- */
  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips {
    --pad: 4px;
    --gap: 4px;
    position: relative;
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    inline-size: 100%;
    min-block-size: 42px;
    padding: var(--pad);
    border: 1px solid #d7dde8;
    border-radius: 999px;
    background: #f3f5f8;
    box-shadow: none;
    overflow: hidden;
    gap: var(--gap);
  }

  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: var(--pad);
    left: var(--pad);
    width: calc((100% - (var(--pad) * 2) - (var(--gap) * 2)) / 3);
    height: calc(100% - (var(--pad) * 2));
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.06);
    transform: translateX(0);
    transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips:has(.boton-filtro:nth-child(2)[aria-pressed="true"])::before {
    transform: translateX(calc(100% + var(--gap)));
  }

  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips:has(.boton-filtro:nth-child(3)[aria-pressed="true"])::before {
    transform: translateX(calc((100% + var(--gap)) * 2));
  }

  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips .boton-filtro {
    all: unset;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 34px;
    min-inline-size: 0;
    padding-inline: 10px;
    border-radius: 999px;
    background: transparent !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: #475569;
    cursor: pointer;
    appearance: none;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
    transition: color 180ms ease;
  }

  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips .boton-filtro:hover,
  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips .boton-filtro:active {
    background: transparent !important;
    box-shadow: none !important;
    color: #475569;
  }

  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips .boton-filtro.activo,
  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips .boton-filtro[aria-pressed="true"] {
    font-weight: 600;
    color: #111827;
  }

  .mobile-ajustes__section--sidebar .mobile-ajustes-moneda-chips .boton-filtro:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
  }

  /* --- SIDEBAR FILTERS --- */
  .mobile-ajustes__section--sidebar .filtroSelect,
  .mobile-ajustes__section--sidebar .filtroInput,
  .mobile-ajustes__section--sidebar .btn-cta-solicitar,
  .mobile-ajustes__section--sidebar #btnLimpiarFiltros.btn-cta-solicitar {
    min-block-size: 48px;
    font-size: 16px;
    box-shadow: none;
  }

  .mobile-ajustes__section--sidebar .filtroInput {
    all: unset;
    display: block;
    inline-size: 100%;
    block-size: 48px;
    padding-inline: 14px;
    border: 1px solid var(--separator);
    border-radius: 14px;
    background: var(--surface);
    font-size: 16px;
    color: var(--muted-2);
    caret-color: var(--brand);
    box-sizing: border-box;
    transition: border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
  }

  .mobile-ajustes__section--sidebar .filtroInput:focus {
    border-color: var(--brand);
    box-shadow: var(--focus-ring);
    color: var(--label);
  }

  .mobile-ajustes__section--sidebar .filtroInput::placeholder {
    font-size: 16px;
    font-weight: var(--fw-medium);
    color: var(--muted-2);
  }

  .mobile-ajustes__section--sidebar .filtroSelect {
    inline-size: 100%;
    block-size: 48px;
    padding: 0 40px 0 14px;
    border: 1px solid var(--separator);
    border-radius: 14px;
    outline: none;
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 8l5 5 5-5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    background-clip: padding-box;
    font-size: 16px;
    color: var(--muted-2);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease);
  }

  .mobile-ajustes__section--sidebar .filtroSelect:hover {
    border-color: color-mix(in oklch, var(--brand) 18%, var(--separator) 82%);
    background-color: var(--surface);
    color: var(--label);
  }

  .mobile-ajustes__section--sidebar .filtroSelect:focus-visible {
    border-color: var(--brand);
    outline: none;
    background-color: var(--surface);
    box-shadow: var(--focus-ring);
    color: var(--label);
  }

  .mobile-ajustes__section--sidebar .filtroSelect:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }

  .mobile-ajustes__section--sidebar .caja input.filtroInput {
    margin-top: 0;
  }

  .mobile-ajustes__section--sidebar #filtroClinicasInput {
    font-size: 16px;
    line-height: 1.2;
    -webkit-text-size-adjust: 100%;
  }

  .mobile-ajustes__section--sidebar #filtroClinicasInput::placeholder {
    font-size: 16px;
  }

  .mobile-ajustes__section--sidebar .autocomplete-list {
    position: relative;
    inset: auto;
    max-block-size: 240px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    margin-top: var(--s-8);
    padding: 8px;
    border: 1px solid var(--separator);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: none;
  }

  .mobile-ajustes__section--sidebar .autocomplete-item {
    display: block;
    width: 100%;
    padding: 12px 10px;
    border: 0;
    border-bottom: 1px dotted var(--separator);
    border-radius: 10px;
    background: transparent;
    font-size: 15px;
    font-weight: var(--fw-regular);
    line-height: 1.35;
    text-align: left;
    color: var(--label);
    cursor: pointer;
  }

  .mobile-ajustes__section--sidebar .autocomplete-item:last-child {
    border-bottom: none;
  }

  .mobile-ajustes__section--sidebar .autocomplete-item:hover,
  .mobile-ajustes__section--sidebar .autocomplete-item:focus-visible {
    outline: 2px solid transparent;
    background: var(--surface-hover);
    box-shadow: var(--focus-ring);
  }

  .mobile-ajustes__section--sidebar #covDeseadaWrap .cobertura-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
    gap: 12px;
  }

  .mobile-ajustes__section--sidebar .bloque-filtro-precio,
  .mobile-ajustes__section--sidebar .bloque-filtros-activos,
  .mobile-ajustes__section--sidebar .caja-limpiar {
    gap: 12px;
  }

  .mobile-ajustes__section--sidebar .bloque-filtros-activos {
    display: grid;
    min-inline-size: 0;
    margin-bottom: 14px;
    padding: var(--s-12);
    border: 1px dashed color-mix(in oklab, var(--separator) 90%, var(--label) 10%);
    border-radius: var(--rad-md);
    background: transparent;
    gap: var(--s-12);
  }

  .mobile-ajustes__section--sidebar .filtros-seleccionados {
    display: flex;
    flex-wrap: wrap;
    min-height: var(--s-8);
    min-inline-size: 0;
    padding: var(--s-8) 0 var(--s-4);
    gap: var(--s-8);
  }

  .mobile-ajustes__section--sidebar .filtros-seleccionados .chip {
    display: inline-flex;
    align-items: center;
    block-size: 34px;
    max-inline-size: 100%;
    min-inline-size: max-content;
    padding-inline: 11px;
    border-radius: var(--rad-pill, 9999px);
    background: color-mix(in oklab, var(--brand) 8%, var(--surface) 92%);
    font-size: 14px;
    color: color-mix(in oklab, var(--brand) 82%, white);
    gap: var(--s-6);
  }

  .mobile-ajustes__section--sidebar .filtros-seleccionados .chip .chip-x {
    all: unset;
    display: inline-flex;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    inline-size: 20px;
    block-size: 20px;
    border-radius: 50%;
    color: currentColor;
    opacity: 0.72;
    cursor: pointer;
    transition: background var(--motion-fast) var(--motion-ease), opacity var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
  }

  .mobile-ajustes__section--sidebar .filtros-seleccionados .chip .chip-x:hover,
  .mobile-ajustes__section--sidebar .filtros-seleccionados .chip .chip-x:focus-visible {
    outline: 2px solid transparent;
    background: color-mix(in oklch, var(--brand) 10%, transparent);
    box-shadow: none;
    color: var(--brand);
    opacity: 1;
  }

  .mobile-ajustes__section--sidebar .filtros-match-modo {
    padding-block: 4px;
  }

  .mobile-ajustes__section--sidebar .toggle-match {
    padding-block: 2px;
  }

  .mobile-ajustes__section--sidebar .toggle-slider {
    position: relative;
    flex: 0 0 auto;
    inline-size: 40px;
    block-size: 20px;
    border-radius: 999px;
    background: var(--border-subtle, #d0d0d0);
  }

  .mobile-ajustes__section--sidebar .toggle-slider::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    inline-size: 18px;
    block-size: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform var(--motion-fast) var(--motion-ease);
  }

  .mobile-ajustes__section--sidebar .toggle-input:checked+.toggle-slider {
    background: #16a34a;
  }

  .mobile-ajustes__section--sidebar .toggle-input:checked+.toggle-slider::before {
    transform: translateX(20px);
  }

  .mobile-ajustes__section--sidebar input[type="range"]::-webkit-slider-thumb {
    inline-size: 22px;
    block-size: 22px;
    margin-top: calc((var(--fp-track-h) - 22px) / 2);
    appearance: none;
    -webkit-appearance: none;
  }

  .mobile-ajustes__section--sidebar input[type="range"]::-moz-range-thumb {
    inline-size: 22px;
    block-size: 22px;
    border-radius: 999px;
  }

  .mobile-ajustes__section--sidebar .select-wrap::after,
  .mobile-ajustes__section--sidebar .select-wrap svg,
  .mobile-ajustes__section--sidebar .select-wrap [data-lucide],
  .mobile-ajustes__section--sidebar .btn-cta-solicitar svg,
  .mobile-ajustes__section--sidebar .btn-cta-solicitar [data-lucide],
  .mobile-ajustes__section--sidebar #btnLimpiarFiltros.btn-cta-solicitar svg,
  .mobile-ajustes__section--sidebar #btnLimpiarFiltros.btn-cta-solicitar [data-lucide] {
    inline-size: 18px;
    block-size: 18px;
  }

  .mobile-ajustes__section--sidebar #btnLimpiarFiltros.btn-cta-solicitar {
    border-radius: 16px;
  }

  /* --- GLOBAL STATES: OVERLAY OPEN --- */
  body.mobile-overlay-open {
    overflow: hidden;
  }

  body.mobile-overlay-open::after {
    content: none;
  }

  body.mobile-overlay-open #resumen7 {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(150%);
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
  }

  /* --- IOS DOCK: #resumen7 --- */
  #resumen7 {
    position: fixed;
    z-index: calc(var(--z-modal, 4000) + 10);
    inset-block-start: auto;
    inset-block-end: calc(20px + env(safe-area-inset-bottom, 0));
    inset-inline-start: 50%;
    inline-size: max-content;
    max-inline-size: calc(100vw - 32px);
    padding: 6px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 32px;
    background: color-mix(in oklch, var(--surface) 75%, transparent);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow:
      0 14px 44px -10px rgba(0, 0, 0, 0.18),
      0 5px 15px -3px rgba(0, 0, 0, 0.1),
      inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    overflow: visible;
    transform: translateX(-50%);
    transition:
      opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 0.3s ease;
  }

  body.r7-dock-hidden #resumen7 {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(120%);
  }

  #resumen7 .r7-layout,
  #resumen7 .r7-side,
  #resumen7 .r7-side-row {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #resumen7 .r7-layout {
    padding: 0;
    gap: 0;
  }

  #resumen7 .r7-main {
    display: none;
  }

  #resumen7 .r7-side {
    position: relative;
    z-index: 2;
  }

  #resumen7 .r7-side-row {
    width: 100%;
    gap: 14px;
  }

  #resumen7 .r7-side-actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    min-inline-size: 0;
    margin-inline: auto;
    gap: 8px;
  }

  #resumen7 .r7-side-actions>* {
    position: relative;
  }

  #resumen7 .r7-search-shell {
    position: relative;
    z-index: 3;
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    inline-size: 44px;
    min-inline-size: 44px;
    transition: flex-basis 220ms cubic-bezier(0.32, 0.72, 0, 1), inline-size 220ms cubic-bezier(0.32, 0.72, 0, 1), max-inline-size 220ms cubic-bezier(0.32, 0.72, 0, 1);
  }

  #resumen7 .r7-side-actions.is-search-open {
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  #resumen7 .r7-side-actions.is-search-open #r7LauncherBtn {
    order: 1;
    flex: 0 0 auto;
  }

  #resumen7 .r7-side-actions.is-search-open #r7SearchShell {
    order: 2;
    flex: 1 1 auto;
    max-inline-size: none;
  }

  #resumen7 .r7-side-actions.is-search-open #r7ToolsShortcut {
    order: 3;
    flex: 0 0 auto;
    display: inline-flex !important;
  }

  #resumen7 .r7-side-actions.is-search-open #r7AjustesToggle,
  #resumen7 .r7-side-actions.is-search-open #r7CompararBtn,
  #resumen7 .r7-side-actions.is-search-open #r7CartMount {
    display: none !important;
  }

  #resumen7 .r7-cart-mount {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-inline-size: 58px;
    padding-left: 0;
  }

  #resumen7 .r7-cart-mount:empty {
    display: none;
  }

  #resumen7 .r7-ts {
    display: flex;
    flex: 0 1 auto;
    justify-content: center;
  }

  /* --- SEARCH CHIP MOUNT --- */
  .r7-search-chip-mount {
    position: fixed;
    z-index: calc(var(--z-modal, 4000) + 3);
    left: 50%;
    top: calc(var(--header-h) + var(--safe-top) + 78px);
    display: flex;
    justify-content: center;
    width: min(calc(100vw - (var(--mobile-results-gutter) * 2)), var(--mobile-results-max));
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 180ms ease, visibility 0s linear 0s, transform 180ms ease;
  }

  .r7-search-chip-mount[hidden] {
    display: none !important;
  }

  .r7-search-chip-mount>.chip {
    display: inline-flex;
    align-items: center;
    max-inline-size: 100%;
    min-inline-size: max-content;
    min-block-size: 42px;
    padding: 6px 8px 6px 14px;
    border: 1px solid color-mix(in oklch, var(--separator) 78%, white 22%);
    border-radius: 999px;
    background: color-mix(in oklch, var(--surface) 96%, white 4%);
    pointer-events: auto;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    gap: 8px;
  }

  .r7-search-chip-mount .chip-txt {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--label);
  }

  .r7-search-chip-mount .chip-x {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    inline-size: 24px;
    block-size: 24px;
    border: 1px solid color-mix(in oklch, var(--separator) 82%, white 18%);
    border-radius: 999px;
    background: color-mix(in oklch, var(--surface) 90%, white 10%);
    font-size: 15px;
    line-height: 1;
    color: var(--muted-2);
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
  }

  .r7-search-chip-mount .chip-x:hover,
  .r7-search-chip-mount .chip-x:focus-visible {
    border-color: color-mix(in oklch, var(--brand) 22%, white 78%);
    background: color-mix(in oklch, var(--brand) 10%, white 90%);
    color: var(--label);
  }

  /* --- DOCK TOP CONTROLS: #r7Switch --- */
  #r7Switch {
    --ts-x: 0px;
    --ts-w: 0px;
    --pad: 4px;
    --gap: 5px;
    position: relative;
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: center;
    min-block-size: 40px;
    max-width: 100%;
    padding: var(--pad);
    border: 1px solid color-mix(in oklab, var(--brand) 15%, var(--stroke-2));
    border-radius: 999px;
    background: color-mix(in oklab, var(--brand) 4%, var(--glass-74));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--inset-hi-2) inset, var(--shadow-sm);
    gap: var(--gap);
  }

  #r7Switch::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: var(--pad);
    left: var(--pad);
    width: var(--ts-w, 0px);
    height: calc(100% - var(--pad) * 2);
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 2px 10px var(--brand-glow);
    transform: translateX(var(--ts-x, 0px));
    transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1), width 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  #r7Switch .r7-ts-btn {
    position: relative;
    z-index: 1;
    min-block-size: 32px;
    padding-inline: 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--muted);
    cursor: pointer;
    appearance: none;
    transition: color 180ms ease;
  }

  #r7Switch .r7-ts-btn:hover,
  #r7Switch .r7-ts-btn.on,
  #r7Switch .r7-ts-btn[aria-selected="true"] {
    color: var(--c-white);
  }

  #r7Switch .r7-ts-btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
  }

  #r7Switch .r7-ts-btn[data-mode="comparar"] {
    display: none !important;
  }

  /* --- DOCK BUTTONS --- */
  #resumen7 .r7-launcher-btn,
  #resumen7 .r7-topdock-btn,
  #resumen7 .r7-search-toggle,
  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top {
    all: unset;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: transparent;
    color: var(--label);
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #resumen7 .r7-launcher-btn:active,
  #resumen7 .r7-topdock-btn:active,
  #resumen7 .r7-search-toggle:active,
  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top:active {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(0.88);
  }

  #resumen7 .r7-side-actions button svg,
  #resumen7 .r7-side-actions button [data-lucide],
  #resumen7 .r7-side-actions .btn-cart-icon svg,
  #resumen7 .r7-side-actions .btn-cart-icon [data-lucide] {
    display: block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    stroke-width: 2.1;
    color: var(--label);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #resumen7 .r7-launcher-btn[aria-expanded="true"],
  #resumen7 .r7-topdock-btn[aria-expanded="true"],
  #resumen7 .r7-search-toggle[aria-expanded="true"],
  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.is-open {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in oklch, var(--brand) 25%, transparent);
  }

  #resumen7 .r7-launcher-btn[aria-expanded="true"] svg,
  #resumen7 .r7-topdock-btn[aria-expanded="true"] svg,
  #resumen7 .r7-search-toggle[aria-expanded="true"] svg,
  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.is-open svg {
    color: #fff;
    stroke: #fff;
  }

  #resumen7 .r7-topdock-btn {
    flex: 0 0 auto;
  }

  #resumen7 #r7AjustesToggle[data-filter-count] {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    inline-size: auto;
    min-inline-size: unset;
    padding-inline: 12px 13px;
    gap: 6px;
  }

  #resumen7 #r7AjustesToggle[data-filter-count]::after {
    content: attr(data-filter-count);
    display: inline-grid;
    flex: 0 0 22px;
    place-items: center;
    inline-size: 22px;
    min-inline-size: 22px;
    block-size: 22px;
    padding: 0;
    border: 1px solid color-mix(in oklch, var(--brand) 68%, var(--separator, #e6eaf0));
    border-radius: 999px;
    background: color-mix(in oklch, var(--brand) 17%, var(--surface));
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    color: var(--brand);
    box-shadow: 0 1px 0 color-mix(in oklch, white 72%, transparent) inset;
  }

  .r7-search-toggle {
    flex: 0 0 48px;
  }

  .r7-launcher-btn {
    flex: 0 0 50px;
    padding-inline: 0;
  }

  /* --- DOCK SEARCH BAR --- */
  .hr-busqueda--mobile-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    inline-size: 100%;
    min-block-size: 48px;
    margin: 0;
    padding-inline: 14px;
    border: 1px solid color-mix(in oklch, var(--brand) 12%, transparent);
    border-radius: 16px;
    background: color-mix(in oklch, var(--surface) 96%, white 4%);
    box-shadow: none;
    box-sizing: border-box;
  }

  .hr-busqueda--mobile-top .busq-icono {
    inline-size: 18px;
    block-size: 18px;
    margin-inline: 0 8px 0 0;
    color: color-mix(in oklch, var(--brand) 44%, var(--muted-2) 56%);
  }

  .hr-busqueda--mobile-top .busq-input {
    inline-size: 100%;
    max-inline-size: none;
    min-inline-size: 0;
    font-size: 16px;
    color: var(--label);
  }

  .hr-busqueda--mobile-top .busq-input::placeholder {
    font-size: 16px;
  }

  .hr-busqueda--mobile-top:focus-within {
    border-color: color-mix(in oklch, var(--brand) 28%, transparent);
    box-shadow: var(--focus-ring);
  }

  /* --- CART BUTTON --- */
  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top {
    gap: 12px;
    padding: 0 11px;
    border: 0 solid transparent;
    border-radius: 999px;
    background: transparent;
    font: 600 14px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
    color: color-mix(in oklch, var(--brand) 18%, color-mix(in oklch, var(--muted-2) 36%, var(--label) 64%) 82%);
    backface-visibility: hidden;
    isolation: isolate;
    overflow: visible;
    transform: none;
  }

  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top:has(.cart-badge:not([hidden])) {
    inline-size: 84px;
    min-inline-size: 84px;
    padding-inline: 16px 20px;
    justify-content: flex-start;
  }

  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top .cart-badge {
    position: absolute;
    top: 50%;
    right: 10px;
    display: inline-grid;
    place-items: center;
    inline-size: 26px;
    min-inline-size: 26px;
    block-size: 26px;
    padding: 0;
    border: 1px solid var(--separator, #e6eaf0);
    border-radius: 999px;
    background: color-mix(in oklch, var(--bg, #0f1422) 10%, var(--surface, #fff) 90%);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    color: var(--label, #0f1422);
    box-shadow: 0 1px 0 color-mix(in oklch, white 72%, transparent) inset;
    transform: translateY(-50%);
  }

  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.has-items {
    border: 1px solid color-mix(in oklch, var(--brand) 62%, var(--separator, #e6eaf0));
    border-radius: 999px;
    background: color-mix(in oklch, var(--brand) 12%, var(--surface));
    color: var(--brand);
    box-shadow: 0 0 0 1px color-mix(in oklch, var(--brand) 16%, transparent);
  }

  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.has-items .cart-badge {
    border: 1px solid color-mix(in oklch, var(--brand) 68%, var(--separator, #e6eaf0));
    background: color-mix(in oklch, var(--brand) 17%, var(--surface));
    color: var(--brand);
  }

  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.has-items svg,
  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.has-items [data-lucide],
  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.has-items [data-lucide="shopping-bag"] {
    color: currentColor !important;
    stroke: currentColor !important;
  }

  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.has-items:hover,
  #resumen7 .btn-cart-icon.btn-cart-icon--mobile-top.has-items:focus-visible {
    border-color: color-mix(in oklch, var(--brand) 72%, var(--separator, #e6eaf0));
    background: color-mix(in oklch, var(--brand) 19%, var(--surface));
    color: var(--brand);
  }

  .btn-cart-icon .cart-badge[hidden] {
    display: none !important;
  }

  /* --- GLOBAL HEADER CART BUTTON (MOBILE) --- */
  .nav .btn-cart-icon--header-mobile {
    display: none; /* hidden by default, shown by JS */
  }
  
  @media (max-width: 1024px) {
    .nav .btn-cart-icon--header-mobile.has-items {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border: 1px solid color-mix(in oklch, var(--brand) 62%, var(--separator, #e6eaf0));
      border-radius: 999px;
      background: color-mix(in oklch, var(--brand) 12%, var(--surface, #fff));
      color: var(--brand);
      box-shadow: 0 0 0 1px color-mix(in oklch, var(--brand) 16%, transparent);
      font: 600 13px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
      cursor: pointer;
    }

    .nav .btn-cart-icon--header-mobile.has-items svg,
    .nav .btn-cart-icon--header-mobile.has-items [data-lucide] {
      color: currentColor !important;
      stroke: currentColor !important;
      width: 16px;
      height: 16px;
    }

    .nav .btn-cart-icon--header-mobile.has-items .cart-badge {
      display: inline-grid;
      place-items: center;
      inline-size: 20px;
      block-size: 20px;
      border-radius: 999px;
      background: color-mix(in oklch, var(--brand) 17%, var(--surface, #fff));
      color: var(--brand);
      font-size: 12px;
      font-weight: 700;
      border: 1px solid color-mix(in oklch, var(--brand) 68%, var(--separator, #e6eaf0));
    }
  }


  .btn-cart-icon.btn-cart-icon--mobile-top.cart-chip-anim .cart-badge {
    will-change: auto;
    animation: none !important;
  }

  /* --- SEARCH OPEN STATE --- */
  #resumen7 .r7-side-actions.is-search-open .r7-launcher-btn {
    display: inline-flex;
  }

  #resumen7 .r7-side-actions.is-search-open .r7-search-shell {
    flex: 1 1 auto;
    inline-size: auto;
    min-inline-size: 200px;
    max-inline-size: none;
    padding-inline: 4px;
  }

  #resumen7 .r7-side-actions.is-search-open .r7-search-toggle {
    display: none;
  }

  #resumen7 .r7-side-actions.is-search-open .r7-search-mount {
    display: block;
    position: static;
    flex: 1 1 auto;
    min-inline-size: 0;
    inline-size: auto;
    transform: none;
  }

  #resumen7 .r7-side-actions.is-search-open #hrBusqueda {
    width: 100%;
    block-size: 44px;
    padding-inline: 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.04);
    box-shadow: none;
  }

  /* --- CONFIG STATS --- */
  .r7-config-stats {
    display: grid;
    gap: 12px;
  }

  .r7-config-stat {
    display: grid;
    gap: 6px;
    min-inline-size: 0;
  }

  .r7-config-stat--full {
    grid-column: 1 / -1;
  }

  .r7-config-stat__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .r7-config-stat__actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .r7-config-stat__label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--muted-2);
  }

  .r7-config-stat__value {
    font-size: clamp(18px, 4.5vw, 22px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--label);
  }

  /* --- NESTED MEDIA QUERIES (within mobile breakpoint) --- */
  @media (max-width: 560px) {
    .mobile-ajustes__section--header .header-inner {
      grid-template-columns: minmax(0, 1fr);
    }

    .mobile-ajustes__section--header .mobile-ajustes__topbox {
      padding: 28px 14px;
      border-radius: 16px;
      column-gap: 18px;
    }

    .mobile-ajustes__section--header .vista-switch {
      min-block-size: 36px;
    }

    .mobile-ajustes__section--header .vista-btn {
      min-block-size: 28px;
      min-inline-size: 40px;
      padding-inline: 7px;
    }

    .mobile-ajustes__results-kpi {
      block-size: 36px;
      padding: 0 12px;
      gap: 5px;
    }

    .mobile-ajustes__results-value {
      font-size: clamp(19px, 5.7vw, 24px);
    }

    .mobile-ajustes__results-label {
      font-size: 12px;
    }
  }

  @media (max-width: 420px) {
    .r7-config-card--asesor .r7-config-form--asesor {
      grid-template-columns: minmax(64px, 0.62fr) minmax(72px, 0.72fr) minmax(0, 1.14fr);
      gap: 8px;
    }

    .r7-config-card--asesor .r7-config-input {
      padding-inline: 12px;
    }

    .r7-config-presets {
      grid-template-columns: 1fr 1fr;
    }

    .r7-config-actionsbar--asesor {
      align-items: center;
      flex-wrap: nowrap;
    }

    .r7-config-hint {
      inline-size: auto;
    }

    .r7-search-chip-mount {
      bottom: calc(env(safe-area-inset-bottom, 0) + 106px);
    }

    .r7-config-stats {
      grid-template-columns: 1fr;
    }

    .r7-config-stat--full {
      grid-column: auto;
    }

    .r7-config-stat__top {
      flex-direction: column;
    }

    .r7-config-stat__actions {
      width: 100%;
      justify-content: flex-start;
    }
  }

  @media (max-width: 380px) {
    .r7-config-card--asesor .r7-config-form--asesor {
      grid-template-columns: 1fr;
    }

    .r7-config-card--asesor .r7-config-form--asesor .r7-config-field--full {
      grid-column: auto;
    }

    .r7-config-form {
      grid-template-columns: 1fr;
    }

    .r7-config-field--full {
      grid-column: auto;
    }
  }
}

/* --- SEARCH OPEN STATE (outside media query — global JS-driven class) --- */
#resumen7 .r7-side-actions.is-search-open .r7-launcher-btn {
  display: inline-flex;
}

#resumen7 .r7-side-actions.is-search-open #r7AjustesToggle,
#resumen7 .r7-side-actions.is-search-open #r7CompararBtn,
#resumen7 .r7-side-actions.is-search-open .r7-tools-shortcut {
  display: none !important;
}

#resumen7 .r7-side-actions.is-search-open .r7-search-shell {
  flex: 1 1 auto;
  inline-size: auto;
  min-inline-size: 200px;
  max-inline-size: none;
  padding-inline: 4px;
}

#resumen7 .r7-side-actions.is-search-open .r7-search-toggle {
  display: none;
}

#resumen7 .r7-side-actions.is-search-open .r7-search-mount {
  display: block;
  position: static;
  flex: 1 1 auto;
  min-inline-size: 0;
  inline-size: auto;
  transform: none;
}

#resumen7 .r7-side-actions.is-search-open #hrBusqueda {
  width: 100%;
  block-size: 44px;
  padding-inline: 12px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.04);
  box-shadow: none;
}

.r7-search-chip-mount {
  position: fixed;
  z-index: calc(var(--z-modal, 4000) + 5);
  left: 50%;
  bottom: calc(var(--mobile-results-dock-h, 80px) + 24px);
  display: flex;
  justify-content: center;
  width: auto;
  pointer-events: none;
  transform: translateX(-50%);
}

.r7-search-chip-mount .chip {
  background: var(--brand);
  border: 0;
  color: #fff;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}