

/* ===== Archivo: product-gallery.css ===== */

/* ===== Galería de producto Festivat (sin slider, con CSS Grid) ===== */

/* Miniatura activa (marcada por el JS) */
.woocommerce div.product div.images
.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image.festivat-thumb--active:not(:first-child) img {
    outline: 1px solid #c49a6b;  
    outline-offset: 2px;
}

/* ===================== ESCRITORIO (≥ 768px) ===================== */
@media (min-width: 768px) {

    /* Ocultamos la navegación móvil en escritorio */
    .festivat-mobile-gallery-nav {
        display: none;
    }

    /* Contenedor de la galería: 4 columnas siempre en escritorio */
    .woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr); /* 4 columnas iguales */
        grid-auto-rows: auto;
        gap: 8px; /* espacio entre imagen grande y miniaturas, y entre minis */
    }

    /* Imagen principal: ocupa las 4 columnas completas */
    .woocommerce div.product div.images
    .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child {
        grid-column: 1 / 5; /* de la columna 1 a la 4 incluida */
    }

    /* Miniaturas: cada una ocupa 1 columna (4 por fila siempre) */
    .woocommerce div.product div.images
    .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) {
        width: 100%;
        box-sizing: border-box;
    }

    /* Imagen dentro de la miniatura */
    .woocommerce div.product div.images
    .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) img {
        width: 100%;
        height: auto;
        cursor: pointer;
        border-radius: 0px;
        display: block;
    }
}

/* ===================== MÓVIL (≤ 767px) ===================== */
@media (max-width: 767px) {

    /* OCULTAR MINIATURAS en móvil:
       usamos la clase real de WooCommerce, no festivat-product-thumb */
    .woocommerce div.product div.images
    .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) {
        display: none !important;
    }

    /* Mostrar navegación móvil (flechas + contador) */
    .festivat-mobile-gallery-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        margin-top: 0.75rem;
    }

    /* Estilo de las flechas boton  */
    .festivat-mobile-gallery-nav__btn {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        font-size: 1.8rem;
        line-height: 1;
        cursor: pointer;
        color: #000; /* flecha negra */
    }

    /* Estilo de las flechas apretadas */
    .festivat-mobile-gallery-nav__btn:hover,
    .festivat-mobile-gallery-nav__btn:focus,
    .festivat-mobile-gallery-nav__btn:active {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: #000;
    }



    .festivat-mobile-gallery-nav__counter {
        font-size: 0.9rem;
    }
}


/* ===== Archivo: product-breadcrumbs-mobile.css ===== */

/* Migas de pan: una sola línea con "..." en móvil */
@media (max-width: 768px) {

    .single-product .woocommerce-breadcrumb {
        display: block;          /* asegura que el ellipsis funcione bien */
        width: 100%;
        white-space: nowrap;     /* no romper en varias líneas */
        overflow: hidden;        /* ocultar lo que sobresale */
        text-overflow: ellipsis; /* mostrar "..." al final */
        margin-bottom: 10px;     /* separación con la foto */
        font-size: 14px;         /* opcional: un pelín más pequeño en móvil */
    }
}


/* ===== Archivo: product-lightbox.css ===== */

/* Lightbox sencillo para galería de producto */

.festivat-lightbox {
    position: fixed;
    inset: 0;
    display: none;                /* se muestra con la clase --visible */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
}

.festivat-lightbox--visible {
    display: flex;
}

.festivat-lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.festivat-lightbox__close,
.festivat-lightbox__prev,
.festivat-lightbox__next {
    position: absolute;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.festivat-lightbox__close {
    top: 20px;
    right: 20px;
}

.festivat-lightbox__prev,
.festivat-lightbox__next {
    top: 50%;
    transform: translateY(-50%);
}

.festivat-lightbox__prev {
    left: 20px;
}

.festivat-lightbox__next {
    right: 20px;
}

@media (max-width: 768px) {
    .festivat-lightbox__close,
    .festivat-lightbox__prev,
    .festivat-lightbox__next {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}
