/* ============================================
   iPhone Twins — Web Pública de Stock
   Mobile-first · Propuesta Editorial
   ============================================ */

:root {
    --brand-yellow: #fdd100;
    --brand-yellow-hover: #e4bb00;
    --bg: #111113;
    --bg-card: #1c1c1e;
    --bg-card-hover: #222224;
    --border: #3a3a3c;
    --border-light: #48484a;
    --text-primary: #f2f2f7;
    --text-secondary: #aeaeb2;
    --text-muted: #8e8e93;
    --green: #30d158;
    --green-bg: #0d2a19;
    --yellow-dim: #ffd60a;
    --yellow-bg: #2a2200;
    --red-dim: #ff453a;
    --red-bg: #2a0d0c;
    --wa-green: #25d366;
    --wa-bg: #0a2116;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    max-width: 680px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

/* ============================
   HEADER
   ============================ */
.site-header {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.header-logo {
    height: 56px;
    width: auto;
    display: block;
}

.header-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-align: center;
    letter-spacing: 0.2px;
}

/* ============================
   FILTROS
   ============================ */
.filters-section {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.filters-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 1.25rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filters-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.filter-chip.active {
    background: var(--brand-yellow);
    border-color: var(--brand-yellow);
    color: #111;
    font-weight: 700;
}

/* ============================
   SECTION LABEL
   ============================ */
.section-label-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem 0.5rem;
}

.section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--brand-yellow);
}

.section-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================
   STOCK LIST — ITEMS
   ============================ */
.stock-list {
    padding: 0 1.25rem;
}

/* Separador de modelo */
.model-group-divider {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.5rem 0 0.5rem;
    margin-top: 0;
}

.model-group-divider:first-child {
    padding-top: 0.75rem;
}

.model-group-name {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--brand-yellow);
}

.model-group-count {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Item de stock */
.stock-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
    -webkit-tap-highlight-color: transparent;
}

.stock-item:last-child {
    border-bottom: none;
}

.item-left {
    flex: 1;
    min-width: 0;
}

.item-model {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.item-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    align-items: center;
}

.spec-chip {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
}

.spec-storage {
    background: rgba(255,255,255,0.07);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.spec-bat-full {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(48, 209, 88, 0.2);
}

.spec-bat-good {
    background: var(--yellow-bg);
    color: var(--yellow-dim);
    border: 1px solid rgba(255, 214, 10, 0.2);
}

.spec-bat-low {
    background: var(--red-bg);
    color: var(--red-dim);
    border: 1px solid rgba(255, 69, 58, 0.2);
}

.spec-color {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.color-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.item-condition {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-style: italic;
    font-weight: 500;
}

.condition-icon {
    width: 13px;
    height: 13px;
    fill: var(--text-secondary);
    flex-shrink: 0;
    opacity: 0.8;
}

/* Precio y WhatsApp */
.item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    flex-shrink: 0;
}

.item-price-block {
    text-align: right;
    line-height: 1.1;
}

.item-price {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--brand-yellow);
    letter-spacing: -0.5px;
}

.item-currency {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-top: 1px;
}

.wa-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--wa-bg);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.wa-btn:active {
    background: rgba(37, 211, 102, 0.15);
}

.wa-btn svg {
    width: 14px;
    height: 14px;
    fill: var(--wa-green);
    flex-shrink: 0;
}

.wa-btn span {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--wa-green);
    white-space: nowrap;
}

/* ============================
   ESTADOS DE CARGA / ERROR
   ============================ */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--brand-yellow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 0.88rem;
    line-height: 1.6;
}

.error-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--red-dim);
    font-size: 0.85rem;
}

/* ============================
   FOOTER
   ============================ */
.site-footer {
    margin-top: 2rem;
    padding: 1.5rem 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.site-footer p {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-brand {
    margin-top: 0.25rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ============================
   DESKTOP AJUSTES (≥ 480px)
   ============================ */
@media (min-width: 480px) {
    .header-logo {
        height: 64px;
    }

    .item-model {
        font-size: 0.95rem;
    }

    .item-price {
        font-size: 1.6rem;
    }

    .spec-chip {
        font-size: 0.72rem;
        padding: 4px 9px;
    }
}

@media (min-width: 600px) {
    body {
        padding: 0 1rem 3rem;
    }

    .site-header {
        padding: 1.75rem 1.5rem 1rem;
    }

    .filters-scroll {
        padding: 0 1.5rem;
    }

    .section-label-row,
    .stock-list {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ============================
   OFERTA — PRECIO TACHADO + BADGE
   ============================ */

.item-model-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Badge OFERTA animado */
.offer-badge {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #111;
    background: var(--brand-yellow);
    padding: 2px 7px;
    border-radius: 4px;
    animation: offer-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes offer-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.75; transform: scale(0.96); }
}

/* Item con oferta — borde izquierdo amarillo sutil */
.stock-item.is-offer {
    border-left: 2px solid var(--brand-yellow);
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

/* Precio original tachado */
.item-price-original {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: line-through;
    display: block;
    text-align: right;
    line-height: 1.2;
}

/* Precio de oferta — más grande y llamativo */
.offer-price {
    font-size: 1.55rem;
    animation: offer-glow 2s ease-in-out infinite;
}

@keyframes offer-glow {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.8; }
}

/* ============================
   UTILIDAD
   ============================ */
.hidden {
    display: none !important;
}

/* ============================
   BOTÓN "VER CUOTAS"
   ============================ */
.cuotas-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(253, 209, 0, 0.08);
    border: 1px solid rgba(253, 209, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-family: 'DM Sans', sans-serif;
}

.cuotas-btn:active {
    background: rgba(253, 209, 0, 0.18);
}

.cuotas-btn svg {
    width: 13px;
    height: 13px;
    stroke: var(--brand-yellow);
    fill: none;
    flex-shrink: 0;
}

.cuotas-btn span {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--brand-yellow);
    white-space: nowrap;
}

/* ============================
   MODAL DE CUOTAS
   ============================ */
.cuotas-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    padding: 0;
    animation: cuotas-fade-in 0.15s ease;
}

@keyframes cuotas-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cuotas-modal-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.5rem 1.25rem 1.75rem;
    animation: cuotas-slide-up 0.2s ease;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes cuotas-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cuotas-modal-close {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    -webkit-tap-highlight-color: transparent;
}

.cuotas-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-right: 1.5rem;
}

.cuotas-modal-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    margin-bottom: 1.25rem;
}

.cuotas-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.cuotas-plan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
}

.cuotas-plan-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cuotas-plan-total {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.cuotas-plan-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-yellow);
    text-align: right;
    white-space: nowrap;
}

.cuotas-modal-note {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1.25rem;
    line-height: 1.5;
}

.cuotas-modal-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem 0;
}

@media (min-width: 480px) {
    .cuotas-modal-overlay {
        align-items: center;
    }
    .cuotas-modal-box {
        border-radius: var(--radius-lg);
    }
}
/* ============================================
   CYBER MONDAY
   Un solo momento fuerte: intro + caída de precios.
   Paleta: amarillo de marca + azul eléctrico "cyber".
   ============================================ */
:root {
    --cyber-blue: #2f5bff;
    --cyber-blue-soft: rgba(47, 91, 255, 0.16);
    --cyber-cyan: #29e0ff;
    --cyber-ink: #05060d;
    --font-display: 'Big Shoulders Display', 'DM Sans', sans-serif;
}

/* ---------- Franja en el header ---------- */
.cyber-strip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.9rem -1.25rem -1rem;
    padding: 0.75rem 1.25rem 0.85rem;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 14px),
        linear-gradient(100deg, #2448e8, var(--cyber-blue) 55%, #4a6dff);
    color: #fff;
    overflow: hidden;
    box-shadow: inset 0 -3px 0 var(--brand-yellow);
    isolation: isolate;
}

/* Brillo que recorre la franja cada pocos segundos */
.cyber-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,0.32) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: cs-shine 4.5s ease-in-out 1s infinite;
    pointer-events: none;
}

@keyframes cs-shine {
    0%, 55% { transform: translateX(-100%); }
    100%    { transform: translateX(100%); }
}

.cs-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.cyber-strip-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.75rem;
    line-height: 0.9;
    color: var(--brand-yellow);
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 2px 2px 0 var(--cyber-ink);
}

.cyber-strip-deal {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
}

.cs-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.cs-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}

/* Cuenta regresiva (se usa en la franja y en el popup) */
.cd-row {
    display: flex;
    align-items: flex-start;
    gap: 3px;
}

.cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.5rem;
    padding: 5px 4px 3px;
    background: var(--cyber-ink);
    border-radius: 7px;
    overflow: hidden;
}

.cd-num {
    display: block;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--brand-yellow);
    font-variant-numeric: tabular-nums;
}

.cd-num.tick { animation: cd-tick 0.35s cubic-bezier(.2,.9,.3,1.2); }

@keyframes cd-tick {
    0%   { transform: translateY(-60%); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

.cd-lbl {
    font-size: 0.56rem;
    font-weight: 600;
    color: #aab3e6;
    margin-top: 2px;
}

.cd-sep {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.3rem;
    line-height: 1;
    color: #fff;
    padding-top: 7px;
    opacity: 0.8;
}

/* Aterrizaje: destello al llegar la cuenta regresiva */
.cyber-strip.is-landing { animation: cs-land 0.9s cubic-bezier(.2,.9,.3,1); }
.cyber-strip.is-landing .cd-unit { animation: cs-unit-pop 0.6s cubic-bezier(.3,1.6,.5,1) both; }
.cyber-strip.is-landing .cd-unit:nth-of-type(2) { animation-delay: 0.06s; }
.cyber-strip.is-landing .cd-unit:nth-of-type(3) { animation-delay: 0.12s; }
.cyber-strip.is-landing .cd-unit:nth-of-type(4) { animation-delay: 0.18s; }

@keyframes cs-land {
    0%   { filter: brightness(1.9) saturate(1.3); box-shadow: inset 0 -3px 0 var(--brand-yellow), 0 0 0 0 rgba(253,209,0,0.9); }
    40%  { box-shadow: inset 0 -3px 0 var(--brand-yellow), 0 0 0 10px rgba(253,209,0,0); }
    100% { filter: none; box-shadow: inset 0 -3px 0 var(--brand-yellow), 0 0 0 0 rgba(253,209,0,0); }
}

@keyframes cs-unit-pop {
    0%   { transform: scale(0.6); }
    100% { transform: none; }
}

@media (max-width: 479px) {
    .cyber-strip { flex-direction: column; align-items: stretch; gap: 0.65rem; }
    .cyber-strip-title { font-size: 1.7rem; }
    .cyber-strip-deal { font-size: 0.78rem; }
    .cs-count { flex-direction: row; align-items: center; gap: 0.6rem; }
    .cs-label { flex-shrink: 0; width: 3.6rem; line-height: 1.2; font-size: 0.72rem; }
    .cs-count .cd-row { flex: 1; }
    .cs-count .cd-unit { flex: 1; min-width: 0; }
    .cs-count .cd-num { font-size: 1.75rem; }
}

@media (min-width: 600px) {
    .cyber-strip { margin-left: -1.5rem; margin-right: -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* ---------- Popup "Se viene el Cyber Monday" ---------- */
.cyber-pop-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(5, 6, 13, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: cp-fade 0.25s ease both;
}

@keyframes cp-fade { from { opacity: 0; } }

.cyber-pop {
    position: relative;
    width: min(100%, 400px);
    max-height: calc(100vh - 32px);
    overflow: hidden;               /* sin barra lateral: la grilla del fondo se recorta */
    padding: 1.6rem 1.25rem 1.25rem;
    text-align: center;
    background: radial-gradient(120% 70% at 50% 0%, #1b2a8f 0%, #0a0e2a 60%, var(--cyber-ink) 100%);
    border: 2px solid var(--cyber-blue);
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 0 90px rgba(47, 91, 255, 0.5);
    transform-origin: center;
    animation: cp-in 0.6s cubic-bezier(.2,1.4,.4,1) both;
}

/* Pantallas bajas (notebooks, celulares chicos): todo entra sin scrollear */
@media (max-height: 820px) {
    .cyber-pop { padding: 1.2rem 1.1rem 1rem; }
    .cp-title { margin-top: 0.35rem; }
    .cp-title strong { font-size: clamp(2.6rem, 8.5vh, 4rem); }
    .cp-deal { margin-top: 0.8rem; font-size: clamp(2.6rem, 7vh, 3.6rem); }
    .cp-sub { margin-top: 0.6rem; }
    .cp-count { margin-top: 0.8rem; }
    .cp-count .cd-num { font-size: clamp(1.7rem, 5vh, 2.4rem); }
    .cp-count .cd-unit { padding: 6px 6px 4px; }
    .cp-cta { margin-top: 0.9rem; padding: 12px; }
}

@media (max-height: 620px) {
    .cp-kicker, .cp-sub { font-size: 0.72rem; }
    .cp-pre { font-size: 0.9rem; }
    .cp-count .cd-lbl { font-size: 0.58rem; }
}

@keyframes cp-in {
    0%   { opacity: 0; transform: translateY(40px) scale(0.7) rotate(-3deg); }
    100% { opacity: 1; transform: none; }
}

.cp-grid {
    position: absolute;
    left: -40%;
    right: -40%;
    bottom: -12%;
    height: 45%;
    background:
        linear-gradient(var(--cyber-blue) 1px, transparent 1px) 0 0 / 100% 28px,
        linear-gradient(90deg, var(--cyber-blue) 1px, transparent 1px) 0 0 / 28px 100%;
    transform: perspective(260px) rotateX(60deg);
    transform-origin: center top;
    opacity: 0.4;
    mask-image: linear-gradient(to bottom, transparent, #000 50%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 50%);
    animation: cp-grid-move 1.4s linear infinite;
    pointer-events: none;
}

@keyframes cp-grid-move { to { background-position: 0 28px, 0 0; } }

.cyber-pop > *:not(.cp-grid) { position: relative; }

.cp-close {
    position: absolute !important;
    top: 0.6rem;
    right: 0.75rem;
    z-index: 2;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.cp-kicker {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cyber-cyan);
    animation: cp-up 0.4s ease 0.2s both;
}

.cp-title { margin-top: 0.6rem; font-weight: inherit; }

.cp-pre {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    animation: cp-up 0.4s ease 0.28s both;
}

.cp-title strong {
    position: relative;
    display: block;
    margin-top: 0.15rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3rem, 16vw, 4.4rem);
    line-height: 0.88;
    color: var(--brand-yellow);
    text-shadow: 3px 3px 0 var(--cyber-blue);
    animation: cp-up 0.45s cubic-bezier(.2,.9,.3,1) 0.34s both;
}

.cp-title strong::before,
.cp-title strong::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    text-shadow: none;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
}
.cp-title strong::before { color: var(--cyber-cyan); animation: cp-glitch-a 3.2s steps(2) 0.8s infinite; }
.cp-title strong::after  { color: #ff2bd6;           animation: cp-glitch-b 3.2s steps(2) 0.8s infinite; }

@keyframes cp-glitch-a {
    0%   { opacity: 0.9; transform: translate(-5px, 1px); clip-path: inset(10% 0 55% 0); }
    3%   { opacity: 0.9; transform: translate(4px, -1px);  clip-path: inset(60% 0 10% 0); }
    6%   { opacity: 0.9; transform: translate(-2px, 0);    clip-path: inset(30% 0 40% 0); }
    8%, 100% { opacity: 0; transform: none; }
}
@keyframes cp-glitch-b {
    0%   { opacity: 0.8; transform: translate(5px, -1px); clip-path: inset(50% 0 20% 0); }
    3%   { opacity: 0.8; transform: translate(-4px, 1px); clip-path: inset(5% 0 70% 0); }
    6%   { opacity: 0.8; transform: translate(2px, 0);    clip-path: inset(70% 0 5% 0); }
    8%, 100% { opacity: 0; transform: none; }
}

@keyframes cp-up {
    from { opacity: 0; transform: translateY(12px); }
}

.cp-deal {
    display: inline-flex;
    align-items: flex-start;
    margin-top: 1.1rem;
    padding: 0.3rem 0.9rem 0.1rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 3.6rem;
    line-height: 0.9;
    color: var(--cyber-ink);
    background: var(--brand-yellow);
    border-radius: 9px;
    box-shadow: 0 0 0 3px var(--cyber-ink), 0 0 0 6px var(--brand-yellow), 0 0 50px rgba(253,209,0,0.4);
    animation: cp-stamp 0.42s cubic-bezier(.3,1.5,.5,1) 0.6s both;
}

.cp-minus { margin-right: 0.04em; }
.cp-usd { font-size: 0.32em; margin: 0.32em 0 0 0.12em; letter-spacing: 1px; }

@keyframes cp-stamp {
    0%   { opacity: 0; transform: rotate(-5deg) scale(2.2); }
    100% { opacity: 1; transform: rotate(-5deg) scale(1); }
}

.cp-sub {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    animation: cp-up 0.4s ease 0.8s both;
}

.cp-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 1.2rem;
    animation: cp-up 0.4s ease 0.9s both;
}

.cp-count .cd-unit {
    min-width: 3.6rem;
    padding: 8px 6px 5px;
    border: 1px solid rgba(47, 91, 255, 0.6);
    border-radius: 10px;
}

.cp-count .cd-num { font-size: 2.4rem; }
.cp-count .cd-lbl { font-size: 0.66rem; }
.cp-count .cd-sep { font-size: 1.8rem; padding-top: 10px; }

.cp-cta {
    display: block;
    width: 100%;
    margin-top: 1.3rem;
    padding: 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cyber-ink);
    background: var(--brand-yellow);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    animation: cp-up 0.4s ease 1s both;
}

.cp-cta:active { background: var(--brand-yellow-hover); }

.cp-cta:focus-visible,
.cp-close:focus-visible {
    outline: 2px solid var(--cyber-cyan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .cyber-strip::before, .cd-num.tick, .cyber-pop-overlay, .cyber-pop, .cp-grid,
    .cp-kicker, .cp-pre, .cp-title strong, .cp-title strong::before, .cp-title strong::after,
    .cp-deal, .cp-sub, .cp-count, .cp-cta {
        animation: none !important;
    }
    .cp-deal { transform: rotate(-5deg); }
}

/* ---------- Tarjeta en modo Cyber ---------- */
.stock-item.is-cyber {
    border-left: 2px solid var(--cyber-blue);
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.cyber-badge {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.82rem;
    line-height: 1;
    color: var(--brand-yellow);
    background: var(--cyber-blue);
    padding: 3px 6px 2px;
    border-radius: 4px;
    transform: rotate(-4deg);
    flex-shrink: 0;
}

.item-price-original.cyber-strike {
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    text-decoration: none;
}

/* La raya se dibuja sola (estado final por defecto, animado si hay motion) */
.cyber-strike::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 52%;
    height: 2px;
    background: var(--cyber-cyan);
    transform: rotate(-8deg);
    transform-origin: left center;
}

.cyber-anim-pending .cyber-strike:not(.is-struck)::after { transform: rotate(-8deg) scaleX(0); }
.cyber-strike.is-struck::after { transition: transform 0.35s cubic-bezier(.7,0,.2,1); }

.cyber-price {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

.cyber-price.is-dropping { color: #fff; }

.cyber-price.is-landed { animation: cyber-land 0.45s cubic-bezier(.2,1.6,.4,1); }

@keyframes cyber-land {
    0%   { transform: translateY(-3px) scale(1.12); color: #fff; }
    100% { transform: none; color: var(--brand-yellow); }
}

.item-price-ask {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ---------- Intro a pantalla completa ---------- */
.cyber-intro {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: var(--cyber-ink);
    overflow: hidden;
    cursor: pointer;
    clip-path: inset(0 0 0 0);
    animation: ci-shake 0.32s linear 1.05s 1;
}

.cyber-intro.is-leaving {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.55s cubic-bezier(.75,0,.2,1);
}

/* Grilla en perspectiva tipo "piso cyber" */
.ci-grid {
    position: absolute;
    left: -50%;
    right: -50%;
    bottom: -10%;
    height: 60%;
    background:
        linear-gradient(var(--cyber-blue) 1px, transparent 1px) 0 0 / 100% 36px,
        linear-gradient(90deg, var(--cyber-blue) 1px, transparent 1px) 0 0 / 36px 100%;
    transform: perspective(320px) rotateX(62deg);
    transform-origin: center top;
    opacity: 0.55;
    mask-image: linear-gradient(to bottom, transparent, #000 45%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%);
    animation: ci-grid-move 1.2s linear infinite;
}

@keyframes ci-grid-move {
    to { background-position: 0 36px, 0 0; }
}

.ci-inner {
    position: relative;
    text-align: center;
    padding: 0 16px;
    margin-top: -8vh;
}

.ci-word {
    position: relative;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(4.2rem, 24vw, 9rem);
    line-height: 0.82;
    letter-spacing: -1px;
    color: #fff;
    opacity: 0;
    animation: ci-word-in 0.5s cubic-bezier(.2,.9,.3,1) forwards;
}

.ci-cyber  { animation-delay: 0.05s; }
.ci-monday { animation-delay: 0.22s; color: var(--brand-yellow); }

/* Separación RGB tipo glitch */
.ci-word::before,
.ci-word::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ci-word::before { color: var(--cyber-cyan); mix-blend-mode: screen; animation: ci-glitch-a 0.9s steps(2) 0.1s 2; opacity: 0; }
.ci-word::after  { color: var(--cyber-blue); mix-blend-mode: screen; animation: ci-glitch-b 0.9s steps(2) 0.1s 2; opacity: 0; }

@keyframes ci-word-in {
    0%   { opacity: 0; transform: translateX(-12vw) skewX(-18deg); filter: blur(6px); }
    60%  { opacity: 1; transform: translateX(1.5vw) skewX(6deg); filter: blur(0); }
    100% { opacity: 1; transform: none; }
}

@keyframes ci-glitch-a {
    0%   { opacity: 0.9; transform: translate(-6px, 2px); clip-path: inset(10% 0 55% 0); }
    25%  { opacity: 0.9; transform: translate(5px, -2px); clip-path: inset(60% 0 8% 0); }
    50%  { opacity: 0.9; transform: translate(-3px, 0);   clip-path: inset(30% 0 40% 0); }
    100% { opacity: 0; transform: none; }
}
@keyframes ci-glitch-b {
    0%   { opacity: 0.9; transform: translate(6px, -2px); clip-path: inset(50% 0 20% 0); }
    25%  { opacity: 0.9; transform: translate(-5px, 2px); clip-path: inset(5% 0 70% 0); }
    50%  { opacity: 0.9; transform: translate(3px, 0);    clip-path: inset(70% 0 5% 0); }
    100% { opacity: 0; transform: none; }
}

/* El sello −30 USD */
.ci-deal {
    display: inline-flex;
    align-items: flex-start;
    margin-top: 1.4rem;
    padding: 0.35rem 1.1rem 0.15rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3.6rem, 19vw, 7rem);
    line-height: 0.9;
    color: var(--cyber-ink);
    background: var(--brand-yellow);
    border-radius: 10px;
    box-shadow: 0 0 0 4px var(--cyber-ink), 0 0 0 7px var(--brand-yellow), 0 0 60px rgba(253, 209, 0, 0.45);
    opacity: 0;
    transform: rotate(-6deg) scale(2.4);
    animation: ci-stamp 0.42s cubic-bezier(.3,1.5,.5,1) 0.85s forwards;
}

.ci-minus { margin-right: 0.04em; }

.ci-usd {
    font-size: 0.32em;
    line-height: 1;
    margin: 0.32em 0 0 0.12em;
    letter-spacing: 1px;
}

@keyframes ci-stamp {
    0%   { opacity: 0; transform: rotate(-6deg) scale(2.4); }
    100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}

@keyframes ci-shake {
    0%, 100% { transform: none; }
    20% { transform: translate(-6px, 3px); }
    40% { transform: translate(5px, -4px); }
    60% { transform: translate(-3px, 2px); }
    80% { transform: translate(2px, -1px); }
}

.ci-sub {
    margin-top: 1.4rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0;
    animation: ci-fade 0.4s ease 1.35s forwards;
}

@keyframes ci-fade { to { opacity: 1; } }

.ci-skip {
    position: absolute;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyber-ink);
    background: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    cursor: pointer;
    opacity: 0;
    animation: ci-fade 0.3s ease 1.5s forwards;
}

.ci-skip:focus-visible,
.cuotas-btn:focus-visible,
.wa-btn:focus-visible,
.filter-chip:focus-visible {
    outline: 2px solid var(--cyber-cyan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .cyber-intro, .ci-word, .ci-deal, .ci-sub, .ci-skip, .ci-grid,
    .cyber-price.is-landed, .offer-badge, .offer-price {
        animation: none !important;
        opacity: 1 !important;
    }
    .ci-deal { transform: rotate(-6deg); }
}
