/* Custom styles for language switcher */

/* Make ALL language buttons white text by default (both active and inactive) */
.share-menu .share-menu-list .btn-circle {
    background-color: transparent !important;
    border-color: transparent !important;
    color: #fff !important;
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Hover effect: texto azul con resaltado */
.share-menu .share-menu-list .btn-circle:hover {
    opacity: 1;
    color: #c1a779 !important;
    text-shadow: 0 0 10px #c1a779;
    transform: translateY(-2px);
}

/* Make sure the text inside inherits the color */
.share-menu .share-menu-list .btn-circle .small-font {
    color: inherit;
}

/* Remove circle styles from ms-logo when it contains an image */
.ms-logo img {
    display: block;
}

.ms-logo:has(img) {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 80px !important;
    height: auto !important;
    line-height: normal !important;
    font-size: inherit !important;
}

/* Remove margin-top from footer and fix spacing */
.ms-footbar {
    margin-top: 0 !important;
}

/* Remove the white space before footer */
.ms-footbar:before {
    display: none !important;
}

/* ============================================ */
/* HERO FULLSCREEN WITH ZOOM OUT EFFECT */
/* ============================================ */

.hero-fullscreen-zoom {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Carrusel del hero a pantalla completa */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-carousel,
.hero-carousel .owl-stage-outer,
.hero-carousel .owl-stage {
    height: 100%;
}

/* Crossfade robusto: en vez de usar el fundido nativo de Owl (que maqueta los
   slides en fila y deja asomar el siguiente por un lado), apilamos TODOS los
   slides uno encima de otro en absoluto y hacemos el cambio con opacity.
   Neutralizamos el desplazamiento horizontal del stage de Owl. */
.hero-carousel .owl-stage {
    transform: none !important;
    width: 100% !important;
}

.hero-carousel .owl-item {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100%;
    opacity: 0;
    z-index: 0;
    transition: opacity 2.5s ease-in-out;
}

.hero-carousel .owl-item.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Efecto Ken Burns continuo y sutil.
   La animación es infinita con 'alternate' y se aplica directamente a TODAS
   las slides (no a la clase .active que Owl pone/quita). Así nunca hay un
   reset ni salto brusco: la imagen oscila suavemente entre 100% y 112% en
   bucle, independientemente del momento del crossfade. */
.hero-slide {
    animation: kenBurns 24s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.12);
    }
}

/* Slide tipo poster (room03): a diferencia de las fotos, lleva texto y logo
   que deben verse completos. Con 'cover' + zoom se recortaba arriba/abajo y
   el texto quedaba cortado. Usamos 'contain' para mostrar el poster entero,
   un fondo con el gris-concreto del propio banner para las barras laterales,
   y desactivamos el Ken Burns (el zoom lo volvería a recortar). */
.hero-slide--contain {
    background-size: contain;
    background-color: #3c3c3c;
    animation: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Las fotos del hero son horizontales; en una pantalla vertical, un
       contenedor a 100vh obliga a 'cover' a recortar muchísimo los lados y
       solo se ve una franja central muy acercada. Reduciendo la altura, la
       proporción del contenedor se acerca a la de la imagen y se recorta
       mucho menos. Usamos sv/dvh para evitar el salto de la barra del
       navegador (con fallback a vh). */
    .hero-fullscreen-zoom {
        height: 68vh;
        height: 68svh;
        min-height: 380px;
        max-height: 560px;
    }

    /* Zoom Ken Burns más sutil en mobile para no acentuar el recorte */
    .hero-slide {
        animation-name: kenBurnsMobile;
    }
}

@media (max-width: 576px) {
    .hero-fullscreen-zoom {
        height: 58vh;
        height: 58svh;
        min-height: 340px;
        max-height: 480px;
    }
}

@keyframes kenBurnsMobile {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

/* ============================================ */
/* BRANDS CAROUSEL STYLES */
/* ============================================ */

/* Brands Carousel Styles */
.brands-carousel .item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

/* Estilos para los links - sin apariencia de link tradicional */
.brands-carousel .item a {
    display: block;
    text-decoration: none;
    outline: none;
    border: none;
    cursor: pointer;
}

.brands-carousel .item a:hover,
.brands-carousel .item a:focus {
    text-decoration: none;
    outline: none;
}

.brands-carousel .item img {
    width: 160px;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.brands-carousel .item a:hover img,
.brands-carousel .item a:focus img {
    transform: scale(1.1);
}

.bg-light-gray {
    background-color: #f8f9fa;
}

/* ============================================ */
/* ABOUT SECTION - WATERMARK BACKGROUND */
/* ============================================ */

/* Background image como watermark en la sección About */
.about-card-watermark {
    position: relative;
    background-image: url("../img/bg/bodega.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: local;
    overflow: hidden;
}

/* Overlay con gradiente para efecto fade/watermark */
.about-card-watermark::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 40%,
        rgba(255, 255, 255, 0.7) 70%,
        rgba(255, 255, 255, 0.5) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* Asegurar que el contenido esté sobre el watermark */
.about-card-watermark .card-body {
    position: relative;
    z-index: 1;
}

/* Responsive: ajustar background en mobile */
@media (max-width: 768px) {
    .about-card-watermark {
        background-size: cover;
        background-position: center center;
    }

    .about-card-watermark::before {
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.85) 50%,
            rgba(255, 255, 255, 0.7) 80%,
            rgba(255, 255, 255, 0.5) 100%
        );
    }
}

/* Products carousel (versión anterior - conservada)
.products-carousel .item {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
}

.products-carousel .item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .products-carousel .item img {
        max-height: 420px;
    }
}
*/

/* Products collage: grid 4 cols × 2 rows con la imagen vertical en la columna central */
.products-collage {
    display: grid;
    grid-template-columns: 1fr 1fr 1.1fr 1fr;
    grid-auto-rows: 220px;
    grid-auto-flow: dense;
    gap: 10px;
}

.products-collage__item {
    position: relative;
    padding: 0;
    margin: 0;
    border: 0;
    background-color: #fff;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

.products-collage__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.products-collage__item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.products-collage__item:hover img,
.products-collage__item:focus-visible img {
    transform: scale(1.06);
}

.products-collage__item:hover::after,
.products-collage__item:focus-visible::after {
    background: rgba(0, 0, 0, 0.18);
}

.products-collage__item:focus-visible {
    outline: 2px solid #03a9f4;
    outline-offset: 2px;
}

/* Imagen vertical (stanley01): columna 3, ocupa las 2 filas */
.products-collage__item--tall {
    grid-row: 1 / span 2;
    grid-column: 3;
}

/* Modal de imagen ampliada */
#productsModal .modal-content {
    background: transparent;
}

#productsModal .btn-close {
    background-color: #c1a779;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 10px;
    opacity: 1;
    filter: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#productsModal .btn-close:hover,
#productsModal .btn-close:focus {
    background-color: #a88c5d;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

#productsModalImage {
    max-height: 85vh;
    object-fit: contain;
}

/* Tablet: 3 columnas, vertical en col 2 */
@media (max-width: 992px) {
    .products-collage {
        grid-template-columns: 1fr 1.1fr 1fr;
        grid-auto-rows: 180px;
    }
    .products-collage__item--tall {
        grid-row: 1 / span 2;
        grid-column: 2;
    }
}

/* Mobile: 2 columnas, vertical en col 1 */
@media (max-width: 576px) {
    .products-collage {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 140px;
        gap: 6px;
    }
    .products-collage__item--tall {
        grid-row: 1 / span 2;
        grid-column: 1;
    }
}

/* About: texto estilo periódico rodeando la imagen */
.about-intro-wrap::after {
    content: "";
    display: table;
    clear: both;
}

.about-intro-wrap p {
    text-align: justify;
}

.about-intro-img {
    display: block;
    width: 100%;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .about-intro-img {
        float: right;
        width: 45%;
        margin: 0.35rem 0 1rem 2rem;
    }
}
