/* ═══════════════════════════════════════════════════════════════════
   FUTURISTIC LAYER — Confecciones Yaiza
   View transitions, scroll-reveal, splash, cursor, dark mode, social proof
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. View Transitions API ─────────────────────────────────────── */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .35s;
    animation-timing-function: cubic-bezier(.65,0,.35,1);
}
::view-transition-old(root) { animation-name: yaiza-fade-out; }
::view-transition-new(root) { animation-name: yaiza-fade-in; }

@keyframes yaiza-fade-out {
    to { opacity: 0; transform: translateY(-6px) scale(.995); filter: blur(2px); }
}
@keyframes yaiza-fade-in {
    from { opacity: 0; transform: translateY(8px) scale(.998); filter: blur(4px); }
    to { opacity: 1; transform: none; filter: none; }
}

/* ── 2. Scroll-reveal ────────────────────────────────────────────── */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .85s cubic-bezier(.2,.7,.1,1), transform .85s cubic-bezier(.2,.7,.1,1);
    will-change: opacity, transform;
}
[data-reveal].revealed {
    opacity: 1;
    transform: none;
}
[data-reveal="left"]:not(.revealed)  { transform: translateX(-40px); }
[data-reveal="right"]:not(.revealed) { transform: translateX(40px); }
[data-reveal="zoom"]:not(.revealed)  { transform: scale(.92); }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }

/* Parallax suave para elementos marcados */
[data-parallax] { transform: translate3d(0, var(--parallax-y, 0), 0); transition: transform .05s linear; }

/* ── 3. Splash de marca ──────────────────────────────────────────── */
#yaizaSplash {
    position: fixed; inset: 0;
    background: radial-gradient(circle at 50% 40%, #fffaf3 0%, #f5e9d9 100%);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    pointer-events: all;
    animation: splash-vanish .7s .9s ease-in forwards;
}
#yaizaSplash .yaiza-splash-logo {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 9vw, 5rem);
    font-weight: 700;
    letter-spacing: .04em;
    background: linear-gradient(90deg, #d4a574 0%, #5a3d2b 50%, #d4a574 100%);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation: splash-shimmer 1.2s ease-in-out;
}
#yaizaSplash .yaiza-splash-tag {
    font-family: 'Inter', sans-serif;
    font-size: .85rem;
    letter-spacing: .45em;
    color: #8b7355;
    margin-top: .6rem;
    text-transform: uppercase;
    opacity: 0;
    animation: splash-tag .5s .35s forwards;
}
@keyframes splash-shimmer {
    0% { background-position: -100% 50%; opacity: 0; transform: translateY(8px); }
    40% { opacity: 1; transform: none; }
    100% { background-position: 200% 50%; opacity: 1; }
}
@keyframes splash-tag {
    to { opacity: 1; letter-spacing: .55em; }
}
@keyframes splash-vanish {
    to { opacity: 0; transform: scale(1.02); visibility: hidden; }
}

/* ── 4. Cursor magnético ─────────────────────────────────────────── */
.magnetic { transition: transform .25s cubic-bezier(.2,.9,.2,1.05); display: inline-block; }

/* ── 5. Modo nocturno ────────────────────────────────────────────── */
html[data-theme="dark"] {
    --yaiza-bg: #141013;
    --yaiza-surface: #1d181c;
    --yaiza-text: #f0e6dc;
    --yaiza-text-muted: #a8988a;
    --yaiza-primary: #d4a574;
    --yaiza-border: #2a2126;
    color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--yaiza-bg) !important; color: var(--yaiza-text) !important; }
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .navbar.scrolled { background: rgba(20,16,19,.95) !important; border-bottom: 1px solid var(--yaiza-border); }
html[data-theme="dark"] .elegant-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .ck-card,
html[data-theme="dark"] .ck-summary,
html[data-theme="dark"] footer {
    background: var(--yaiza-surface) !important;
    color: var(--yaiza-text) !important;
    border-color: var(--yaiza-border) !important;
}
/* Secciones con inline style: las forzamos a oscuras */
html[data-theme="dark"] section[style*="background"],
html[data-theme="dark"] .hero-section-premium,
html[data-theme="dark"] .trust-strip {
    background: var(--yaiza-bg) !important;
    background-image: none !important;
}
html[data-theme="dark"] section[style*="#fff"],
html[data-theme="dark"] section[style*="#faf8f5"],
html[data-theme="dark"] section[style*="#fefdfb"] { background: var(--yaiza-bg) !important; }
html[data-theme="dark"] .text-elegant-muted,
html[data-theme="dark"] .text-elegant-secondary,
html[data-theme="dark"] .section-subtitle { color: var(--yaiza-text-muted) !important; }
html[data-theme="dark"] .section-title { color: var(--yaiza-text) !important; }
html[data-theme="dark"] .nav-link { color: var(--yaiza-text) !important; }
html[data-theme="dark"] .navbar-brand,
html[data-theme="dark"] .elegant-title,
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4,
html[data-theme="dark"] h5, html[data-theme="dark"] h6 { color: var(--yaiza-text) !important; }
html[data-theme="dark"] p, html[data-theme="dark"] span, html[data-theme="dark"] li { color: inherit; }
html[data-theme="dark"] [style*="color: var(--text-secondary)"],
html[data-theme="dark"] [style*="color:var(--text-secondary)"] { color: var(--yaiza-text) !important; }
html[data-theme="dark"] [style*="color: var(--text-muted)"],
html[data-theme="dark"] [style*="color:var(--text-muted)"] { color: var(--yaiza-text-muted) !important; }
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .ck-input {
    background: #262024 !important;
    color: var(--yaiza-text) !important;
    border-color: var(--yaiza-border) !important;
}
html[data-theme="dark"] .bg-light, html[data-theme="dark"] .bg-white { background: var(--yaiza-surface) !important; }
html[data-theme="dark"] #yaizaSplash {
    background: radial-gradient(circle at 50% 40%, #1d181c 0%, #0f0b0e 100%);
}
html[data-theme="dark"] #yaizaSplash .yaiza-splash-tag { color: #a8988a; }

/* Toggle modo noche — apilado encima del botón Volver Arriba */
.theme-toggle {
    position: fixed;
    right: 22px;
    bottom: 158px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #d4a574, #b8935f);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(184,147,95,.35);
    cursor: pointer;
    z-index: 998;
    display: flex; align-items: center; justify-content: center;
    transition: transform .25s, box-shadow .25s, background .25s;
}
.theme-toggle:hover { transform: scale(1.08) rotate(18deg); box-shadow: 0 8px 24px rgba(184,147,95,.5); }
html[data-theme="dark"] .theme-toggle { background: linear-gradient(135deg, #2d2329, #3a2e35); color: #ffd89a; }
@media (max-width: 576px) { .theme-toggle { right: 18px; bottom: 150px; width: 40px; height: 40px; font-size: 1rem; } }

/* ── 6. Social proof toast ───────────────────────────────────────── */
.social-proof-toast {
    position: fixed;
    left: 18px; bottom: 18px;
    max-width: 320px;
    background: #fff;
    border: 1px solid rgba(212,165,116,.25);
    border-radius: 14px;
    padding: .75rem 1rem;
    box-shadow: 0 10px 30px rgba(90,61,43,.15);
    display: flex; align-items: center; gap: .7rem;
    transform: translateX(-120%);
    opacity: 0;
    transition: transform .5s cubic-bezier(.2,.9,.2,1), opacity .5s ease;
    z-index: 9997;
    font-size: .82rem;
    color: #5a3d2b;
}
.social-proof-toast.visible { transform: none; opacity: 1; }
.social-proof-toast .sp-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg,#d4a574,#b8935f);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-family: 'Playfair Display', serif;
}
.social-proof-toast .sp-close {
    position: absolute; top: 4px; right: 6px;
    background: none; border: none; color: #a08d76; font-size: .75rem; cursor: pointer;
    padding: 2px 6px; line-height: 1;
}
.social-proof-toast strong { color: #5a3d2b; }
.social-proof-toast em { font-style: normal; color: #8b7355; }
html[data-theme="dark"] .social-proof-toast { background: #231c20; color: var(--yaiza-text); border-color: var(--yaiza-border); }
html[data-theme="dark"] .social-proof-toast strong { color: var(--yaiza-text); }
@media (max-width: 576px) {
    .social-proof-toast { left: 10px; right: 10px; max-width: none; bottom: 86px; }
}

/* ── 7. 360 tilt + zoom-lens ─────────────────────────────────────── */
.tilt-wrap {
    perspective: 1200px;
    position: relative;
}
.tilt-inner {
    transition: transform .15s linear;
    transform-style: preserve-3d;
    will-change: transform;
}
.zoom-lens {
    position: absolute;
    pointer-events: none;
    width: 160px; height: 160px;
    border: 2px solid rgba(212,165,116,.6);
    border-radius: 50%;
    background-repeat: no-repeat;
    background-size: 200% 200%;
    box-shadow: 0 8px 30px rgba(0,0,0,.15), inset 0 0 0 2px #fff;
    opacity: 0;
    transition: opacity .2s;
    z-index: 5;
}
.tilt-wrap:hover .zoom-lens { opacity: 1; }
@media (hover: none) { .zoom-lens { display: none; } }

/* ── 8. Quiz de estilo ───────────────────────────────────────────── */
.quiz-shell { max-width: 720px; margin: 0 auto; }
.quiz-step {
    background: #fff;
    border: 1px solid rgba(212,165,116,.2);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 14px 40px rgba(184,147,95,.08);
    display: none;
    animation: quiz-fade .45s ease;
}
.quiz-step.active { display: block; }
@keyframes quiz-fade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}
.quiz-progress {
    height: 4px;
    background: rgba(212,165,116,.15);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 1.8rem;
}
.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d4a574, #b8935f);
    width: 0%;
    transition: width .5s cubic-bezier(.2,.9,.2,1);
}
.quiz-option {
    border: 1.5px solid #eadfce;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition: all .2s;
    display: flex; align-items: center; gap: .8rem;
    margin-bottom: .6rem;
    background: #fff;
    font-size: .92rem;
    color: #5a3d2b;
}
.quiz-option:hover { border-color: #d4a574; background: #fdf8f3; transform: translateY(-2px); }
.quiz-option.selected { border-color: #b8935f; background: linear-gradient(135deg,#fdf5ec,#fbeedd); box-shadow: 0 0 0 3px rgba(212,165,116,.2); }
.quiz-option i { font-size: 1.35rem; color: #b8935f; }
html[data-theme="dark"] .quiz-step,
html[data-theme="dark"] .quiz-option { background: var(--yaiza-surface); border-color: var(--yaiza-border); color: var(--yaiza-text); }
html[data-theme="dark"] .quiz-option:hover { background: #2a2127; }

.quiz-btn {
    background: linear-gradient(135deg,#d4a574,#b8935f);
    color: #fff; border: none;
    padding: .8rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: transform .2s, box-shadow .25s;
}
.quiz-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(184,147,95,.35); color: #fff; }
.quiz-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── 9. Barra de progreso de scroll ──────────────────────────────── */
#yaiza-scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #d4a574, #b8935f, #5a3d2b, #d4a574);
    background-size: 300% 100%;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(212,165,116,.55);
    transition: width .08s linear;
    animation: yaiza-flow 3s linear infinite;
}
@keyframes yaiza-flow { to { background-position: 300% 0; } }

/* ── 10. Títulos de sección con shimmer sutil ──────────────────── */
.section-title {
    position: relative;
    background: linear-gradient(90deg, #5a3d2b 0%, #b8935f 45%, #d4a574 55%, #5a3d2b 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation: title-shimmer 9s ease-in-out infinite;
}
@keyframes title-shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
html[data-theme="dark"] .section-title {
    background: linear-gradient(90deg, #f0e6dc 0%, #d4a574 45%, #ffd89a 55%, #f0e6dc 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}

/* ── 11. Hover holográfico en tarjetas de producto ─────────────── */
.product-card-elegant, .elegant-card {
    position: relative;
    overflow: hidden;
}
.product-card-elegant::after, .elegant-card.elegant-card-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg,
        transparent 35%,
        rgba(255,255,255,.28) 48%,
        rgba(212,165,116,.18) 52%,
        transparent 65%);
    transform: translateX(-120%);
    transition: transform .9s cubic-bezier(.2,.7,.1,1);
    pointer-events: none;
    mix-blend-mode: overlay;
}
.product-card-elegant:hover::after, .elegant-card.elegant-card-shine:hover::after {
    transform: translateX(120%);
}

/* ── 12. Botón con anillo glow al hacer hover ───────────────────── */
.btn-elegant, .btn-primary-elegant, .quiz-btn, .ck-btn-submit {
    position: relative;
}
.btn-elegant::before, .btn-primary-elegant::before, .quiz-btn::before, .ck-btn-submit::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, #d4a574, #b8935f, #ffdcb3, #d4a574);
    opacity: 0;
    z-index: -1;
    transition: opacity .35s;
    filter: blur(6px);
    animation: glow-spin 4s linear infinite;
}
.btn-elegant:hover::before, .btn-primary-elegant:hover::before,
.quiz-btn:hover::before, .ck-btn-submit:hover::before { opacity: .85; }
@keyframes glow-spin { to { transform: rotate(360deg); } }

/* ── 13. Contador animado para estadísticas ─────────────────────── */
.hero-stats [data-count] { font-variant-numeric: tabular-nums; }

/* ── 14. Mejoras globales: selección y scrollbar ────────────────── */
::selection { background: rgba(212,165,116,.35); color: #3a2613; }
html[data-theme="dark"] ::selection { background: rgba(212,165,116,.45); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #d4a574 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4a574, #b8935f);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #b8935f, #8b5a3c); background-clip: padding-box; }

/* ── 15. Aurora/mesh gradient detrás del hero ────────────────────── */
.hero-section-premium { position: relative; isolation: isolate; overflow: hidden; }
.hero-section-premium::before {
    content: '';
    position: absolute;
    inset: -20% -10%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(40% 45% at 20% 30%, rgba(212,165,116,.22), transparent 60%),
        radial-gradient(35% 40% at 80% 20%, rgba(184,147,95,.18), transparent 60%),
        radial-gradient(45% 50% at 65% 85%, rgba(90,61,43,.15),  transparent 60%),
        radial-gradient(30% 35% at 10% 90%, rgba(255,216,154,.18),transparent 60%);
    filter: blur(40px) saturate(1.05);
    animation: aurora-drift 22s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
    0%   { transform: translate3d(0,0,0) scale(1); }
    50%  { transform: translate3d(3%, -2%, 0) scale(1.05); }
    100% { transform: translate3d(-2%, 3%, 0) scale(1.02); }
}
html[data-theme="dark"] .hero-section-premium::before {
    background:
        radial-gradient(40% 45% at 20% 30%, rgba(212,165,116,.28), transparent 60%),
        radial-gradient(35% 40% at 80% 20%, rgba(184,147,95,.22), transparent 60%),
        radial-gradient(45% 50% at 65% 85%, rgba(70,45,30,.35),   transparent 60%),
        radial-gradient(30% 35% at 10% 90%, rgba(255,216,154,.18),transparent 60%);
}

/* ── 16. Tilt magnético en tarjetas de producto ──────────────────── */
.product-card-elegant {
    transform-style: preserve-3d;
    transition: transform .35s cubic-bezier(.2,.7,.1,1), box-shadow .35s;
    will-change: transform;
}
@media (hover: none) { .product-card-elegant { transform: none !important; } }

/* ── 17. Bounce del contador del carrito ─────────────────────────── */
.cart-badge.pulse,
.navbar .badge.pulse,
#cart-count.pulse {
    animation: cart-bounce .55s cubic-bezier(.34,1.56,.64,1);
}
@keyframes cart-bounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.55); }
    55%  { transform: scale(.88); }
    80%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* ── 18. Ráfaga de corazones al marcar favorito ──────────────────── */
.heart-burst {
    position: absolute; pointer-events: none;
    width: 1.2rem; height: 1.2rem;
    color: #e26a6a;
    font-size: 1.2rem;
    animation: heart-fly .9s cubic-bezier(.2,.8,.2,1) forwards;
    z-index: 9999;
}
@keyframes heart-fly {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
    25%  { opacity: 1; transform: translate(var(--bx, 20px), var(--by, -30px)) scale(1.1); }
    100% { opacity: 0; transform: translate(calc(var(--bx, 20px) * 2), calc(var(--by, -30px) * 2.4)) scale(.4); }
}

/* ── 19. Skeleton shimmer para imágenes ──────────────────────────── */
img.yaiza-skeleton {
    background: linear-gradient(90deg, #efe4d3 25%, #f9f2e6 50%, #efe4d3 75%);
    background-size: 200% 100%;
    animation: sk-shimmer 1.4s ease-in-out infinite;
}
@keyframes sk-shimmer { to { background-position: -200% 0; } }
html[data-theme="dark"] img.yaiza-skeleton {
    background: linear-gradient(90deg, #231c20 25%, #2e2529 50%, #231c20 75%);
    background-size: 200% 100%;
}

/* ── 20. Command Palette (Cmd/Ctrl+K) ────────────────────────────── */
#yaiza-cmdk {
    position: fixed; inset: 0;
    background: rgba(20,16,19,.55);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    display: none;
    align-items: flex-start; justify-content: center;
    padding-top: min(14vh, 110px);
    animation: cmdk-in .22s cubic-bezier(.2,.9,.2,1);
}
#yaiza-cmdk.open { display: flex; }
#yaiza-cmdk .cmdk-panel {
    width: min(620px, 92vw);
    background: #fffaf4;
    border-radius: 18px;
    box-shadow: 0 40px 100px rgba(90,61,43,.35), 0 0 0 1px rgba(212,165,116,.2);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}
html[data-theme="dark"] #yaiza-cmdk .cmdk-panel { background: #1d181c; box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 0 1px var(--yaiza-border); color: var(--yaiza-text); }
#yaiza-cmdk .cmdk-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 1.2rem 1.4rem;
    font-size: 1.05rem;
    color: #5a3d2b;
    outline: none;
    border-bottom: 1px solid rgba(212,165,116,.2);
}
html[data-theme="dark"] #yaiza-cmdk .cmdk-input { color: var(--yaiza-text); border-bottom-color: var(--yaiza-border); }
#yaiza-cmdk .cmdk-list { max-height: 50vh; overflow-y: auto; padding: .4rem; }
#yaiza-cmdk .cmdk-item {
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: .92rem;
    color: #5a3d2b;
    transition: background .15s;
}
#yaiza-cmdk .cmdk-item.focused { background: linear-gradient(135deg, rgba(212,165,116,.15), rgba(184,147,95,.12)); }
html[data-theme="dark"] #yaiza-cmdk .cmdk-item { color: var(--yaiza-text); }
html[data-theme="dark"] #yaiza-cmdk .cmdk-item.focused { background: rgba(212,165,116,.12); }
#yaiza-cmdk .cmdk-item i { font-size: 1.05rem; color: #b8935f; width: 1.3rem; text-align: center; }
#yaiza-cmdk .cmdk-kbd {
    margin-left: auto;
    font-size: .7rem;
    background: rgba(212,165,116,.15);
    border-radius: 5px;
    padding: 2px 7px;
    color: #8b7355;
    letter-spacing: .04em;
}
#yaiza-cmdk .cmdk-section {
    padding: .5rem 1rem .3rem;
    font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
    color: #a08d76;
}
#yaiza-cmdk .cmdk-footer {
    padding: .55rem 1rem;
    font-size: .72rem; color: #a08d76;
    border-top: 1px solid rgba(212,165,116,.15);
    display: flex; gap: 1rem; justify-content: flex-end;
}
html[data-theme="dark"] #yaiza-cmdk .cmdk-footer { color: var(--yaiza-text-muted); border-top-color: var(--yaiza-border); }
@keyframes cmdk-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 576px) { #yaiza-cmdk { padding-top: 5vh; } }

/* ── 21. Focus-visible accesible y elegante ──────────────────────── */
:focus-visible {
    outline: 2px solid #d4a574;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── 22. Constelación canvas detrás del hero ─────────────────────── */
#yaiza-constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: .55;
    mix-blend-mode: screen;
}
html[data-theme="dark"] #yaiza-constellation { opacity: .75; }

/* ── 23. Custom cursor ───────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
    html.yaiza-cursor-on, html.yaiza-cursor-on body { cursor: none !important; }
    html.yaiza-cursor-on a, html.yaiza-cursor-on button, html.yaiza-cursor-on input,
    html.yaiza-cursor-on textarea, html.yaiza-cursor-on select,
    html.yaiza-cursor-on [role="button"], html.yaiza-cursor-on label { cursor: none !important; }
}
#yaiza-cursor-dot, #yaiza-cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 10002;
    will-change: transform;
    transform: translate3d(-100px, -100px, 0);
}
#yaiza-cursor-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #d4a574;
    transition: width .2s, height .2s, background .25s;
    mix-blend-mode: difference;
}
#yaiza-cursor-ring {
    width: 34px; height: 34px;
    border: 1.5px solid rgba(212,165,116,.7);
    border-radius: 50%;
    transition: width .25s cubic-bezier(.2,.9,.2,1),
                height .25s cubic-bezier(.2,.9,.2,1),
                border-color .25s,
                background .25s,
                transform .08s linear;
    backdrop-filter: invert(0);
}
#yaiza-cursor-ring.hover {
    width: 54px; height: 54px;
    border-color: #d4a574;
    background: rgba(212,165,116,.12);
}
#yaiza-cursor-ring.click { width: 22px; height: 22px; border-color: #5a3d2b; }
#yaiza-cursor-ring.text  { width: 3px;  height: 26px; border-radius: 2px; border-color: #d4a574; background: rgba(212,165,116,.3); }
@media (hover: none), (pointer: coarse), (max-width: 768px) {
    #yaiza-cursor-dot, #yaiza-cursor-ring { display: none; }
}

/* ── 24. Spotlight que sigue al cursor ───────────────────────────── */
.spotlight {
    position: relative;
    isolation: isolate;
}
.spotlight::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        400px circle at var(--mx, 50%) var(--my, 50%),
        rgba(212, 165, 116, .22),
        transparent 45%
    );
    opacity: 0;
    transition: opacity .35s;
    z-index: 1;
}
.spotlight:hover::after { opacity: 1; }
html[data-theme="dark"] .spotlight::after {
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 216, 154, .15), transparent 45%);
}

/* ── 25. Confetti al añadir al carrito ──────────────────────────── */
.yaiza-confetti {
    position: fixed;
    width: 8px; height: 14px;
    pointer-events: none;
    z-index: 10003;
    will-change: transform, opacity;
    animation: confetti-fall 1.5s cubic-bezier(.2,.7,.1,1) forwards;
}
@keyframes confetti-fall {
    0%   { transform: translate3d(0,0,0) rotate(0deg); opacity: 1; }
    100% { transform: translate3d(var(--cx, 0), var(--cy, 300px), 0) rotate(var(--cr, 720deg)); opacity: 0; }
}

/* ── 26. Fly-to-cart ────────────────────────────────────────────── */
.yaiza-fly-img {
    position: fixed;
    pointer-events: none;
    z-index: 10004;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(90,61,43,.4);
    object-fit: cover;
    transition: all .85s cubic-bezier(.7,-.1,.3,1.2);
    will-change: transform, opacity, width, height, top, left;
}

/* ── 27. Navegador de puntos de sección ──────────────────────────── */
#yaiza-section-dots {
    position: fixed;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex; flex-direction: column; gap: .55rem;
    z-index: 997;
}
#yaiza-section-dots .sd-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(212,165,116,.35);
    border: none; padding: 0; cursor: pointer;
    transition: all .35s cubic-bezier(.2,.9,.2,1);
    position: relative;
}
#yaiza-section-dots .sd-dot:hover { background: #d4a574; transform: scale(1.4); }
#yaiza-section-dots .sd-dot.active {
    background: #d4a574;
    height: 22px; border-radius: 4px;
    box-shadow: 0 0 10px rgba(212,165,116,.5);
}
#yaiza-section-dots .sd-dot::before {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 10px); top: 50%;
    transform: translateY(-50%) translateX(6px);
    font-size: .7rem;
    color: #5a3d2b;
    background: #fffaf4;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(90,61,43,.15);
    opacity: 0; pointer-events: none;
    transition: all .25s;
    letter-spacing: .02em;
}
#yaiza-section-dots .sd-dot:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
html[data-theme="dark"] #yaiza-section-dots .sd-dot::before { background: var(--yaiza-surface); color: var(--yaiza-text); }
@media (max-width: 992px) { #yaiza-section-dots { display: none; } }

/* ── 28. Voice search button ─────────────────────────────────────── */
.yaiza-voice-btn {
    background: transparent;
    border: none;
    color: #b8935f;
    font-size: 1rem;
    padding: 0 .4rem;
    cursor: pointer;
    transition: color .2s, transform .2s;
    display: inline-flex; align-items: center; justify-content: center;
}
.yaiza-voice-btn:hover { color: #5a3d2b; transform: scale(1.1); }
.yaiza-voice-btn.listening {
    color: #e26a6a;
    animation: voice-pulse 1.2s ease-in-out infinite;
}
@keyframes voice-pulse {
    0%,100% { transform: scale(1); text-shadow: 0 0 0 rgba(226,106,106,.6); }
    50%     { transform: scale(1.15); text-shadow: 0 0 14px rgba(226,106,106,.75); }
}

/* ── 29. Mini-cart drawer ───────────────────────────────────────── */
#yaiza-minicart-overlay {
    position: fixed; inset: 0;
    background: rgba(20,16,19,.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 10005;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
#yaiza-minicart-overlay.open { opacity: 1; pointer-events: auto; }

#yaiza-minicart {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(400px, 92vw);
    background: #fffaf4;
    z-index: 10006;
    transform: translateX(100%);
    transition: transform .45s cubic-bezier(.2,.9,.2,1);
    display: flex; flex-direction: column;
    box-shadow: -20px 0 60px rgba(90,61,43,.2);
}
#yaiza-minicart.open { transform: none; }
html[data-theme="dark"] #yaiza-minicart { background: #1d181c; color: var(--yaiza-text); }

#yaiza-minicart .mc-header {
    padding: 1.2rem 1.3rem;
    border-bottom: 1px solid rgba(212,165,116,.2);
    display: flex; align-items: center; justify-content: space-between;
}
#yaiza-minicart .mc-header h4 {
    font-family: 'Playfair Display', serif;
    color: #5a3d2b;
    font-size: 1.15rem;
    margin: 0;
}
html[data-theme="dark"] #yaiza-minicart .mc-header h4 { color: var(--yaiza-text); }
#yaiza-minicart .mc-close {
    background: transparent; border: none;
    color: #8b7355;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}
#yaiza-minicart .mc-body {
    flex: 1;
    overflow-y: auto;
    padding: .5rem .7rem;
}
#yaiza-minicart .mc-item {
    display: flex; gap: .75rem;
    padding: .7rem;
    border-radius: 12px;
    transition: background .2s;
    animation: mc-in .35s ease;
}
#yaiza-minicart .mc-item:hover { background: rgba(212,165,116,.08); }
@keyframes mc-in { from { opacity: 0; transform: translateX(15px); } to { opacity: 1; transform: none; } }
#yaiza-minicart .mc-item img {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
#yaiza-minicart .mc-item .mc-meta { flex: 1; min-width: 0; }
#yaiza-minicart .mc-item .mc-name {
    font-size: .88rem;
    color: #5a3d2b;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: .25rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
html[data-theme="dark"] #yaiza-minicart .mc-item .mc-name { color: var(--yaiza-text); }
#yaiza-minicart .mc-item .mc-opts { font-size: .72rem; color: #a08d76; margin-bottom: .3rem; }
#yaiza-minicart .mc-item .mc-price { font-size: .9rem; color: #b8935f; font-weight: 700; }
#yaiza-minicart .mc-item .mc-qty { font-size: .75rem; color: #8b7355; margin-left: .4rem; }

#yaiza-minicart .mc-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #8b7355;
}
#yaiza-minicart .mc-empty i { font-size: 3rem; color: #d4a574; margin-bottom: 1rem; display: block; }

#yaiza-minicart .mc-footer {
    padding: 1rem 1.3rem;
    border-top: 1px solid rgba(212,165,116,.2);
    background: rgba(212,165,116,.04);
}
html[data-theme="dark"] #yaiza-minicart .mc-footer { background: rgba(0,0,0,.15); border-top-color: var(--yaiza-border); }
#yaiza-minicart .mc-total {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: .9rem;
}
#yaiza-minicart .mc-total span:first-child { color: #8b7355; font-size: .9rem; }
#yaiza-minicart .mc-total strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #5a3d2b;
}
html[data-theme="dark"] #yaiza-minicart .mc-total strong { color: var(--yaiza-text); }
#yaiza-minicart .mc-actions { display: flex; gap: .6rem; }
#yaiza-minicart .mc-btn {
    flex: 1;
    padding: .7rem 1rem;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    transition: all .25s;
    border: none; cursor: pointer;
}
#yaiza-minicart .mc-btn.primary {
    background: linear-gradient(135deg, #d4a574, #b8935f);
    color: #fff;
}
#yaiza-minicart .mc-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(184,147,95,.4); }
#yaiza-minicart .mc-btn.secondary {
    background: transparent;
    color: #8b7355;
    border: 1px solid rgba(212,165,116,.3);
}
#yaiza-minicart .mc-btn.secondary:hover { background: rgba(212,165,116,.1); color: #5a3d2b; }

/* ── 30. Hover imagen secundaria en tarjetas de producto ─────────── */
.product-card-elegant {
    /* wrapper de imágenes sirve como contenedor de crossfade */
}
.product-card-elegant .product-img-wrap {
    position: relative;
    overflow: hidden;
}
.product-card-elegant .product-img-secondary {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .45s ease, transform .6s ease;
    pointer-events: none;
}
.product-card-elegant:hover .product-img-secondary {
    opacity: 1;
    transform: scale(1);
}
.product-card-elegant:hover .product-image-elegant { opacity: 0; transition: opacity .45s ease; }

/* ── 31. Badge de stock crítico pulsante ─────────────────────────── */
.yaiza-stock-low {
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(226,106,106,.12);
    color: #c94545;
    padding: .25rem .65rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.yaiza-stock-low::before {
    content: '';
    width: 6px; height: 6px;
    background: #e26a6a;
    border-radius: 50%;
    animation: stock-blink 1.4s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(226,106,106,.6);
}
@keyframes stock-blink {
    0%   { box-shadow: 0 0 0 0 rgba(226,106,106,.6); }
    70%  { box-shadow: 0 0 0 10px rgba(226,106,106,0); }
    100% { box-shadow: 0 0 0 0 rgba(226,106,106,0); }
}

/* Reducir animaciones para usuarios con prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
    [data-reveal] { opacity: 1 !important; transform: none !important; }
    #yaizaSplash { display: none !important; }
}
