/* -------------------------------- Additives -------------------------------- */

/* -------------------------------- Share Box -------------------------------- */

.share-box {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px 0;
    align-items: center;
    flex-wrap: wrap;
}

.share-box span {
    font-size: 12px;
}

.share-box a {
    margin: 6px;
    background: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 0px 6px #0000001a;
    text-decoration: none;
    border-radius: 100%;
    border: 1px solid white;
}

.share-text {
    width: 100%;
    text-align: center;
}

.share-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
}

.theme-banner img {
    width: 100%;
}

/* -------------------------------- Splide Pagination -------------------------------- */

.splide__pagination {
    position: absolute;
    z-index: 6;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}

.splide__pagination {
    left: 50% !important;
}

/* -------------------------------- Pagination Wrap -------------------------------- */

.pagination-wrap {
    text-align: center;
    margin: 2em 0;
}

.pagination .nav-links {
    display: inline-flex;
    gap: 0.5em;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em 1em;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
    background-color: #eee;
    border-color: #999;
}

.pagination .current {
    background-color: #333;
    color: #fff;
    border-color: #333;
    font-weight: bold;
}

.pagination .page-numbers i {
    width: 1em;
    height: 1em;
    margin: 0 0.3em;
    stroke-width: 2;
}

/* -------------------------------- Cookies -------------------------------- */

.cookie-alert {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 222;
    display: none;
}

/* -------------------------------- Slider Box -------------------------------- */

.slider-box {
    position: relative;
}

/* -------------------------------- Error Layout -------------------------------- */

.zombie-layout-error {
    border: 2px dashed #c0392b;
    background: #fff5f5;
    color: #c0392b;
    padding: 1rem;
    margin: 1rem 0;
    font-weight: 600;
    font-family: monospace;
}

/* -------------------------------- Drawer -------------------------------- */

.offcanvas-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    z-index: 9998;
    display: none;
}

.offcanvas-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    perspective: 1200px;
    overflow: hidden;
    display: none;
}

.offcanvas {
    background: #fff;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    filter: brightness(1);
    will-change: transform, opacity, filter;
}

.offcanvas .offcanvas-close {
    border: none;
    font-size: 28px;
    cursor: pointer;
    position: absolute;
    padding: 10px;
    top: 10px;
    right: 10px;
}

.offcanvas .offcanvas-content {
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    text-align: center;
}



/* ================================
   HERO SLIDER
================================ */

.hero-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: min(var(--hero-height, 100vh), 100svh);
}

/* Splide container chain */
.hero-slider-wrapper .splide__track,
.hero-slider-wrapper .splide__list,
.hero-slider-wrapper .post-slider,
.hero-slider-wrapper .splide__slide {
    height: 100% !important;
}

/* Base slide */
.hero-slide {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Dynamic overlay */
.hero-slide.has-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--hero-overlay-color, #000);
    opacity: var(--hero-overlay-opacity, 0.4);
    z-index: 1;
    pointer-events: none;
}

/* Content layer */
.slide-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

/* Background image */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    transform-origin: center center;
}

/* Slide content animation with Splide */
.slide-content h2,
.slide-content p,
.slide-content a {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.splide__slide.is-active .slide-content h2,
.splide__slide.is-active .slide-content p,
.splide__slide.is-active .slide-content a {
    opacity: 1;
    transform: translateY(0);
}

.splide__slide.is-active .slide-content h2 { transition-delay: 0.2s; }
.splide__slide.is-active .slide-content p  { transition-delay: 0.4s; }
.splide__slide.is-active .slide-content a  { transition-delay: 0.6s; }

.hero-slide-inner {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-slide-inner > div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .hero-slider-wrapper {
        height: var(--hero-mobile-height, 75svh);
    }
}

/* ================================
   SLIDE ANIMATIONS WITH LAYOUT
================================ */

.animate_me {
    opacity: 0;
    transform: translateY(20px);
}

.animate_me.is-animating {
    animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate_me_box {
    opacity: 0;
    transform: translateY(25px);
}

.animate_me_box.is-animating-box {
    animation: fadeUpBox .7s cubic-bezier(.16, 1, .3, 1) forwards;
}

@keyframes fadeUpBox {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   LOAD MORE
================================ */

.woo-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    cursor: pointer;
}

.woo-icon {
    display: none;
    width: 18px;
    height: 18px;
}

.woo-load-more.loading .woo-icon {
    display: inline-block;
    animation: wooSpin 0.8s linear infinite;
}

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

.woo-load-more.loading .woo-text {
    opacity: 0.6;
}

/* Product fade-in */
.woo-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.woo-item.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

/* ================================
   ISOTOPE
================================ */

.isotope-container {
    width: 100%;
}

.isotope-filters {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.isotope-grid {
    position: relative;
    margin-right: -25px;
}

.isotope-item {
    width: calc(25% - 25px);
    margin-right: 25px;
    margin-bottom: 25px;
    box-sizing: border-box;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.isotope-image-wrapper {
    overflow: hidden;
}

.img-large,
.img-wide {
    width: calc(50% - 25px);
}

.img-tall {
    width: calc(25% - 25px);
}

@media (max-width: 1024px) {
    .isotope-item          { width: calc(33.333% - 25px); }
    .img-large, .img-wide  { width: calc(66.666% - 25px); }
    .img-tall              { width: calc(33.333% - 25px); }
}

@media (max-width: 768px) {
    .isotope-item          { width: calc(50% - 25px); }
    .img-large, .img-wide  { width: calc(100% - 25px); }
    .img-tall              { width: calc(50% - 25px); }
}

@media (max-width: 480px) {
    .isotope-item,
    .img-large,
    .img-wide,
    .img-tall              { width: calc(100% - 25px); }
}

/* ================================
   ANIMATIONS — Cinematic
================================ */

.has-slide-animation.animation-cinematic .hero-bg,
.has-slide-animation.animation-cinematic .hero-anim-bg {
    will-change: transform;
    backface-visibility: hidden;
    transform-origin: center center;
}

.has-slide-animation.animation-cinematic
.hero-slide.is-active .hero-bg,
.has-slide-animation.animation-cinematic
.hero-slide.is-active .hero-anim-bg,
.has-slide-animation.animation-cinematic
.hero-slide.splide__slide--entering .hero-anim-bg {
    animation: cinematicIn var(--slide-animation-duration, 6s)
               cubic-bezier(.16, .84, .44, 1) forwards;
}

.has-slide-animation.animation-cinematic
.hero-slide:not(.is-active) .hero-anim-bg {
    animation: none;
    transform: scale(1.15) translateY(3vh);
}

.has-slide-animation.animation-cinematic
.hero-slide.splide__slide--leaving .hero-anim-bg {
    animation: cinematicOut 1s ease-in forwards;
}

@keyframes cinematicIn {
    from { transform: scale(1.15) translateY(3vh); }
    to   { transform: scale(1) translateY(0); }
}

@keyframes cinematicOut {
    from { transform: scale(1) translateY(0); }
    to   { transform: scale(1.05) translateY(-2vh); }
}

/* ================================
   ANIMATIONS — Minimal
================================ */

.has-slide-animation.animation-minimal .hero-bg {
    transform: scale(1.08);
}

.has-slide-animation.animation-minimal
.hero-slide.is-active .hero-bg {
    animation: minimalZoom 6s ease-out forwards;
}

@keyframes minimalZoom {
    from { transform: scale(1.08); }
    to   { transform: scale(1); }
}

/* ================================
   FADE MODE
================================ */

.hero-slider-wrapper[data-mode="fade"]
.has-slide-animation.animation-cinematic
.hero-slide.is-active .hero-bg {
    animation: cinematicIn var(--slide-animation-duration, 6s)
               cubic-bezier(.16, .84, .44, 1) forwards;
}

.hero-slider-wrapper[data-mode="fade"]
.has-slide-animation.animation-cinematic
.hero-slide:not(.is-active) .hero-bg {
    animation: cinematicOut 1s ease-in forwards;
}

/* ================================
   SEQUENTIAL FADE — Splide type:fade
================================ */

.sequential-fade .splide__track,
.sequential-fade .splide__list,
.sequential-fade .post-slider,
.sequential-fade .splide__slide {
    height: 100%;
}

/* Cinematic animation on active slide */
.sequential-fade.has-slide-animation.animation-cinematic
.splide__slide.is-active .hero-bg {
    animation: cinematicIn var(--slide-animation-duration, 6s)
               cubic-bezier(.16, .84, .44, 1) forwards;
}

.sequential-fade.has-slide-animation.animation-cinematic
.splide__slide:not(.is-active) .hero-bg {
    animation: none;
    transform: scale(1.15) translateY(3vh);
}

/* ================================
   ADD TO CART ANIMATION
================================ */

#zombie-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgb(255, 255, 255);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease;
}

#zombie-cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

#zombie-cart-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.zombie-cart-message {
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    animation: pop .4s ease;
}

@keyframes pop {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

.woocommerce-notices-wrapper {
    display: none;
}

body.zombie-page-transition::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgb(255, 255, 255);
    z-index: 9999;
    opacity: 1;
    pointer-events: none;
    animation: pageFadeOut 1.6s ease forwards;
}

@keyframes pageFadeOut {
    0%   { opacity: 1; }
    50%  { opacity: 1; }
    100% { opacity: 0; }
}

.zombie-cart-animation {
    position: relative;
    width: 42px;
    height: 42px;
    transition: opacity .5s ease;
}

.product-icon,
.cart-icon,
.check-icon {
    position: absolute;
    font-size: 2.5rem;
}

.product-icon {
    left: 0;
    top: -100px;
}

.check-icon {
    opacity: 0;
    transform: scale(0.5);
    top: 60px;
}

.zombie-cart-animation.play .product-icon {
    animation: moveToCart 0.8s ease forwards;
}

.zombie-cart-animation.play .check-icon {
    animation: showCheck 0.4s ease forwards;
    animation-delay: 0.8s;
}

.zombie-cart-animation.fade-out {
    opacity: 0;
    pointer-events: none;
}

@keyframes moveToCart {
    0%   { transform: translateY(0) scale(1);       opacity: 1; }
    70%  { transform: translateY(120px) scale(0.8); opacity: 1; }
    100% { transform: translateY(140px) scale(0.5); opacity: 0; }
}

@keyframes showCheck {
    to { opacity: 1; transform: scale(1); }
}

body {
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.page-ready {
    opacity: 1;
}

/* ================================
   HORIZONTAL SCROLL WITH GSAP
================================ */

.gsap-portfolio {
    overflow: hidden;
}

.horiz-gallery-wrapper {
    height: 100vh;
}

.horiz-gallery-strip {
    display: flex;
}

.project-wrap {
    position: relative;
    min-width: 100vw;
    height: 100%;
    overflow: hidden;
}

.project-wrap * {
    max-width: 100%;
    box-sizing: border-box;
}

.project-wrap img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-switcher-buttons{
    display: flex;
    gap: 1.5rem;
}

.post-switcher-buttons {
    display: inline-flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    gap: 2rem;
}

/* Desktop por defecto: botones visibles, select oculto 
.post-switcher-select { display: none; }*/

@media (max-width: 768px) {
    .post-switcher-buttons { display: none; }
    .post-switcher-select  { display: block; position: relative; }
}


/* ---------------------------------------------------------------------------
   Botón activo desktop (ajusta a tu tema)
   --------------------------------------------------------------------------- */

.post-switcher-btn.active {
    font-weight: 700;
    /* color / borde / fondo ... lo que necesites */
}


/* ---------------------------------------------------------------------------
   Trigger del select móvil
   --------------------------------------------------------------------------- */

.post-switcher-select-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.post-switcher-select-arrow {
    transition: transform .2s ease;
}

.post-switcher-select.open .post-switcher-select-arrow {
    transform: rotate(180deg);
}


/* ---------------------------------------------------------------------------
   Lista desplegable
   --------------------------------------------------------------------------- */

.post-switcher-select-list {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    max-height: 60vh;
    overflow-y: auto;
    display: none; /* cerrado por defecto */
}

.post-switcher-select.open .post-switcher-select-list {
    display: block;
}


/* ---------------------------------------------------------------------------
   Opciones de la lista
   --------------------------------------------------------------------------- */

.post-switcher-option {
    padding: .75rem 1rem;
    cursor: pointer;
}

.post-switcher-option:hover,
.post-switcher-option.active {
    background: #f3f3f3;
}

.post-switcher-select-title {
    display: block;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}
.post-switcher-select-list { list-style: none; margin: 0; padding: 0; }
.post-switcher-select-list .post-switcher-option {
    padding: .5rem .75rem;
    color: #9a9a9a;
    cursor: pointer;
}
.post-switcher-select-list .post-switcher-option.active {
    color: #1a1a1a;
    border: 1px solid #c9a227; /* el recuadro dorado */
    border-radius: 2px;
}
/* lista cerrada por defecto, abre con .is-open */
.post-switcher-select:not(.open) .post-switcher-select-list { display: none; }