/* Variantes de un mismo modelo (color / pack / RGB): pie de la tarjeta, botón de
   agrupar y modal de elección. Usa los mismos tokens neumorphism (--sui-*, --pn-*)
   que el resto del panel y el modal de compra. Se carga DESPUÉS de soft-ui.css. */

/* ───────── Interruptor "Agrupar variantes" (cabecera de Resultados) ───────── */
.vt-toggle {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.75rem;
    border: none;
    border-radius: 999px;
    background: var(--pn-bg2, #1b1b1b);
    box-shadow: var(--sui-suave);
    color: var(--pn-dim, rgba(255,255,255,0.55));
    font: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: box-shadow 0.15s ease, color 0.15s ease;
}
.vt-toggle i { color: var(--pn-dim, rgba(255,255,255,0.45)); transition: color 0.15s ease; }
.vt-toggle:hover { color: var(--pn-text, #fff); }
.vt-toggle[aria-pressed="true"] {
    box-shadow: var(--sui-hondo);
    color: var(--pn-accent, #ff7b3a);
}
.vt-toggle[aria-pressed="true"] i { color: var(--pn-accent, #ff7b3a); }

/* ───────── Pie de la tarjeta de familia ───────── */
.processor-card .card-variants {
    display: flex;
    flex-wrap: wrap;                 /* si no cabe, el "N variantes" baja bajo los circulitos */
    align-items: center;
    gap: 0.15rem 0.5rem;
    margin-top: auto;
    padding: 0.4rem 78px 0 0.1rem;   /* deja sitio a los botones + y carrito */
    min-height: 30px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.processor-card .cv-dots { display: inline-flex; align-items: center; gap: 3px; }
.processor-card .cv-dots i {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
    font-style: normal;
}
.processor-card .cv-dots .cv-more { width: auto; height: auto; border: none; box-shadow: none; background: none; font-size: 0.62rem; opacity: 0.7; }
.light-theme .processor-card .cv-dots i { border-color: rgba(0,0,0,0.3); box-shadow: 0 0 0 1px rgba(255,255,255,0.6); }
.processor-card .cv-count { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.processor-card .cv-count i { color: var(--primary-color); font-size: 0.68rem; }

/* Almacenamiento: las capacidades del modelo en pastillas, como en el catálogo de ADATA */
.processor-card .cv-caps { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.processor-card .cv-caps span {
    padding: 0.1rem 0.4rem;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
    font-size: 0.64rem;
    white-space: nowrap;
}
body.light-theme .processor-card .cv-caps span { border-color: rgba(0, 0, 0, 0.18); }
/* RAM: rango de capacidades y velocidades de la familia */
.processor-card .cv-range { width: 100%; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Botón "+" (añadir la variante que se ve sin abrir el modal) */
.processor-card .card-quickadd {
    position: absolute;
    bottom: 8px;
    right: 42px;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,107,53,0.6);
    background: rgba(255,107,53,0.08);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.processor-card .card-quickadd:hover {
    transform: scale(1.12);
    background: var(--primary-color);
    color: #0c0d10;
}

/* Insignia A·B cuando hay dos variantes de la misma familia elegidas */
.processor-card .card-badge.multi {
    width: auto;
    min-width: 26px;
    padding: 0 7px;
    border-radius: 13px;
    white-space: nowrap;
}

/* ───────── Modal ───────── */
.vm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;               /* por debajo del modal de compra (10000) */
    background: rgba(0,0,0,0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
}
.vm-overlay.hidden { display: none; }
body.panel-ui.light-theme .vm-overlay { background: rgba(0,0,0,0.4); }
body.vm-open { overflow: hidden; }

.vm {
    position: relative;
    width: 100%;
    max-width: 860px;          /* 4-oct: con 40 variantes el modal se quedaba estrecho */
    max-height: calc(100vh - 2.4rem);
    overflow-y: auto;
    background: var(--pn-bg, #1e1e1e);
    border-radius: var(--sui-radio, 14px);
    box-shadow: var(--sui-alto, 0 24px 64px rgba(0,0,0,0.6));
    padding: 1.5rem 1.6rem 1.4rem;
    animation: vmIn 0.2s cubic-bezier(0.22,0.61,0.36,1) both;
}
@keyframes vmIn {
    from { opacity: 0; transform: translateY(-14px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}
.vm-close {
    position: absolute;
    top: 0.8rem; right: 0.8rem;
    background: none; border: none;
    color: var(--pn-dim, rgba(255,255,255,0.5));
    font-size: 1rem;
    padding: 6px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, box-shadow 0.15s;
}
.vm-close:hover { color: var(--pn-text, #fff); box-shadow: var(--sui-hondo); }

.vm-head { padding-right: 2rem; margin-bottom: 1.2rem; }
.vm-brand {
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--pn-dim, rgba(255,255,255,0.45));
    margin-bottom: 0.3rem;
}
.vm-title {
    font-size: 1.1rem; font-weight: 800; line-height: 1.3;
    color: var(--pn-text, #fff);
    border-left: 3px solid var(--pn-accent, #ff7b3a);
    padding-left: 0.6rem;
}
.vm-count {
    margin: 0.35rem 0 0 calc(3px + 0.6rem);
    font-size: 0.72rem; color: var(--pn-dim, rgba(255,255,255,0.5));
}

.vm-body { display: flex; align-items: flex-start; gap: 1.4rem; }
.vm-left { flex: none; width: 190px; }
.vm-img-wrap {
    position: relative;
    width: 190px; height: 190px;
    border-radius: var(--sui-radio, 14px);
    background: var(--sui-hueco-bg, #141414);
    box-shadow: var(--sui-hondo);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding: 0.7rem;
}
.vm-img { max-width: 100%; max-height: 100%; object-fit: contain; transition: opacity 0.15s ease; }
.vm-score {
    position: absolute; top: 8px; right: 10px;
    font-weight: 800; font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    color: var(--pn-text, #fff);
}

.vm-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.95rem; }

.vm-axes { display: flex; flex-direction: column; gap: 0.9rem; }
.vm-axis-title {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--pn-dim, rgba(255,255,255,0.5));
    margin-bottom: 0.4rem;
}
.vm-axis-title i { color: var(--pn-accent, #ff7b3a); font-size: 0.7rem; }
.vm-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.vm-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border: none; border-radius: 999px;
    background: var(--pn-bg2, #232323);
    box-shadow: var(--sui-suave);
    color: var(--pn-text, #fff);
    font: inherit; font-size: 0.78rem; font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.vm-chip:hover { transform: translateY(-1px); box-shadow: var(--sui-alto); }
.vm-chip.active {
    box-shadow: var(--sui-hondo);
    color: var(--pn-accent, #ff7b3a);
    outline: 1px solid var(--pn-accent, #ff7b3a);
    outline-offset: -1px;
    transform: none;
}
/* Esa opción existe, pero no combinada con lo que tienes elegido: se ve
   atenuada, y al pulsarla cambia también lo demás lo mínimo necesario. */
.vm-chip.far { opacity: 0.55; }
.vm-dot {
    width: 13px; height: 13px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
    flex: none;
}
.vm-dot--none { background: repeating-linear-gradient(45deg, #666 0 3px, #444 3px 6px); }

.vm-current { display: flex; flex-direction: column; gap: 0.15rem; }
.vm-current-lbl {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--pn-dim, rgba(255,255,255,0.45));
}
.vm-current-name { font-size: 0.86rem; font-weight: 700; color: var(--pn-text, #fff); line-height: 1.3; word-break: break-word; }

.vm-specs { display: grid; grid-template-columns: 1fr; gap: 0.3rem; }
.vm-spec {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.78rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(255,107,53,0.3);
}
.vm-spec i { color: var(--pn-accent, #ff7b3a); width: 14px; font-size: 0.72rem; }
.vm-spec-k { color: var(--pn-dim, rgba(255,255,255,0.55)); flex: 1; }
.vm-spec-v { color: var(--pn-text, #fff); font-weight: 700; font-family: 'Courier New', monospace; }

.vm-actions { display: flex; gap: 0.7rem; margin-top: 1.3rem; }
.vm-btn {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    padding: 0.8rem 1rem;
    border: none; border-radius: 10px;
    background: var(--pn-bg2, #232323);
    box-shadow: var(--sui-suave);
    color: var(--pn-text, #fff);
    font: inherit; font-size: 0.85rem; font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.vm-btn:hover:not(:disabled) { color: var(--pn-accent, #ff7b3a); box-shadow: var(--sui-alto); transform: translateY(-1px); }
.vm-btn:active:not(:disabled) { box-shadow: var(--sui-hondo); transform: translateY(1px); }
.vm-btn.hidden { display: none; }
.vm-btn--add { background: linear-gradient(120deg, var(--primary-color, #ff7b3a), #ff8c5a); color: #0c0d10; }
.vm-btn--add:hover:not(:disabled) { color: #0c0d10; filter: brightness(1.05); }
.vm-btn--add:disabled { opacity: 0.6; cursor: default; background: var(--pn-bg2, #232323); color: var(--pn-dim, rgba(255,255,255,0.6)); box-shadow: var(--sui-hondo); }

@media (max-width: 560px) {
    .vm { padding: 1.2rem 1.1rem; }
    .vm-body { flex-direction: column; align-items: stretch; }
    .vm-left { width: 100%; }
    .vm-img-wrap { width: 100%; height: 170px; }
    .vm-actions { flex-direction: column; }
}

/* Sin foto (la RAM no tiene): icono del tipo en el hueco */
.vm-img-ph { font-size: 3.2rem; color: var(--pn-accent, #ff6b35); opacity: 0.45; }

/* RAM: hasta ~15 velocidades por modelo. Que los selectores no estiren el modal:
   la columna derecha se desplaza si hace falta. */
.vm-right { max-height: min(58vh, 520px); overflow-y: auto; overflow-x: hidden; padding-right: 0.25rem; }
.vm-chips { min-width: 0; }
.vm-chip { white-space: nowrap; }

/* Precio de Coolmod dentro de la pastilla de variante */
.vm-chip-precio { margin-left: 7px; font-size: 11px; font-weight: 600; color: var(--pn-dim, #9a9a9a); }
.vm-chip-precio.agotado { color: #e5534b; }
.vm-chip.active .vm-chip-precio { color: inherit; opacity: .85; }
.vm-chip.sin-precio:not(.active) { opacity: .62; }

/* Desplegable propio para los ejes con muchas opciones (capacidad, velocidad…) */
.vm-dd { position: relative; margin-top: .45rem; max-width: 460px; }
.vm-dd-btn, .vm-dd-opt {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    border: 0; font: inherit; font-size: 0.86rem; font-weight: 700; color: var(--pn-text, #e8e8e8);
    cursor: pointer; background: transparent;
}
.vm-dd-btn {
    padding: 11px 13px; border-radius: 11px;
    background: var(--sui-hueco-bg, #141414); box-shadow: var(--sui-hondo);
    transition: color .15s;
}
.vm-dd-btn:hover { color: var(--pn-accent, #ff7b3a); }
.vm-dd-btn:focus-visible, .vm-dd-opt:focus-visible { outline: 2px solid var(--pn-accent, #ff7b3a); outline-offset: 2px; }
.vm-dd.abierto .vm-dd-btn { color: var(--pn-accent, #ff7b3a); }
.vm-dd-txt { flex: 1; min-width: 0; }
.vm-dd-precio { font-size: 0.76rem; font-weight: 600; color: var(--pn-text, #e8e8e8); white-space: nowrap; }
.vm-dd-precio.flojo { color: var(--pn-dim, #9a9a9a); font-weight: 500; }
.vm-dd-precio.agotado { color: #e5534b; font-weight: 600; }
.vm-dd-flecha { font-size: .62rem; color: var(--pn-dim, #9a9a9a); transition: transform .15s; }
.vm-dd.abierto .vm-dd-flecha { transform: rotate(180deg); color: inherit; }

.vm-dd-panel {
    margin-top: .4rem; padding: .3rem; border-radius: 12px;
    background: var(--pn-bg2, #1b1b1b); box-shadow: var(--sui-alto, 0 18px 40px rgba(0,0,0,.55));
    max-height: 244px; overflow-y: auto; overscroll-behavior: contain;
}
.vm-dd-panel[hidden] { display: none; }
.vm-dd-opt { padding: 9px 11px; border-radius: 9px; font-weight: 600; }
.vm-dd-opt + .vm-dd-opt { margin-top: 2px; }
.vm-dd-opt:hover { background: var(--sui-hueco-bg, #141414); color: var(--pn-accent, #ff7b3a); }
.vm-dd-opt.activa { color: var(--pn-accent, #ff7b3a); background: var(--sui-hueco-bg, #141414); box-shadow: var(--sui-hondo); font-weight: 700; }

/* (el <select> del navegador se dejó de usar: no se puede estilar por dentro) */

