/* =========================================================================
   Unique Exotics — Cintillo de marcas + Promo 3D (página de inicio)
   ========================================================================= */

:root {
    --ue-orange: #f28d1a;
    --ue-orange-soft: rgba(242, 141, 26, 0.14);
    --ue-ink: #0a0a0a;
}

/* -------------------------------------------------------------------------
   CINTILLO DE MARCAS
   ------------------------------------------------------------------------- */
.ue-brands {
    position: relative;
    background: linear-gradient(180deg, #0d0d0d 0%, #111 50%, #0d0d0d 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 30px 0 36px;
    overflow: hidden;
}

.ue-brands__kicker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 22px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}
.ue-brands__kicker span {
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ue-orange));
}
.ue-brands__kicker span:last-child { transform: scaleX(-1); }

.ue-marquee {
    display: flex;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}

.ue-marquee__track {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-around;
    gap: clamp(44px, 6vw, 88px);
    min-width: 100%;
    margin: 0;
    padding: 6px clamp(22px, 3vw, 44px);
    list-style: none;
    animation: ue-marquee var(--ue-marquee-duration, 48s) linear infinite;
    will-change: transform;
}

.ue-marquee:hover .ue-marquee__track { animation-play-state: paused; }

@keyframes ue-marquee {
    to { transform: translateX(-100%); }
}

.ue-marquee__item {
    flex: none;
    display: flex;
    align-items: center;
    margin: 0;
}
.ue-marquee__item a { display: block; line-height: 0; }

.ue-marquee__item img {
    display: block;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    opacity: 0.55;
    filter: grayscale(1) brightness(1.15);
    transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
    user-select: none;
}
.ue-marquee__item:hover img {
    opacity: 1;
    filter: grayscale(0) drop-shadow(0 0 14px rgba(242, 141, 26, 0.35));
    transform: translateY(-2px) scale(1.04);
}

@media (max-width: 640px) {
    .ue-brands { padding: 22px 0 26px; }
    .ue-brands__kicker { font-size: 10px; letter-spacing: 0.24em; margin-bottom: 16px; }
    .ue-marquee__item img { transform: scale(0.8); }
    .ue-marquee__item:hover img { transform: scale(0.84); }
}

@media (prefers-reduced-motion: reduce) {
    .ue-marquee__track { animation: none; flex-wrap: wrap; justify-content: center; row-gap: 28px; }
    .ue-marquee__track[aria-hidden="true"] { display: none; }
    .ue-marquee { -webkit-mask-image: none; mask-image: none; }
}

/* -------------------------------------------------------------------------
   PROMO 3D
   ------------------------------------------------------------------------- */
.ue-p3d {
    --stage-h: 100%;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #000;
    color: #fff;
    min-height: clamp(700px, 100vh, 1000px);
    font-family: 'Montserrat', sans-serif;
}

/* Escena */
.ue-p3d__stage {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.ue-p3d__canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.ue-p3d.is-ready .ue-p3d__canvas { opacity: 1; }

/* Degradados para fundir con las secciones vecinas y dar lectura al texto */
.ue-p3d__shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, var(--ue-ink) 0%, rgba(10, 10, 10, 0) 14%, rgba(10, 10, 10, 0) 82%, var(--ue-ink) 100%),
        radial-gradient(ellipse 48% 42% at 0% 8%, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.45) 55%, transparent 80%),
        radial-gradient(ellipse 45% 40% at 85% 100%, rgba(0, 0, 0, 0.8), transparent 80%),
        radial-gradient(ellipse 55% 70% at 100% 50%, rgba(0, 0, 0, 0.55), transparent 75%);
}

.ue-p3d__flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse 45% 55% at 28% 58%, rgba(255, 236, 210, 0.95), rgba(242, 141, 26, 0.35) 45%, transparent 75%);
    mix-blend-mode: screen;
}
.ue-p3d__flash.is-on { animation: ue-p3d-flash 0.75s ease-out; }
@keyframes ue-p3d-flash {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0; }
}

/* Loader */
.ue-p3d__loader {
    position: absolute;
    left: 28%;
    top: 52%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 2;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.ue-p3d__loader.is-hidden { opacity: 0; visibility: hidden; }
.ue-p3d__spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--ue-orange);
    animation: ue-p3d-spin 0.9s linear infinite;
}
.ue-p3d__loader-text {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}
@keyframes ue-p3d-spin { to { transform: rotate(360deg); } }

/* Layout */
.ue-p3d__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: 40px;
    max-width: 1440px;
    min-height: inherit;
    margin: 0 auto;
    padding: clamp(80px, 10vh, 128px) clamp(20px, 3vw, 48px) clamp(64px, 8vh, 104px);
    box-sizing: border-box;
}

.ue-p3d__left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    pointer-events: none;
}

.ue-p3d__kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 12px;
    border: 1px solid rgba(242, 141, 26, 0.45);
    background: rgba(242, 141, 26, 0.1);
    color: var(--ue-orange);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
}
.ue-p3d__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ue-orange);
    box-shadow: 0 0 0 0 rgba(242, 141, 26, 0.7);
    animation: ue-p3d-pulse 1.8s ease-out infinite;
}
@keyframes ue-p3d-pulse {
    0% { box-shadow: 0 0 0 0 rgba(242, 141, 26, 0.7); }
    100% { box-shadow: 0 0 0 12px rgba(242, 141, 26, 0); }
}

.ue-p3d__heading {
    margin: 18px 0 0;
    max-width: 13ch;
    font-size: clamp(2rem, 3.4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}

/* HUD (estilo configurador) */
.ue-p3d__hud {
    position: relative;
    width: min(380px, 100%);
    padding: 18px 20px 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(8, 8, 10, 0.55);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
            backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    transition: opacity 0.4s ease;
}
.ue-p3d__hud[hidden] { display: none; }
.ue-p3d__hud::before,
.ue-p3d__hud::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--ue-orange);
    border-style: solid;
    pointer-events: none;
}
.ue-p3d__hud::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: 14px; }
.ue-p3d__hud::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: 14px; }
.ue-p3d__hud.is-switching { opacity: 0.35; }
.ue-p3d__hud.is-in .ue-p3d__hud-brand,
.ue-p3d__hud.is-in .ue-p3d__hud-model { animation: ue-p3d-in 0.7s cubic-bezier(.2, .8, .2, 1) both; }
.ue-p3d__hud.is-in .ue-p3d__hud-model { animation-delay: 0.08s; }
@keyframes ue-p3d-in {
    from { opacity: 0; transform: translateX(-14px); }
    to { opacity: 1; transform: none; }
}

.ue-p3d__hud-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}
.ue-p3d__hud-count b { color: #fff; font-weight: 700; }

.ue-p3d__hud-brand {
    margin: 0;
    min-height: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ue-orange);
}
.ue-p3d__hud-model {
    margin: 2px 0 12px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ue-p3d__hud-color {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
}
.ue-p3d__swatch {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #888;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 0 4px rgba(242, 141, 26, 0.35), inset -4px -5px 8px rgba(0, 0, 0, 0.35), inset 3px 3px 6px rgba(255, 255, 255, 0.35);
    transition: background-color 1.2s ease;
}
.ue-p3d__color-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}
.ue-p3d__color-name.is-in { animation: ue-p3d-in 0.6s ease both; }
.ue-p3d__finish {
    margin-left: auto;
    padding: 3px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.ue-p3d__progress {
    height: 2px;
    margin: 14px 0 12px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border-radius: 2px;
}
.ue-p3d__progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgba(242, 141, 26, 0.4), var(--ue-orange));
    transform: scaleX(0);
    transform-origin: left;
}

.ue-p3d__hud-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ue-p3d__hud.is-single .ue-p3d__hud-nav { display: none; }
.ue-p3d__nav {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.ue-p3d__nav:hover { border-color: var(--ue-orange); background: var(--ue-orange); color: #0a0a0a; }
.ue-p3d__dots {
    flex: 1;
    display: flex;
    gap: 6px;
}
.ue-p3d__dot-btn {
    flex: 1;
    max-width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: background 0.3s;
}
.ue-p3d__dot-btn:hover { background: rgba(255, 255, 255, 0.45); }
.ue-p3d__dot-btn.is-active { background: var(--ue-orange); }

/* Póster de la promo */
.ue-p3d__right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
}

.ue-p3d__poster {
    position: relative;
    max-width: 100%;
    transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
    animation: ue-p3d-float 7s ease-in-out infinite;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 46px rgba(242, 141, 26, 0.14));
}
.ue-p3d__poster.is-tilting { transition: transform 0.12s linear; }
.ue-p3d__poster img {
    display: block;
    width: auto;
    max-width: 100%;
    height: min(70vh, 760px);
    object-fit: contain;
}
.ue-p3d__poster.is-card {
    padding: 18px;
    border-radius: 18px;
    background: #fff;
}
.ue-p3d__poster-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.16), transparent 42%);
    transition: opacity 0.4s ease;
    mix-blend-mode: screen;
}
.ue-p3d__poster.is-tilting .ue-p3d__poster-glare { opacity: 1; }
@keyframes ue-p3d-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -10px; }
}

/* Botones */
.ue-p3d__ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.ue-p3d__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.ue-p3d__btn--primary {
    position: relative;
    overflow: hidden;
    background: var(--ue-orange);
    color: #0a0a0a;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    box-shadow: 0 10px 30px rgba(242, 141, 26, 0.3);
}
.ue-p3d__btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: ue-p3d-shine 3.6s ease-in-out infinite;
}
@keyframes ue-p3d-shine {
    0%, 60% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}
.ue-p3d__btn--primary:hover { background: #fff; color: #0a0a0a; transform: translateY(-2px); }
.ue-p3d__btn--primary svg { transition: transform 0.3s; }
.ue-p3d__btn--primary:hover svg { transform: translateX(4px); }
.ue-p3d__btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
}
.ue-p3d__btn--ghost:hover { border-color: var(--ue-orange); color: var(--ue-orange); }

/* Sin WebGL / sin coches: fondo estático elegante */
.ue-p3d.is-static .ue-p3d__stage {
    background:
        radial-gradient(ellipse 50% 45% at 28% 62%, rgba(242, 141, 26, 0.2), transparent 70%),
        radial-gradient(ellipse 80% 40% at 50% 100%, rgba(255, 255, 255, 0.06), transparent 70%),
        #050505;
}
.ue-p3d.is-static .ue-p3d__canvas,
.ue-p3d.is-static .ue-p3d__loader,
.ue-p3d.is-static .ue-p3d__hud { display: none; }

/* ---------- Tablet y móvil: escena arriba, póster abajo ---------- */
@media (max-width: 1023px) {
    .ue-p3d {
        --stage-h: clamp(440px, 70vh, 640px);
        min-height: 0;
    }
    .ue-p3d__stage {
        position: relative;
        inset: auto;
        height: var(--stage-h);
    }
    .ue-p3d__stage::after {
        content: "";
        position: absolute;
        inset: auto 0 0;
        height: 30%;
        background: linear-gradient(180deg, transparent, #000);
        pointer-events: none;
    }
    .ue-p3d__shade {
        bottom: auto;
        height: var(--stage-h);
        background:
            linear-gradient(180deg, var(--ue-ink) 0%, rgba(10, 10, 10, 0) 18%),
            radial-gradient(ellipse 80% 40% at 0% 0%, rgba(0, 0, 0, 0.7), transparent 70%);
    }
    .ue-p3d__loader { left: 50%; top: 50%; }
    .ue-p3d__inner {
        position: static;
        display: block;
        min-height: 0;
        padding: 0;
    }
    .ue-p3d__left {
        position: absolute;
        z-index: 3;
        top: 0;
        left: 0;
        right: 0;
        height: var(--stage-h);
        padding: 28px 16px 16px;
        box-sizing: border-box;
        gap: 12px;
    }
    .ue-p3d__heading { font-size: clamp(1.6rem, 6vw, 2.3rem); margin-top: 12px; }
    .ue-p3d__hud { width: 100%; padding: 12px 14px; border-radius: 12px; }
    .ue-p3d__hud-top { display: none; }
    .ue-p3d__hud-model { font-size: 1.05rem; margin-bottom: 8px; }
    .ue-p3d__progress { margin: 10px 0 8px; }
    .ue-p3d__right {
        position: relative;
        z-index: 2;
        padding: 28px 16px 64px;
        background: #000;
    }
    .ue-p3d__poster img { height: auto; width: min(100%, 460px); }
    .ue-p3d__btn { flex: 1 1 100%; justify-content: center; }
    .ue-p3d__ctas { width: min(100%, 460px); }
}

@media (prefers-reduced-motion: reduce) {
    .ue-p3d__poster,
    .ue-p3d__btn--primary::after,
    .ue-p3d__dot { animation: none; }
}

/* ---------- Pantalla completa (Ctrl+L / ⌃L) para exhibir en una pantalla ---------- */
.ue-p3d:fullscreen,
.ue-p3d.is-fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
}
.ue-p3d:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
}
.ue-p3d.is-fullscreen .ue-p3d__inner {
    height: 100%;
    min-height: 100vh;
}
.ue-p3d.is-fullscreen .ue-p3d__poster img { height: min(76vh, 900px); }
.ue-p3d.is-idle,
.ue-p3d.is-idle * { cursor: none !important; }
