/* =========================================================
   MonarchZone — sistema visual compartido
   Paleta: abismo marino + azul "aliento atómico" + ámbar de preventa
   ========================================================= */
:root {
    --abyss: #0f2a33;
    --abyss-2: #163a46;
    --atomic: #1490d8;
    --atomic-dark: #0d6fa8;
    --glow: #5fd3ff;
    --surface: #f3f6f7;
    --card: #ffffff;
    --ink: #12181b;
    --muted: #5b6b72;
    --line: #dde5e8;
    --hazard: #f5b700;
    --hazard-ink: #6b4f00;
    --ok: #1f8a5b;
    --danger: #d6453d;
    --dhl-yellow: #ffcc00;
    --dhl-red: #d40511;

    --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
    --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;

    --bs-primary: var(--atomic);
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--surface);
    --bs-link-color: var(--atomic-dark);
    --bs-link-hover-color: var(--abyss);
}

html, body { min-height: 100%; }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink);
    background: var(--surface);
}
main { flex: 1 0 auto; }

h1, h2, h3, .display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.1;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

.page { padding: 2rem 0 4rem; }
.page-title { margin-bottom: 1.5rem; }
.muted { color: var(--muted); }

/* ---------- Botones ---------- */
.btn-mz {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--atomic);
    --bs-btn-border-color: var(--atomic);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--atomic-dark);
    --bs-btn-hover-border-color: var(--atomic-dark);
    --bs-btn-active-bg: var(--abyss);
    --bs-btn-disabled-bg: #b9c6cc;
    --bs-btn-disabled-border-color: #b9c6cc;
    font-weight: 600;
    border-radius: var(--r-md);
}
.btn-mz-outline {
    --bs-btn-color: var(--abyss);
    --bs-btn-border-color: var(--abyss);
    --bs-btn-hover-bg: var(--abyss);
    --bs-btn-hover-color: #fff;
    font-weight: 600;
    border-radius: var(--r-md);
}
.btn-presale {
    --bs-btn-color: var(--ink);
    --bs-btn-bg: var(--hazard);
    --bs-btn-border-color: var(--hazard);
    --bs-btn-hover-bg: #e0a700;
    --bs-btn-hover-border-color: #e0a700;
    font-weight: 700;
    border-radius: var(--r-md);
}
.btn-google {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); font-weight: 600;
}
.btn-google:hover { background: var(--surface); }

/* ---------- Header ---------- */
.site-header { background: var(--abyss); color: #fff; }

/* Cabecera siempre visible arriba al bajar en la página.
   (El sticky estaba en .site-header, que vive dentro de <store-header> y mide lo mismo,
   así que nunca se quedaba pegada.) */
store-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.site-header__bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding-top: .75rem;
    padding-bottom: .75rem;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; }
.brand:hover { color: var(--glow); }
.brand__mark {
    width: 28px; height: 28px; border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, var(--glow) 0 22%, var(--atomic) 23% 46%, transparent 47%),
                conic-gradient(from 0deg, var(--glow), var(--atomic), var(--glow));
    box-shadow: 0 0 14px rgba(95, 211, 255, .45);
}
.brand__name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: .02em; }

.site-search { display: flex; max-width: 560px; width: 100%; justify-self: center; }
.site-search input {
    flex: 1; min-width: 0;
    border: 1px solid transparent; border-radius: var(--r-md) 0 0 var(--r-md);
    padding: .55rem .9rem; background: #fff; color: var(--ink);
}
.site-search input:focus { outline: none; border-color: var(--glow); }
.site-search button {
    border: 0; padding: 0 1rem; border-radius: 0 var(--r-md) var(--r-md) 0;
    background: var(--atomic); color: #fff;
}
.site-search button:hover { background: var(--atomic-dark); }

.site-actions { display: flex; align-items: center; gap: .25rem; }
.icon-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .6rem; border: 0; border-radius: var(--r-md);
    background: transparent; color: #fff; font-weight: 600; text-decoration: none; font-size: 1rem;
}
.icon-btn i { font-size: 1.35rem; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: var(--glow); }
.account-btn__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-btn { position: relative; }
.cart-count {
    position: absolute; top: 0; right: 0;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
    background: var(--hazard); color: var(--ink);
    font-size: .72rem; font-weight: 800; line-height: 20px; text-align: center;
}
.site-nav { background: var(--abyss-2); }
.site-nav__inner { display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.site-nav__inner::-webkit-scrollbar { display: none; }
.site-nav a {
    padding: .55rem 0; white-space: nowrap; color: #c9dde4; text-decoration: none; font-weight: 500;
    border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--glow); }

@media (max-width: 767.98px) {
    .site-header__bar { grid-template-columns: 1fr auto; row-gap: .6rem; }
    .site-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
    .account-btn__name { display: none; }
    .brand__name { font-size: 1.35rem; }
}

/* ---------- Login ---------- */
.login-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center; padding: 1rem;
    background: rgba(8, 22, 28, .6); backdrop-filter: blur(3px);
}
.login-overlay[hidden] { display: none; }
.login-modal {
    position: relative; width: 100%; max-width: 380px;
    background: #fff; color: var(--ink); border-radius: var(--r-lg); padding: 2rem 1.75rem 1.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.login-modal h2 { margin-bottom: 1rem; }
.login-modal__close { position: absolute; top: .75rem; right: .75rem; border: 0; background: none; font-size: 1.1rem; color: var(--muted); }
.login-modal__note { background: #fff6d6; color: var(--hazard-ink); border-radius: var(--r-sm); padding: .5rem .75rem; font-size: .92rem; }
.form-error { color: var(--danger); font-size: .92rem; margin-bottom: .75rem; }

/* ---------- Toasts ---------- */
.mz-toasts { position: fixed; z-index: 2100; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: grid; gap: .5rem; width: min(92vw, 420px); }
.mz-toast {
    display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem;
    border-radius: var(--r-md); background: var(--abyss); color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s;
}
.mz-toast.is-visible { opacity: 1; transform: none; }
.mz-toast--success i { color: #6ee7a8; }
.mz-toast--error { background: #5c1612; }
.mz-toast--error i { color: #ffb4ad; }
.mz-toast--info i { color: var(--glow); }

/* ---------- Secciones ---------- */
.section { padding: 2.5rem 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section__head h2 { margin: 0; }
.section__link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.section--presale { background: linear-gradient(180deg, #fff8df 0, var(--surface) 100%); }

/* ---------- Grid de productos ---------- */
.pgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(200px, 46%), 1fr)); }
.pgrid--row { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 991.98px) { .pgrid--row { grid-template-columns: repeat(2, 1fr); } }

/* Tarjeta: la franja izquierda codifica disponibilidad */
.pcard {
    position: relative; display: flex; flex-direction: column;
    background: var(--card); border-radius: var(--r-md); overflow: hidden;
    border: 1px solid var(--line); border-left: 4px solid var(--line);
    transition: border-color .15s, box-shadow .15s;
}
.pcard:hover { box-shadow: 0 8px 22px rgba(15, 42, 51, .12); }
.pcard--ok { border-left-color: var(--ok); }
.pcard--presale { border-left-color: var(--hazard); }
.pcard--incoming { border-left-color: var(--atomic); }
.pcard--out { border-left-color: #b9c6cc; }
.pcard--out .pcard__media img { filter: grayscale(.6); opacity: .8; }

.pcard__media { display: block; position: relative; aspect-ratio: 1 / 1; background: #e9eef0; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__flag {
    position: absolute; left: .5rem; bottom: .5rem;
    background: var(--hazard); color: var(--ink); font-weight: 700; font-size: .78rem;
    padding: .15rem .5rem; border-radius: var(--r-sm);
}
.pcard__fav {
    position: absolute; top: .5rem; right: .5rem;
    width: 36px; height: 36px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .92); color: var(--ink);
    display: inline-flex; align-items: center; justify-content: center;
}
.pcard__fav.is-on { color: var(--danger); }
.pcard__body { display: flex; flex-direction: column; gap: .2rem; padding: .75rem .85rem .85rem; flex: 1; }
.pcard__title { font-family: var(--font-body); font-size: .98rem; font-weight: 600; line-height: 1.3; margin: 0; }
.pcard__title a { color: inherit; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__title a:hover { color: var(--atomic-dark); }
.pcard__stock { font-size: .85rem; color: var(--muted); margin: 0; }
.pcard--ok .pcard__stock { color: var(--ok); }
.pcard--presale .pcard__stock { color: var(--hazard-ink); }
.pcard--out .pcard__stock { color: var(--danger); }
.pcard__foot { margin-top: auto; padding-top: .4rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pcard__price { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.pcard__add { width: 40px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.pcard__add i { font-size: 1.1rem; }

.pcard--skeleton .pcard__media,
.pcard--skeleton .pcard__body span {
    background: linear-gradient(90deg, #e6ecee 25%, #f2f5f6 50%, #e6ecee 75%);
    background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
.pcard--skeleton .pcard__body span { display: block; height: 14px; border-radius: 4px; }
.pcard--skeleton .pcard__body span + span { width: 50%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Estados vacíos ---------- */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; color: var(--atomic); }
.empty-state h3 { color: var(--ink); margin: .75rem 0 .25rem; font-size: 1.5rem; }
.empty-state .btn { margin-top: 1rem; }

/* ---------- Paneles ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; }
.panel + .panel { margin-top: 1rem; }
.panel__title { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 1rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.panel__title a, .panel__title button { font-family: var(--font-body); font-size: .92rem; font-weight: 600; }

.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
.summary-row--total { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .6rem; }
.summary-row--note { color: var(--muted); font-size: .9rem; }
.pay-now { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--abyss); }

/* ---------- Selector de envío ---------- */
.ship-picker { display: grid; gap: .6rem; border: 0; padding: 0; margin: 0; }
.ship-option {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem;
    padding: .8rem 1rem; border: 2px solid var(--line); border-radius: var(--r-md);
    background: #fff; cursor: pointer; transition: border-color .15s, background .15s;
}
.ship-option:hover { border-color: #a9c3cd; }
.ship-option input { width: 1.15rem; height: 1.15rem; accent-color: var(--atomic); }
.ship-option:has(input:checked) { border-color: var(--atomic); background: #eef8fe; }
.ship-option__body { display: flex; flex-direction: column; }
.ship-option__title { font-weight: 700; }
.ship-option__desc { font-size: .88rem; color: var(--muted); }
.ship-option__price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.ship-option--dhl { border-left: 6px solid var(--dhl-yellow); }
.ship-option--dhl .ship-option__title { color: var(--dhl-red); }

/* ---------- Badges de estado ---------- */
.badge-soft { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-soft--ok { background: #e3f4ec; color: var(--ok); }
.badge-soft--wait { background: #edf1f3; color: var(--muted); }
.badge-soft--ship { background: #e4f3fc; color: var(--atomic-dark); }
.badge-soft--presale { background: #fff3cc; color: var(--hazard-ink); }
.badge-soft--danger { background: #fde8e6; color: var(--danger); }
.badge-dhl { background: var(--dhl-yellow); color: var(--dhl-red); font-weight: 800; font-style: italic; }

/* ---------- Footer ---------- */
.site-footer { background: var(--abyss); color: #c9dde4; margin-top: auto; }
.site-footer__grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-top: 2.5rem; padding-bottom: 1.5rem; }
.site-footer__brand { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: #fff; margin-bottom: .25rem; }
.site-footer__title { font-weight: 700; color: #fff; margin-bottom: .25rem; }
.site-footer__text { margin: 0; font-size: .95rem; }
.site-footer__social { color: var(--glow); text-decoration: none; font-weight: 600; }
.site-footer__social:hover { color: #fff; }
.site-footer__legal { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1rem; padding-bottom: 1.25rem; font-size: .85rem; }

/* ---------- Bloques del resumen (en stock / preventa) ---------- */
.sum-block { border-left: 4px solid var(--line); padding: .15rem 0 .35rem .85rem; margin-bottom: .9rem; }
.sum-block--ok { border-left-color: var(--ok); }
.sum-block--presale { border-left-color: var(--hazard); }
.sum-block__title { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .3rem; }
.sum-block--ok .sum-block__title { color: var(--ok); }
.sum-block--presale .sum-block__title { color: #b98a00; }
.sum-block__total { font-weight: 700; border-top: 1px dashed var(--line); margin-top: .25rem; padding-top: .35rem; }

/* Mensaje de éxito en el modal de login (recuperar contraseña) */
.login-modal__ok { background: #e3f4ec; color: var(--ok); border-radius: var(--r-sm); padding: .5rem .75rem; font-size: .92rem; }

/* ---------- Sugerencias del buscador ---------- */
.site-search { position: relative; }
.search-suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1050;
    list-style: none; margin: 0; padding: .35rem;
    background: #fff; color: var(--ink);
    border-radius: var(--r-md); box-shadow: 0 16px 40px rgba(8, 22, 28, .28);
    max-height: min(70vh, 460px); overflow-y: auto;
}
.search-suggest li a {
    display: flex; align-items: center; gap: .7rem;
    padding: .45rem .55rem; border-radius: var(--r-sm);
    color: inherit; text-decoration: none;
}
.search-suggest li[aria-selected="true"] a,
.search-suggest li a:hover { background: #eef8fe; }
.search-suggest img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface); flex: 0 0 44px; }
.search-suggest__text { display: flex; flex-direction: column; min-width: 0; }
.search-suggest__name { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest__name mark { background: #fff3cc; color: inherit; padding: 0; border-radius: 2px; }
.search-suggest__meta { font-size: .85rem; color: var(--muted); }
.search-suggest__meta .is-available { color: var(--ok); }
.search-suggest__meta .is-presale { color: var(--hazard-ink); }
.search-suggest__meta .is-incoming { color: var(--atomic-dark); }
.search-suggest__meta .is-soldout { color: var(--danger); }
.search-suggest__all a { justify-content: center; font-weight: 600; color: var(--atomic-dark); border-top: 1px solid var(--line); border-radius: 0; margin-top: .25rem; }
.search-suggest__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: .35rem .55rem .25rem; font-size: .8rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .04em;
}
.site-search .search-suggest__clear { border: 0; border-radius: 0; background: none; padding: 0; font-size: .8rem; font-weight: 600; color: var(--atomic-dark); text-transform: none; letter-spacing: 0; }
.site-search .search-suggest__clear:hover { background: none; text-decoration: underline; }

/* ---------- Carga inicial ----------
   El header y el footer se dibujan con JavaScript. Mientras llega, se reserva su
   espacio con el mismo color para que la página no se vea vacía ni "salte". */
store-header:not(:defined) { display: block; min-height: 108px; background: var(--abyss); }
store-footer:not(:defined) { display: block; min-height: 220px; background: var(--abyss); }
@media (max-width: 767.98px) { store-header:not(:defined) { min-height: 152px; } }

/* ---------- Entrega personal ---------- */
.ship-option.is-disabled { opacity: .55; cursor: not-allowed; }
.ship-option__price small { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 600; color: var(--muted); text-align: right; }
.ship-option--pickup { border-left: 6px solid var(--abyss); }
.pickup-box { background: #f4f9fb; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem; }
.pickup-box__row { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .5rem; }
.pickup-box__row i { color: var(--atomic-dark); font-size: 1.1rem; margin-top: .1rem; }
.pickup-lines { display: inline-flex; gap: .3rem; vertical-align: middle; }
.pickup-lines span { display: inline-block; min-width: 1.6rem; padding: 0 .35rem; border-radius: 4px; color: #fff; font-weight: 800; font-size: .78rem; text-align: center; }
.pickup-lines .l2 { background: #0067a5; }
.pickup-lines .l3 { background: #8a8f19; }
.pickup-map { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-md); margin-top: .75rem; background: var(--surface); }
.pickup-dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.pickup-date { position: relative; }
.pickup-date input { position: absolute; opacity: 0; }
.pickup-date span {
    display: block; padding: .6rem .75rem; border: 2px solid var(--line); border-radius: var(--r-md);
    background: #fff; cursor: pointer; font-weight: 600; text-align: center; line-height: 1.25;
}
.pickup-date span small { display: block; font-weight: 400; color: var(--muted); }
.pickup-date input:checked + span { border-color: var(--atomic); background: #eef8fe; }
.pickup-date input:focus-visible + span { outline: 3px solid var(--glow); outline-offset: 2px; }
.contact-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.pickup-presale-note { background: #fff6d6; border-left: 4px solid var(--hazard); border-radius: var(--r-sm); padding: .6rem .8rem; font-size: .92rem; }

/* Foto de perfil de Google en el botón de cuenta */
.account-avatar {
    width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, .8);
}

/* Botón "Wiki" junto al logo de la tienda (en la wiki se oculta y aparece "Tienda") */
.store-brand-group { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.store-wiki-link { color: rgba(255,255,255,.8); text-decoration: none; font-weight: 600; white-space: nowrap;
                   padding: .3rem .7rem; border: 1px solid rgba(255,255,255,.25); border-radius: 2rem; font-size: .9rem; }
.store-wiki-link:hover { color: #fff; border-color: var(--glow); background: rgba(95,211,255,.12); }
@media (max-width: 575.98px) { .store-wiki-link { padding: .25rem .55rem; font-size: .8rem; } .store-brand-group { gap: .6rem; } }

/* Producto: botón "Ver biografía" a la derecha del nombre y el precio */
.product-wiki-btn { float: right; margin: .35rem 0 .5rem 1rem; display: inline-flex; align-items: center; gap: .4rem;
                    border-radius: 2rem; font-weight: 600; }
@media (max-width: 575.98px) { .product-wiki-btn { float: none; margin: 0 0 .75rem; } }

/* =====================================================================
   Rayo atómico: divisor horizontal inspirado en las aletas de Godzilla
   (sólo CSS; el destello se anima con transform y sólo cuando está a la vista)
   ===================================================================== */
.atomic-ray { position: relative; height: 22px; margin: .25rem 0; overflow: hidden; pointer-events: none;
              -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
              mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
/* Línea de energía */
.atomic-ray::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%);
                      background: linear-gradient(90deg, var(--atomic), var(--glow), var(--atomic));
                      box-shadow: 0 0 6px rgba(95, 211, 255, .75), 0 0 14px rgba(20, 144, 216, .45); }
/* Aletas dorsales (dibujo repetido) */
.atomic-ray { background: center / 34px 22px repeat-x
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 22'%3E%3Cpath d='M4 11 L10 3 L13 11 Z M15 11 L22 0 L25 11 Z M27 11 L31 6 L33 11 Z' fill='%235fd3ff' fill-opacity='.22'/%3E%3C/svg%3E"); }
/* Destello que recorre el rayo */
.atomic-ray::after { content: ""; position: absolute; top: 50%; left: 0; width: 22%; height: 6px; margin-top: -3px; border-radius: 3px;
                     background: radial-gradient(closest-side, #fff, rgba(95, 211, 255, .85) 45%, rgba(95, 211, 255, 0));
                     transform: translateX(-120%); will-change: transform; opacity: 0; }
.atomic-ray.is-on::after { animation: atomicPulse 4.5s cubic-bezier(.45, 0, .2, 1) infinite; opacity: 1; }
@keyframes atomicPulse { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(560%); } }

/* ---- Ciclo del rayo: CARGA → DISPARO → se DESCARGA parcialmente → vuelve a cargar ----
   El script añade .will-charge (sin script la línea se ve azul fija, como antes).
   ▼ VALORES QUE PUEDES AJUSTAR (el script los lee de aquí, no hay que cambiarlos en otro lado) ▼ */
.atomic-ray {
    --ray-charge: 3s;      /* lo que tarda la energía en llenar la línea */
    --ray-fire: 1.4s;      /* lo que tarda el destello en recorrerla de lado a lado */
    --ray-drain: .7s;      /* lo que tarda en volver a ponerse gris después del disparo */
    --ray-rest: 0%;        /* azul que queda a la derecha tras la descarga: 0% = se vuelve toda gris */
    --ray-pause: .4s;      /* pausa con la línea llena antes de disparar */
}
/* La línea tiene 3 capas (de arriba a abajo):
   1) energía que se CARGA (azul con punta blanca), crece de izquierda a derecha
   2) capa GRIS de descarga, también crece de izquierda a derecha
   3) línea azul de fondo
   Así tanto la carga como la descarga avanzan de izquierda a derecha. */
.atomic-ray.will-charge::before {
    background:
        linear-gradient(90deg, var(--atomic), var(--glow) 88%, #fff) no-repeat 0 0,
        linear-gradient(#c5d0d5, #c5d0d5) no-repeat 0 0,
        linear-gradient(90deg, var(--atomic), var(--glow), var(--atomic));
    background-size: 0% 100%, 100% 100%, 100% 100%;          /* al inicio: toda gris */
    box-shadow: none;
    transition: box-shadow .3s ease;
}
/* Cargando: la energía cubre lo gris de izquierda a derecha */
.atomic-ray.will-charge.is-charging::before {
    background-size: 100% 100%, 100% 100%, 100% 100%;
    transition: background-size var(--ray-charge) cubic-bezier(.4, 0, .7, 1), box-shadow .3s ease;
}
.atomic-ray.will-charge.is-cycled.is-charging::before {
    background-size: 100% 100%, calc(100% - var(--ray-rest)) 100%, 100% 100%;
}
/* Llena: azul con brillo */
.atomic-ray.will-charge.is-ready::before {
    box-shadow: 0 0 6px rgba(95, 211, 255, .75), 0 0 14px rgba(20, 144, 216, .45);
}
/* Al disparar se reinician las capas sin que se note (todo sigue azul) */
.atomic-ray.will-charge.is-fired::before {
    background-size: 0% 100%, 0% 100%, 100% 100%;
    transition: box-shadow .3s ease;
}
/* Descarga: lo gris avanza de izquierda a derecha y deja un poco de azul al final */
.atomic-ray.will-charge.is-draining::before {
    background-size: 0% 100%, calc(100% - var(--ray-rest)) 100%, 100% 100%;
    transition: background-size var(--ray-drain) ease-in-out, box-shadow .3s ease;
}
/* Disparo: el destello blanco recorre la línea una vez */
.atomic-ray.will-charge::after { animation: none; opacity: 0; }
.atomic-ray.will-charge.is-firing::after { animation: atomicFire var(--ray-fire) cubic-bezier(.45, 0, .2, 1) forwards; opacity: 1; }
@keyframes atomicFire { from { transform: translateX(-120%); } to { transform: translateX(560%); } }

@media (prefers-reduced-motion: reduce) {
    .atomic-ray.is-on::after, .atomic-ray.will-charge.is-firing::after { animation: none; opacity: 0; }
    .atomic-ray.will-charge::before { transition: none; background-size: 100% 100%, auto; }
}



/* =====================================================================
   Imágenes de producto con un mismo estándar en todas las tarjetas:
   cuadro blanco y la figura completa centrada (sin recortes), sin importar
   el tamaño o la proporción de la foto original.
   ===================================================================== */
.pcard__media { background: #fff; overflow: hidden; }
.pcard__media img { object-fit: contain; padding: 7%; transition: transform .25s ease; }
.pcard:hover .pcard__media img { transform: scale(1.04); }
