/*
Theme Name: Midnight Drops — Halloween
Template: hello-elementor
Description: Tema de temporada de Midnight Drops: casa embrujada, neón verde y violeta, bruja, murciélagos y telarañas animadas. Solo presentación; requiere el mu-plugin midnight-drops-core.
Version: 1.0.0
Author: Midnight Drops
Text Domain: midnight-drops-halloween
*/

/* ===================================================== */
/* === TOKENS ========================================== */
/* ===================================================== */
:root {
    --md-bg: #0B0618;
    --md-surface: #160B2B;
    --md-surface-2: #1F0F3B;
    --md-fg: #F5F0FF;
    --md-muted: #A99BC9;
    --md-success: #4ADE80;

    /* Neón de temporada */
    --md-hw-green: #4BFF7A;
    --md-hw-purple: #B026FF;
    --md-hw-violet: #7B2BFF;
    --md-hw-orange: #FF8A1F;

    /* Nombres históricos (los usa contenido viejo) → paleta de temporada */
    --md-neon-magenta: var(--md-hw-purple);
    --md-neon-violet: var(--md-hw-violet);
    --md-neon-cyan: var(--md-hw-green);

    /* Tokens semánticos del core */
    --md-accent: var(--md-hw-purple);
    --md-accent-2: var(--md-hw-violet);
    --md-highlight: var(--md-hw-green);
    --md-price: var(--md-hw-green);
    --md-gradient: linear-gradient(135deg, #B026FF 0%, #7B2BFF 55%, #4BFF7A 130%);

    --md-font-display: 'Creepster', 'Sora', system-ui, sans-serif;
    --md-font-heading: 'Sora', system-ui, sans-serif;
    --md-font-body: 'Inter', system-ui, sans-serif;
    --md-radius: 20px;
    --md-radius-pill: 999px;
    --md-header-height: 72px;
    --md-gutter: 16px;

    --md-glow-green: 0 0 6px rgba(75, 255, 122, .9), 0 0 18px rgba(75, 255, 122, .6), 0 0 42px rgba(75, 255, 122, .35);
    --md-glow-purple: 0 0 6px rgba(176, 38, 255, .9), 0 0 18px rgba(176, 38, 255, .6), 0 0 42px rgba(176, 38, 255, .35);
}

/* ===================================================== */
/* === BASE ============================================ */
/* ===================================================== */
html { scroll-behavior: smooth; overflow-x: clip; }
body {
    margin: 0;
    background-color: var(--md-bg);
    color: var(--md-fg);
    font-family: var(--md-font-body);
    line-height: 1.6;
    position: relative;
    /* clip (no hidden): hidden convierte al body en contenedor de scroll y el
       header deja de ser sticky. */
    overflow-x: clip;
}
html.md-no-scroll,
body.md-no-scroll { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--md-font-heading);
    font-weight: 700;
    line-height: 1.15;
    color: var(--md-fg);
    letter-spacing: -0.01em;
}
a { color: var(--md-hw-green); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--md-hw-purple); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--md-hw-purple); color: #fff; }
:focus-visible { outline: 2px solid var(--md-hw-green); outline-offset: 3px; }

.md-skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; padding: .5rem 1rem; background: var(--md-hw-purple); color: #fff; }
.md-skip-link:focus { left: 1rem; top: 1rem; }

/* Cielo nocturno: neblina violeta + estrellas que titilan, detrás de todo. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 60% 45% at 15% 10%, rgba(176, 38, 255, .22), transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 35%, rgba(75, 255, 122, .08), transparent 60%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(123, 43, 255, .25), transparent 65%),
        var(--md-bg);
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 60% 70%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 85% 15%, #c8a6ff, transparent),
        radial-gradient(1px 1px at 40% 85%, #fff, transparent),
        radial-gradient(1px 1px at 10% 60%, #9dffb8, transparent),
        radial-gradient(1px 1px at 75% 45%, #fff, transparent);
    background-size: 340px 340px;
    opacity: .5;
    animation: md-hw-twinkle 6s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes md-hw-twinkle { from { opacity: .25; } to { opacity: .7; } }

/* Helpers */
.md-container { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 var(--md-gutter); }
@media (min-width: 768px) { .md-container { padding: 0 1.5rem; } }
.md-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.md-grid--gallery { gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .md-grid--gallery { gap: 1.75rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }

/* ===================================================== */
/* === HEADER ========================================== */
/* ===================================================== */
.md-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background: rgba(11, 6, 24, .6);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(176, 38, 255, .15);
    transition: background .25s ease, box-shadow .25s ease;
}
.md-header.is-scrolled { background: rgba(11, 6, 24, .9); box-shadow: 0 8px 30px rgba(0, 0, 0, .45); }
.md-header__web {
    position: absolute;
    top: 0;
    width: 92px;
    opacity: .55;
    pointer-events: none;
    transform-origin: top left;
    animation: md-hw-sway 7s ease-in-out infinite;
}
.md-header__web--l { left: 0; }
/* El espejo (scaleX(-1)) va con origen centrado: con origen en la esquina la imagen se volteaba fuera de pantalla. */
.md-header__web--r { right: 0; transform: scaleX(-1); transform-origin: top center; animation-name: md-hw-sway-r; }
.md-header__inner {
    position: relative;
    max-width: 1280px;
    min-height: var(--md-header-height);
    margin: 0 auto;
    padding: .6rem var(--md-gutter);
    display: flex;
    align-items: center;
    gap: 1rem;
}
@media (min-width: 768px) { .md-header__inner { padding: .75rem 1.5rem; } }
.md-header__brand { display: inline-flex; align-items: center; gap: .6rem; flex: 0 0 auto; line-height: 1; }
.md-header__logo { height: 40px; width: auto; filter: drop-shadow(0 0 8px rgba(75, 255, 122, .45)); transition: filter .3s ease; }
.md-header__brand:hover .md-header__logo { filter: drop-shadow(0 0 14px rgba(75, 255, 122, .85)); }
.md-header__wordmark { display: flex; align-items: baseline; gap: .45rem; font-family: var(--md-font-heading); white-space: nowrap; }
.md-header__wordmark-top { color: var(--md-fg); font-weight: 800; font-size: 1rem; letter-spacing: .16em; text-shadow: 0 0 8px rgba(255, 255, 255, .4); }
.md-header__wordmark-bottom {
    color: var(--md-hw-purple);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: .16em;
    text-shadow: var(--md-glow-purple);
    animation: md-hw-flicker 7s linear infinite;
}
@media (max-width: 480px) {
    .md-header__wordmark-top, .md-header__wordmark-bottom { font-size: .82rem; letter-spacing: .12em; }
    .md-header__logo { height: 34px; }
}
@media (max-width: 359px) { .md-header__wordmark { display: none; } }

.md-header__nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.md-menu { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.md-menu li { margin: 0; padding: 0; }
.md-menu a {
    position: relative;
    padding: .35rem 0;
    color: var(--md-fg);
    font-family: var(--md-font-heading);
    font-weight: 500;
    font-size: .95rem;
}
.md-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    border-radius: 2px;
    background: var(--md-hw-purple);
    box-shadow: var(--md-glow-purple);
    transform: scaleX(0);
    transition: transform .25s ease;
}
.md-menu a:hover { color: var(--md-fg); }
.md-menu a:hover::after,
.md-menu .current-menu-item > a::after,
.md-menu .current_page_item > a::after { transform: scaleX(1); }
.md-menu__cta { padding: .55rem 1.15rem !important; font-size: .8rem !important; }
.md-header__tools { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }

.md-header__toggle { display: none; position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.md-header__toggle span { position: absolute; left: 10px; right: 10px; height: 2px; border-radius: 2px; background: var(--md-fg); transition: transform .3s ease, opacity .2s ease, top .3s ease, background .25s ease; }
.md-header__toggle span:nth-child(1) { top: 14px; }
.md-header__toggle span:nth-child(2) { top: 21px; }
.md-header__toggle span:nth-child(3) { top: 28px; }
.md-header__toggle.is-active span:nth-child(1) { top: 21px; transform: rotate(45deg); background: var(--md-hw-green); }
.md-header__toggle.is-active span:nth-child(2) { opacity: 0; }
.md-header__toggle.is-active span:nth-child(3) { top: 21px; transform: rotate(-45deg); background: var(--md-hw-purple); }

@media (max-width: 880px) {
    .md-header__toggle { display: block; }
    .md-header__tools { margin-left: auto; } /* el nav pasa a fixed: las herramientas van a la derecha */
    .md-header__nav {
        /* Fixed dentro de un header con backdrop-filter: unidades de viewport. */
        position: fixed;
        top: var(--md-header-height);
        left: 0;
        width: 100vw;
        height: calc(100dvh - var(--md-header-height));
        box-sizing: border-box;
        z-index: 40;
        overflow-y: auto;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        margin: 0;
        padding: 2.5rem var(--md-gutter) calc(2.5rem + env(safe-area-inset-bottom));
        background:
            url("assets/images/telarana-2.webp") right -40px bottom -30px / 220px no-repeat,
            linear-gradient(160deg, #1a0a35 0%, #0B0618 70%);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .3s ease, visibility .3s;
    }
    .md-header__nav.is-open { transform: none; visibility: visible; }
    .md-menu { flex-direction: column; gap: 1.5rem; width: 100%; text-align: center; }
    .md-menu li { width: 100%; }
    .md-menu a { display: inline-block; padding: .5rem 0; font-family: var(--md-font-display); font-size: 2.1rem; letter-spacing: .04em; }
    .md-menu__cta { font-size: 1rem !important; padding: 1rem 2rem !important; }
}

/* ===================================================== */
/* === BOTONES ========================================= */
/* ===================================================== */
.md-btn-primary, .md-btn-secondary, .md-btn-ghost, .md-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    padding: .85rem 1.7rem;
    border: 0;
    border-radius: var(--md-radius-pill);
    font-family: var(--md-font-heading);
    font-weight: 700;
    font-size: .9rem;
    line-height: 1;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .25s ease, background .25s ease, color .2s ease;
}
.md-btn-primary { background: linear-gradient(135deg, #B026FF, #7B2BFF); color: #fff; box-shadow: 0 0 24px rgba(176, 38, 255, .45); }
.md-btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 0 44px rgba(176, 38, 255, .8); }
.md-btn-secondary { background: transparent; color: var(--md-hw-green); border: 1px solid var(--md-hw-green); }
.md-btn-secondary:hover { color: var(--md-hw-green); background: rgba(75, 255, 122, .08); box-shadow: 0 0 24px rgba(75, 255, 122, .35); }
.md-btn-ghost { background: rgba(30, 12, 58, .85); color: #fff; border: 1px solid rgba(176, 38, 255, .45); box-shadow: inset 0 0 18px rgba(176, 38, 255, .25); }
.md-btn-ghost:hover { color: #fff; border-color: var(--md-hw-purple); box-shadow: inset 0 0 18px rgba(176, 38, 255, .35), 0 0 26px rgba(176, 38, 255, .5); transform: translateY(-2px); }
.md-whatsapp-btn { background: linear-gradient(135deg, #25D366, #128C7E); color: #fff !important; box-shadow: 0 0 22px rgba(37, 211, 102, .45); }
.md-whatsapp-btn:hover { transform: translateY(-2px); box-shadow: 0 0 38px rgba(37, 211, 102, .75); }
.md-whatsapp-btn::before {
    content: '';
    width: 1.05em;
    height: 1.05em;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M12.04 2c-5.52 0-10 4.48-10 10 0 1.76.46 3.4 1.27 4.83L2 22l5.32-1.27c1.36.74 2.93 1.16 4.6 1.16 5.52 0 10-4.48 10-10s-4.36-9.89-9.88-9.89zm5.84 14.13c-.25.7-1.45 1.34-2.04 1.42-.52.08-1.18.11-1.91-.12-.44-.14-1.01-.32-1.74-.64-3.06-1.32-5.06-4.41-5.21-4.61-.15-.2-1.25-1.66-1.25-3.17 0-1.51.79-2.25 1.07-2.56.28-.31.61-.39.81-.39h.59c.19 0 .45-.07.7.54.25.61.85 2.12.93 2.27.07.15.13.32.02.52-.11.2-.16.32-.31.5-.16.18-.33.4-.47.54-.16.16-.32.33-.14.65.18.32.81 1.33 1.74 2.16 1.2 1.07 2.21 1.4 2.53 1.56.32.16.5.13.69-.08.18-.21.79-.92.99-1.23.21-.32.42-.27.7-.16.29.11 1.81.85 2.12 1.01.31.16.52.24.6.37.06.13.06.78-.18 1.49z'/></svg>") center / contain no-repeat;
}

/* ===================================================== */
/* === HERO DE HALLOWEEN =============================== */
/* ===================================================== */
.md-hw-hero {
    --px: 0;
    --py: 0;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: min(calc(100svh - var(--md-header-height)), 860px);
    display: flex;
    align-items: center;
    padding: 2.5rem var(--md-gutter) 4.5rem;
}
.md-hw-hero__bg {
    position: absolute;
    inset: -3%;
    z-index: -4;
    background: var(--md-hw-bg-m, var(--md-hw-bg)) center 30% / cover no-repeat;
    filter: saturate(1.05) brightness(.8);
    transform: translate(calc(var(--px) * -14px), calc(var(--py) * -10px)) scale(1.02);
    transition: transform .4s ease-out;
    animation: md-hw-zoom 26s ease-in-out infinite alternate;
}
@media (min-width: 768px) { .md-hw-hero__bg { background-image: var(--md-hw-bg); } }
/* Oscurece bordes y base para que el texto se lea sobre la foto */
.md-hw-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(ellipse 70% 60% at 50% 45%, transparent 30%, rgba(11, 6, 24, .75) 100%),
        linear-gradient(180deg, rgba(11, 6, 24, .25) 0%, rgba(11, 6, 24, .1) 50%, var(--md-bg) 100%);
}
/* Halo de la luna que late (la luna está en la foto, arriba a la derecha) */
.md-hw-hero__moon {
    position: absolute;
    z-index: -3;
    top: 8%;
    left: 52%;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(222, 196, 255, .45) 0%, rgba(176, 38, 255, .18) 40%, transparent 70%);
    filter: blur(6px);
    animation: md-hw-moon 5s ease-in-out infinite;
    pointer-events: none;
}
@media (max-width: 767px) { .md-hw-hero__moon { top: 4%; left: 40%; width: 220px; height: 220px; } }
/* Niebla rastrera en dos capas */
.md-hw-hero__fog {
    position: absolute;
    left: -50%;
    right: -50%;
    bottom: -40px;
    z-index: -2;
    height: 260px;
    background:
        radial-gradient(ellipse 30% 55% at 20% 60%, rgba(196, 170, 255, .22), transparent 70%),
        radial-gradient(ellipse 25% 45% at 55% 70%, rgba(170, 140, 230, .18), transparent 70%),
        radial-gradient(ellipse 35% 50% at 85% 55%, rgba(196, 170, 255, .2), transparent 70%);
    filter: blur(14px);
    pointer-events: none;
    animation: md-hw-fog 38s linear infinite;
}
.md-hw-hero__fog--2 { bottom: 20px; height: 200px; opacity: .7; animation-duration: 55s; animation-direction: reverse; }
/* Brasas verdes que suben */
.md-hw-embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.md-hw-embers span {
    position: absolute;
    bottom: -12px;
    left: calc(4% + var(--i) * 7%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--md-hw-green);
    box-shadow: 0 0 8px var(--md-hw-green), 0 0 16px rgba(75, 255, 122, .6);
    opacity: 0;
    animation: md-hw-ember calc(9s + var(--i) * .55s) linear infinite;
    animation-delay: calc(var(--i) * -1.3s);
}
.md-hw-embers span:nth-child(3n) { background: var(--md-hw-purple); box-shadow: 0 0 8px var(--md-hw-purple), 0 0 16px rgba(176, 38, 255, .6); }
.md-hw-embers span:nth-child(4n) { width: 3px; height: 3px; }

/* Telarañas en las esquinas (se mecen) */
.md-hw-web { position: absolute; z-index: -1; width: clamp(110px, 18vw, 250px); opacity: .7; pointer-events: none; }
.md-hw-web--tl { top: 0; left: 0; transform-origin: top left; animation: md-hw-sway 8s ease-in-out infinite; }
.md-hw-web--tr { top: 0; right: 0; transform: scaleX(-1); transform-origin: top center; animation: md-hw-sway-r 9s ease-in-out infinite; }
.md-hw-web--bl { bottom: 0; left: 0; transform: scaleX(-1); transform-origin: bottom center; animation: md-hw-sway-r 10s ease-in-out infinite; }
.md-hw-web--br { bottom: 0; right: 0; transform-origin: bottom right; animation: md-hw-sway 11s ease-in-out infinite; }
@media (max-width: 767px) { .md-hw-web--bl, .md-hw-web--br { display: none; } }

.md-hw-hero__inner {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
    justify-items: center;
    text-align: center;
}
.md-hw-hero__title { margin: 0; line-height: 1; }
.md-hw-hero__title img {
    width: min(86vw, 520px);
    filter: drop-shadow(0 0 10px rgba(75, 255, 122, .55)) drop-shadow(0 0 26px rgba(75, 255, 122, .3));
    animation: md-hw-flicker 6s linear infinite;
}
.md-hw-neon-text {
    display: inline-block;
    font-family: var(--md-font-display);
    font-weight: 400;
    font-size: clamp(2.8rem, 11vw, 6rem);
    line-height: .95;
    letter-spacing: .04em;
    color: #d9ffe3;
    text-shadow: var(--md-glow-green);
    animation: md-hw-flicker 6s linear infinite;
}
.md-hw-hero__center { display: grid; justify-items: center; gap: 1.1rem; }
.md-hw-hero__logo { position: relative; width: min(52vw, 210px); }
.md-hw-hero__logo img {
    width: 100%;
    border-radius: 6px;
    /* El logo es neón sobre negro: `screen` funde el negro con el fondo. */
    mix-blend-mode: screen;
    /* Difumina el borde del JPEG para que no se vea el recuadro. */
    -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 82%, transparent 100%);
    filter: drop-shadow(0 0 22px rgba(75, 255, 122, .35)) drop-shadow(0 0 40px rgba(176, 38, 255, .35));
    animation: md-hw-float 6s ease-in-out infinite;
}
.md-hw-sparkle { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff, 0 0 20px var(--md-hw-green); animation: md-hw-sparkle 3s ease-in-out infinite; }
.md-hw-sparkle--1 { top: 6%; left: -6%; }
.md-hw-sparkle--2 { top: 40%; right: -8%; animation-delay: -1s; background: #e7c8ff; box-shadow: 0 0 10px #fff, 0 0 20px var(--md-hw-purple); }
.md-hw-sparkle--3 { bottom: 4%; left: 12%; animation-delay: -2s; }
.md-hw-hero__tagline { margin: 0; max-width: 34rem; color: #ddd3f2; font-size: 1rem; line-height: 1.6; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.md-hw-hero__cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .9rem 1.1rem; margin-top: .4rem; }
.md-hw-btn-catalogo { flex-direction: column; gap: .25rem; padding: .7rem 1.6rem .55rem; }
.md-hw-btn-catalogo small {
    font-family: var(--md-font-display);
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: .05em;
    text-transform: none;
    color: var(--md-hw-green);
    text-shadow: 0 0 8px rgba(75, 255, 122, .8);
}
.md-hw-hero__wa { position: relative; display: inline-flex; }
.md-hw-pumpkin {
    position: absolute;
    right: -26px;
    top: -26px;
    width: 46px;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 138, 31, .8));
    animation: md-hw-bob 2.8s ease-in-out infinite, md-hw-candle 3.5s steps(1) infinite;
}
.md-hw-witch {
    position: absolute;
    z-index: 0;
    top: 5.2rem; /* móvil: junto al logo, sin tapar el título */
    right: -6px;
    width: min(30vw, 118px);
    pointer-events: none;
}
.md-hw-witch img {
    width: 100%;
    filter: drop-shadow(0 0 10px rgba(214, 120, 255, .9)) drop-shadow(0 0 26px rgba(176, 38, 255, .6));
    animation: md-hw-witch 7s ease-in-out infinite;
}
.md-hw-hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    color: var(--md-muted);
    font-size: 1.4rem;
    transform: translateX(-50%);
    animation: md-hw-scroll 2.2s ease-in-out infinite;
}

@media (min-width: 900px) {
    .md-hw-hero { padding: 3rem 1.5rem 5rem; }
    .md-hw-hero__inner {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 440px) minmax(0, 1fr);
        align-items: center;
        gap: 2rem;
    }
    .md-hw-hero__title { align-self: start; justify-self: start; margin-top: 1rem; transform: translate(calc(var(--px) * 10px), calc(var(--py) * 8px)); transition: transform .4s ease-out; }
    .md-hw-hero__title img { width: min(32vw, 430px); }
    .md-hw-neon-text { font-size: clamp(3rem, 5.5vw, 5.4rem); text-align: left; }
    .md-hw-hero__logo { width: 220px; }
    .md-hw-witch {
        position: relative;
        top: auto;
        right: auto;
        justify-self: end;
        width: min(28vw, 360px);
        transform: translate(calc(var(--px) * 26px), calc(var(--py) * 18px));
        transition: transform .4s ease-out;
    }
}

/* ===================================================== */
/* === DECORACIÓN GLOBAL: murciélagos y araña ========== */
/* ===================================================== */
.md-hw-sky { position: fixed; inset: 0; z-index: 45; overflow: hidden; pointer-events: none; }
.md-hw-bat { position: absolute; left: -15vw; display: block; opacity: 0; will-change: transform; }
.md-hw-bat img { width: 100%; filter: drop-shadow(0 0 6px rgba(176, 38, 255, .6)); animation: md-hw-flap .32s ease-in-out infinite alternate; transform-origin: center 40%; }
.md-hw-bat--1 { top: 9%;  width: 64px; animation: md-hw-fly-a 19s linear infinite 1s; }
.md-hw-bat--2 { top: 22%; width: 46px; animation: md-hw-fly-b 24s linear infinite 7s; }
.md-hw-bat--3 { top: 5%;  width: 38px; animation: md-hw-fly-a 28s linear infinite 13s; }
.md-hw-bat--4 { top: 34%; width: 30px; animation: md-hw-fly-b 33s linear infinite 18s; }
@media (max-width: 767px) {
    .md-hw-bat--3, .md-hw-bat--4 { display: none; }
    .md-hw-bat--1 { width: 44px; }
    .md-hw-bat--2 { width: 34px; }
}
/* Araña que baja y sube de su hilo (esquina superior derecha) */
.md-hw-spider {
    position: absolute;
    top: var(--md-header-height);
    right: 12%;
    width: 1px;
    height: 120px;
    background: linear-gradient(rgba(220, 210, 255, .55), rgba(220, 210, 255, .2));
    transform-origin: top center;
    animation: md-hw-spider 9s ease-in-out infinite;
}
.md-hw-spider__body { position: absolute; bottom: -14px; left: -12px; font-size: 24px; filter: drop-shadow(0 0 6px rgba(176, 38, 255, .7)); }
@media (max-width: 767px) { .md-hw-spider { right: 18%; height: 80px; } }

/* Calabaza asomada junto al botón flotante de WhatsApp */
.md-hw-peek {
    position: fixed;
    right: 4.6rem;
    bottom: 1.3rem;
    z-index: 99;
    width: 40px;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 138, 31, .7));
    animation: md-hw-bob 3.2s ease-in-out infinite, md-hw-candle 4s steps(1) infinite;
    transition: bottom .3s ease;
}
.md-has-sticky .md-hw-peek { bottom: calc(5.8rem + env(safe-area-inset-bottom)); }

/* ===================================================== */
/* === SECCIONES ======================================= */
/* ===================================================== */
.md-section { position: relative; padding: 3.5rem 0; }
@media (min-width: 768px) { .md-section { padding: 5rem 0; } }
.md-section__header { max-width: 720px; margin: 0 auto 2.25rem; text-align: center; }
.md-section__eyebrow {
    display: inline-block;
    margin-bottom: .6rem;
    color: var(--md-hw-orange);
    font-family: var(--md-font-heading);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 138, 31, .5);
}
.md-section__title {
    margin: 0;
    font-family: var(--md-font-display);
    font-weight: 400;
    font-size: clamp(2.1rem, 7vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: .03em;
    color: #d9ffe3;
    text-shadow: 0 0 6px rgba(75, 255, 122, .8), 0 0 22px rgba(75, 255, 122, .4);
}
.md-section__title--xl { font-size: clamp(2.6rem, 9vw, 4.6rem); }
.md-section--alt { background: linear-gradient(180deg, transparent, rgba(22, 11, 43, .6), transparent); }

/* ===================================================== */
/* === TARJETA DE PRODUCTO ============================= */
/* ===================================================== */
.md-producto-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--md-radius);
    background: linear-gradient(180deg, rgba(31, 15, 59, .92), rgba(22, 11, 43, .75));
    border: 1px solid rgba(176, 38, 255, .22);
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.md-producto-card::after {
    /* Telaraña sutil en la esquina que aparece al pasar el mouse */
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: url("assets/images/telarana-1.webp") top right / contain no-repeat;
    transform: scaleX(-1);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.md-producto-card:hover { transform: translateY(-6px); border-color: var(--md-hw-green); box-shadow: 0 14px 44px rgba(75, 255, 122, .18), 0 0 0 1px rgba(75, 255, 122, .3); }
.md-producto-card:hover::after { opacity: .55; }
.md-producto-card__link { display: block; flex: 1 1 auto; color: inherit; text-decoration: none; }
.md-producto-card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--md-surface-2); }
.md-producto-card__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .55s ease; }
.md-producto-card:hover .md-producto-card__media img { transform: scale(1.06); }
.md-producto-card__placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 3rem; color: var(--md-hw-purple); }
.md-producto-card__badge {
    position: absolute;
    top: .7rem;
    left: .7rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    background: rgba(11, 6, 24, .85);
    border: 1px solid rgba(176, 38, 255, .5);
    color: var(--md-hw-purple);
    font-family: var(--md-font-heading);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.md-producto-card__body { padding: .9rem .9rem .6rem; }
.md-producto-card__title { margin: 0 0 .35rem; font-size: .95rem; color: var(--md-fg); }
.md-producto-card__price { margin: 0; color: var(--md-hw-green); font-family: var(--md-font-heading); font-weight: 800; font-size: 1.05rem; text-shadow: 0 0 12px rgba(75, 255, 122, .35); }
.md-producto-card__actions { padding: 0 .9rem .9rem !important; }
@media (min-width: 700px) {
    .md-producto-card__body { padding: 1.2rem 1.25rem .8rem; }
    .md-producto-card__title { font-size: 1.08rem; }
    .md-producto-card__price { font-size: 1.25rem; }
    .md-producto-card__actions { padding: 0 1.25rem 1.25rem !important; }
}

/* ===================================================== */
/* === CATÁLOGO ======================================== */
/* ===================================================== */
.md-hw-archive { position: relative; padding: 3rem 0 4rem; overflow: hidden; }
.md-hw-archive__intro { margin: .9rem auto 0; max-width: 520px; color: var(--md-muted); }
.md-catalogo__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 1.4rem; }
.md-hw-cats { display: flex; gap: .5rem; margin: 0 0 1.75rem; padding-bottom: .25rem; overflow-x: auto; scrollbar-width: none; }
@media (min-width: 768px) { .md-hw-cats { justify-content: center; flex-wrap: wrap; } }
.md-hw-cats a {
    flex: 0 0 auto;
    padding: .5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(176, 38, 255, .35);
    color: var(--md-fg);
    font-size: .85rem;
    font-weight: 600;
}
.md-hw-cats a:hover, .md-hw-cats a.is-active { border-color: var(--md-hw-green); color: var(--md-hw-green); box-shadow: 0 0 14px rgba(75, 255, 122, .3); }
.md-hw-empty { text-align: center; color: var(--md-muted); }
.md-hw-pagination { margin-top: 2.5rem; text-align: center; }
.nav-links { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 .75rem;
    border-radius: 12px;
    background: var(--md-surface);
    border: 1px solid rgba(176, 38, 255, .25);
    color: var(--md-fg);
}
.page-numbers:hover, .page-numbers.current { background: var(--md-hw-purple); border-color: transparent; color: #fff; }

/* ===================================================== */
/* === FICHA: retoques de temporada sobre el core ====== */
/* ===================================================== */
.md-season-halloween .md-l-hero__title { font-size: clamp(1.8rem, 6vw, 2.9rem); }
.md-season-halloween .md-l-chip { color: var(--md-hw-orange); border-color: rgba(255, 138, 31, .5); }
.md-season-halloween .md-gallery__track { border-color: rgba(75, 255, 122, .25); box-shadow: 0 0 60px rgba(176, 38, 255, .22); }
.md-season-halloween .md-l-oferta { overflow: hidden; }
.md-season-halloween .md-l-oferta::before {
    content: '';
    position: absolute;
    top: 1rem;
    right: 2%;
    width: 120px;
    height: 120px;
    background: url("assets/images/calabaza-1.webp") center / contain no-repeat;
    filter: drop-shadow(0 0 12px rgba(255, 138, 31, .7));
    opacity: .9;
    animation: md-hw-bob 3s ease-in-out infinite;
    pointer-events: none;
}
@media (max-width: 767px) { .md-season-halloween .md-l-oferta::before { width: 70px; height: 70px; top: .25rem; } }
.md-season-halloween .md-pack__badge { background: linear-gradient(135deg, #FF8A1F, #ff5c1f); box-shadow: 0 0 12px rgba(255, 138, 31, .6); }

/* ===================================================== */
/* === CÓMO FUNCIONA y CTA ============================= */
/* ===================================================== */
.md-how__steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0; padding: 0; list-style: none; }
.md-how__step {
    padding: 1.9rem 1.5rem;
    text-align: center;
    border-radius: var(--md-radius);
    background: linear-gradient(180deg, rgba(31, 15, 59, .85), rgba(22, 11, 43, .5));
    border: 1px solid rgba(176, 38, 255, .22);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.md-how__step:hover { transform: translateY(-4px); border-color: var(--md-hw-orange); box-shadow: 0 8px 32px rgba(255, 138, 31, .18); }
.md-how__num { display: inline-block; margin-bottom: .75rem; font-family: var(--md-font-display); font-size: 3rem; line-height: 1; color: var(--md-hw-orange); text-shadow: 0 0 14px rgba(255, 138, 31, .6); }
.md-how__step h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.md-how__step p { margin: 0; color: var(--md-muted); }

.md-cta { position: relative; overflow: hidden; padding: 5rem var(--md-gutter); text-align: center; }
.md-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(176, 38, 255, .25), transparent 65%); pointer-events: none; }
.md-cta__inner { position: relative; z-index: 1; }
.md-cta__inner h2 { margin: 0 0 .6rem; font-family: var(--md-font-display); font-weight: 400; font-size: clamp(2.2rem, 7vw, 3.4rem); color: #d9ffe3; text-shadow: var(--md-glow-green); }
.md-cta__inner p { margin: 0 0 1.75rem; color: var(--md-muted); }
.md-hw-cta__witch {
    position: absolute;
    top: 1.5rem;
    left: -160px;
    width: 140px;
    opacity: .85;
    filter: drop-shadow(0 0 10px rgba(176, 38, 255, .8));
    animation: md-hw-cross 16s linear infinite;
    pointer-events: none;
}

/* ===================================================== */
/* === FOOTER ========================================== */
/* ===================================================== */
.md-footer {
    position: relative;
    z-index: 1;
    padding: 3rem var(--md-gutter) calc(2rem + env(safe-area-inset-bottom));
    background: rgba(11, 6, 24, .75);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(176, 38, 255, .2);
}
.md-footer__pumpkin { position: absolute; top: -34px; left: 8%; width: 60px; filter: drop-shadow(0 0 10px rgba(255, 138, 31, .7)); animation: md-hw-bob 3.4s ease-in-out infinite; }
.md-footer__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; text-align: center; }
.md-footer__logo { width: 110px; height: auto; mix-blend-mode: screen; -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); }
.md-footer__menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.md-footer__menu a { color: var(--md-muted); font-family: var(--md-font-heading); font-size: .9rem; }
.md-footer__menu a:hover { color: var(--md-hw-green); }
.md-footer__copy { margin: 0; color: var(--md-muted); font-size: .85rem; }

/* ===================================================== */
/* === WHATSAPP FLOTANTE =============================== */
/* ===================================================== */
.md-floating-whatsapp {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 4px 20px rgba(37, 211, 102, .5);
    animation: md-hw-ring 2.5s ease-out infinite;
}
.md-floating-whatsapp:hover { transform: scale(1.08); }
.md-floating-whatsapp svg { width: 30px; height: 30px; fill: #fff; }

/* ===================================================== */
/* === HELLO ELEMENTOR / ELEMENTOR ===================== */
/* ===================================================== */
.site-header, .site-footer, .site-description { display: none !important; }
/* Páginas de Elementor que no son la portada (p. ej. legales): mismo ancho que las estándar. */
body[class*="elementor-page-"]:not(.home) .site-main { width: 100%; margin-inline: auto; padding-inline: var(--md-gutter); }
@media (min-width: 1200px) { body[class*="elementor-page-"]:not(.home) .site-main { max-width: 1140px; } }
.md-hw-portada-elementor .elementor-widget-md-hw-hero { width: 100%; }

/* ===================================================== */
/* === KEYFRAMES ======================================= */
/* ===================================================== */
@keyframes md-hw-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
    20%, 24%, 55% { opacity: .55; }
}
@keyframes md-hw-zoom { from { scale: 1; } to { scale: 1.06; } }
@keyframes md-hw-moon {
    0%, 100% { opacity: .65; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.08); }
}
@keyframes md-hw-fog { from { transform: translateX(0); } to { transform: translateX(33%); } }
@keyframes md-hw-ember {
    0%   { transform: translate(0, 0); opacity: 0; }
    10%  { opacity: .9; }
    50%  { transform: translate(18px, -45vh); }
    90%  { opacity: .6; }
    100% { transform: translate(-12px, -90vh); opacity: 0; }
}
@keyframes md-hw-sway   { 0%, 100% { rotate: 0deg; } 50% { rotate: 2.5deg; } }
@keyframes md-hw-sway-r { 0%, 100% { rotate: 0deg; } 50% { rotate: -2.5deg; } }
@keyframes md-hw-float  { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes md-hw-bob    { 0%, 100% { translate: 0 0; rotate: -4deg; } 50% { translate: 0 -6px; rotate: 4deg; } }
@keyframes md-hw-candle {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 138, 31, .8)); }
    30%      { filter: drop-shadow(0 0 14px rgba(255, 160, 40, 1)); }
    60%      { filter: drop-shadow(0 0 5px rgba(255, 120, 20, .6)); }
}
@keyframes md-hw-sparkle { 0%, 100% { opacity: 0; scale: .3; } 50% { opacity: 1; scale: 1; } }
@keyframes md-hw-witch {
    0%   { translate: 0 0; rotate: -3deg; }
    25%  { translate: -10px -16px; rotate: 0deg; }
    50%  { translate: 0 -6px; rotate: 3deg; }
    75%  { translate: 10px -18px; rotate: 0deg; }
    100% { translate: 0 0; rotate: -3deg; }
}
@keyframes md-hw-scroll { 0%, 100% { translate: -50% 0; opacity: .35; } 50% { translate: -50% 10px; opacity: 1; } }
@keyframes md-hw-flap { from { transform: scaleY(1); } to { transform: scaleY(.55); } }
@keyframes md-hw-fly-a {
    0%   { transform: translate(0, 0) scale(.8); opacity: 0; }
    4%   { opacity: .9; }
    30%  { transform: translate(40vw, 6vh) scale(1); }
    60%  { transform: translate(75vw, -3vh) scale(.9); }
    96%  { opacity: .9; }
    100% { transform: translate(130vw, 8vh) scale(.7); opacity: 0; }
}
@keyframes md-hw-fly-b {
    0%   { transform: translate(130vw, 0) scaleX(-1); opacity: 0; }
    4%   { opacity: .85; }
    35%  { transform: translate(80vw, -5vh) scaleX(-1); }
    70%  { transform: translate(35vw, 7vh) scaleX(-1); }
    96%  { opacity: .85; }
    100% { transform: translate(-10vw, 0) scaleX(-1); opacity: 0; }
}
@keyframes md-hw-spider {
    0%, 100% { transform: scaleY(.35); }
    45%, 60% { transform: scaleY(1); }
}
@keyframes md-hw-cross {
    0%   { translate: 0 0; }
    50%  { translate: calc(50vw + 80px) -20px; }
    100% { translate: calc(100vw + 320px) 10px; }
}
@keyframes md-hw-ring {
    0%   { box-shadow: 0 4px 20px rgba(37, 211, 102, .5), 0 0 0 0 rgba(37, 211, 102, .5); }
    70%  { box-shadow: 0 4px 20px rgba(37, 211, 102, .5), 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 4px 20px rgba(37, 211, 102, .5), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Sin animaciones: quien lo pide en su sistema o si se apagan en el Personalizador. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .md-hw-sky, .md-hw-embers, .md-hw-cta__witch { display: none; }
}
.md-hw-sin-decoraciones .md-hw-embers,
.md-hw-sin-decoraciones .md-hw-cta__witch { display: none; }
