/* Importar las variables de color */
@import url('colores.css');

html {
    scroll-behavior:smooth;
	margin-top: 75px; /* Ajusta este valor según la altura de tu header */
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--color-fondo);
    color: var(--color-texto);
}



header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8); /* Transparencia del 70% */
    color: var(--color-texto);
    padding: 10px 20px;
    position: fixed; /* Fija el header */
    top: 0; /* Asegura que esté en la parte superior */
    width: 100%; /* Asegura que ocupe el ancho completo de la ventana */
    z-index: 1000; /* Coloca el header por encima de otros elementos */
}


/* Logo */
.logo img {
    height: 50px;
    width: auto;
}

/* Menú principal */
.menu-principal {
    list-style: none;
    display: flex;
}

.menu-principal > li {
    position: relative;
}

.menu-principal a {
    color: var(--color-menu-texto);
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    background-color: var(--color-menu-fondo); /* Fondo del menú principal */
    transition: background-color 0.2s ease-in-out; /* Suavizar el cambio de color */
}

.menu-principal a:hover {
    background-color: var(--color-hover-menu); /* Cambiar fondo al hacer hover en el menú principal */
    color: var(--color-hover-text); /* Cambiar color del texto al hacer hover */
}

/* Submenú con animación */
.submenu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background-color: var(--color-submenu-fondo);
    top: 100%;
    left: 0;
    min-width: 200px;
    list-style: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.menu-principal li:hover .submenu {
    opacity: 1;
    visibility: visible;
}

/* Submenú oculto por defecto */
.submenu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background-color: var(--color-submenu-fondo);
    top: 100%;
    left: 0;
    min-width: 200px;
    list-style: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Mostrar el submenú cuando el usuario pase el mouse sobre el <li> del menú principal */
.menu-principal li:hover .submenu {
    opacity: 1;
    visibility: visible;
    z-index: 10; /* Mantener por encima del banner */
}

.submenu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background-color: var(--color-submenu-fondo);
    top: 100%;
    left: 0;
    min-width: 200px;
    list-style: none;
    z-index: 10; /* Aseguramos que el submenú esté por encima del banner */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.submenu a:hover {
    background-color: var(--color-hover-submenu); /* Cambiar fondo al hacer hover en el submenú */
    color: var(--color-hover-text); /* Cambiar color del texto en el submenú */
}

/* Línea divisoria entre los submenús */
.submenu li {
    border-bottom: 1px solid var(--color-borde); /* Línea divisoria entre submenús */
}

.submenu li:last-child {
    border-bottom: none; /* Evita la línea en el último elemento del submenú */
}

/* Menú secundario */
.menu-secundario {
    list-style: none;
    display: flex;
}

.menu-secundario a {
    color: var(--color-menu-texto);
    text-decoration: none;
    padding: 10px;
    background-color: var(--color-menu-fondo); /* Fondo del menú secundario */
    transition: background-color 0.3s ease-in-out; /* Suavizar el cambio de color */
}

.menu-secundario a:hover {
    background-color: var(--color-hover-menu); /* Cambiar fondo al hacer hover en el menú secundario */
    color: var(--color-hover-text); /* Cambiar color del texto al hacer hover */
}

/* Menú hamburguesa para móviles */
.menu-toggle {
    display: none;
    font-size: 30px;
    background: none;
    border: none;
    color: var(--color-texto);
}

@media (max-width: 768px) {
    .menu-principal,
    .menu-secundario {
        display: none;
        flex-direction: column;
        background-color: var(--color-menu-fondo);
        width: 100%;
    }

    .menu-principal.active,
    .menu-secundario.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* Estilos del componente Banner */
.banner-principal {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative; /* Asegura que z-index funcione */
    z-index: 1; /* Valor inferior al submenú */
    display: flex;
    align-items: center;
    justify-content: center;
	
}


.banner-content {
    color: white;
    text-align: center;
    padding: 10px;
    position: absolute; /* Permite mover el contenido dentro del banner */
    top: 20px; /* Ajusta la posición vertical */
    left: calc(50% - 90px); /* Mueve el elemento al centro del contenedor */
}

.banner-content h1 {
    font-size: 2.5em;
    margin: 0;
}

.banner-content p {
    font-size: 1.2em;
}

/*Componente Carrusel */
.carrusel-lineas-productos {
    overflow-x: auto; /* Habilita el desplazamiento horizontal */
    white-space: nowrap; /* Evita que los elementos se apilen verticalmente */
    padding: 20px;
}

.carrusel-container {
    display: inline-block; /* Asegura que los productos se mantengan en una línea */
}
.carrusel-item {
    display: inline-block; /* Evita que los productos se reduzcan y mantiene su tamaño */
    vertical-align: top;
    width: 300px; /* Ajusta este tamaño para tus productos */
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    margin: 0 10px; /* Añade espacio entre los elementos */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    white-space: normal; /* Permite que el texto se ajuste correctamente */
}

.carrusel-item img {
    width: 100%;
    border-bottom: 1px solid #ddd;
}

.carrusel-info {
    padding: 5px;
}

.carrusel-info h3 {
    font-size: 1.2em;
    margin-bottom: 1px;
    color: #333;
}

.carrusel-info p {
    color: #666;
    font-size: 1em;
    margin-bottom: 5px;
}

.btn-ofertas {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-ofertas:hover {
    background-color: #0056b3;
}

.carrusel-item:hover {
    transform: scale(1.05);
}
.carrusel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.carrusel-lineas-productos {
    overflow-x: scroll; /* Habilitar el desplazamiento horizontal */
    white-space: nowrap;
    padding: 20px;
    -ms-overflow-style: none; /* Para Internet Explorer y Edge */
    scrollbar-width: none; /* Para Firefox */
}

.carrusel-lineas-productos::-webkit-scrollbar {
    display: none; /* Para Chrome, Safari y Opera */
}

.carrusel-prev, .carrusel-next {
    background-color: #007bff;
    color: white;
    border: none;
    width: 50px; /* Ancho igual al alto para que sean círculos perfectos */
    height: 50px;
    cursor: pointer;
    border-radius: 50%; /* Hace que los botones sean circulares */
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.carrusel-prev {
    left: 10px;
}

.carrusel-next {
    right: 10px;
}

.carrusel-prev:disabled, .carrusel-next:disabled {
    background-color: #cccccc; /* Color gris para desactivados */
    cursor: not-allowed;
    opacity: 0.5; /* Reduce la opacidad para indicar que están desactivados */
}

/* Estilo general para el contenedor de la categoría de productos */
.categoria-productos {
    padding: 0px;
    margin: 0px 0;
}

/* Estilo para las líneas delimitadoras */
.linea {
    height: 5px;
    background-color: #00a0e3;
    margin: 10px 0;
}

/* Contenedor de banner y título, utilizando flexbox */
.banner-titulo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px; /* Espacio entre el banner y el título */
    margin-bottom: 20px;
}

/* Estilo para el banner secundario */
.banner-secundario {
    flex-shrink: 0;
    width: 300px;
    margin-right: 10px;
}
.banner-secundario img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}


/* Estilo para el contenedor del banner y los productos */
.banner-productos {
    display: flex;
    align-items: flex-start; /* Alinear el título y los productos con respecto al banner */
    gap: 20px; /* Espacio entre el banner y el contenido */
}

/* Contenedor de banner y productos */
.banner-productos-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

/* Título de la categoría */
.titulo-categoria {
    font-size: 2em;
    margin-bottom: 20px;
}

/* Estilo para la sección de productos */
.productos-section {
    width: calc(100% - 330px); /* Ajusta el ancho de la sección de productos restando el ancho del banner más márgenes */
}

/* Contenedor para los productos en grilla */
.productos-container {
    width: 100%;
}

/* Contenedor para los productos en grilla */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.productos-scroll {
    display: flex;
    flex-wrap: nowrap;
}

.producto-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.producto-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.producto-item h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.producto-item p {
    color: #666;
    margin-bottom: 10px;
}

.producto-item span {
    font-size: 1.5em;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.producto-item small {
    color: #999;
    font-size: 0.9em;
}

.producto-item a {
    text-decoration: none; /* Eliminar la línea azul del enlace */
    font-weight: bold; /* Hacer la fuente en negrita */
	font-size: 1.2em;/* Tamaño de la fuente */
    color: #000080; /* Cambiar el color a azul marino */
}

.producto-item a:hover {
    color: #000066; /* Opcional: Cambiar a un tono más oscuro al pasar el cursor */
}

/* Responsive: En móviles el banner desaparece y la cuadrícula se ajusta */
@media screen and (max-width: 768px) {
    .banner-secundario {
        display: none;
    }

    .productos-section {
        width: 100%;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/*Carrusel de Tableros */
.carrusel-Tableros-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
}

.carrusel-Tableros {
    display: flex;
	overflow-x: auto;
    scroll-behavior: smooth;
	width: 100%;
}

.carrusel-Tableros::-webkit-scrollbar {
    display: none; /* Para Chrome, Safari y Opera */
}

.carrusel-Tableros-item {
    min-width: 300px; /* Ajusta el tamaño de cada imagen */
    height: 400px; /* Ajusta la altura de cada imagen */
    position: relative;
    flex-shrink: 0;
    margin: 0 10px;
}

.carrusel-Tableros-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.carrusel-Tableros-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.0em;
    text-align: center;
}

/* Estilo para los botones de navegación */
.carrusel-Tableros-prev, .carrusel-Tableros-next {
    background-color: #007bff;
    color: white;
    border: none;
    width: 50px; /* Ancho igual al alto para que sean círculos perfectos */
    height: 50px;
    cursor: pointer;
    border-radius: 50%; /* Hace que los botones sean circulares */
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.carrusel-Tableros-prev {
    left: 5px;
}

.carrusel-Tableros-next {
    right: 5px;
}

.carrusel-Tableros-prev:hover, .carrusel-Tableros-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
.carrusel-Tableros-prev:disabled, .carrusel-Tableros-next:disabled {
    background-color: #cccccc; /* Color gris para desactivados */
    cursor: not-allowed;
    opacity: 0.5; /* Reduce la opacidad para indicar que están desactivados */
}

/* Responsive: Ajuste del tamaño del carrusel para pantallas más pequeñas */
@media (max-width: 768px) {
    .carrusel-Tableros-item {
        min-width: 250px;
        height: 300px;
    }

    .carrusel-Tableros-caption {
        font-size: 1em;
    }
}

/* GALERIAS */

.galeria-contenedor {
    display: flex;
    align-items: center; /* Centramos verticalmente */
    justify-content: space-between;
    gap: 20px;
    background-color: #f0f0f0;
    padding: 20px;
    width: 100%;
    height: 100%; /* Esto asegura que la altura del contenedor sea total */
}
.galeria-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centramos verticalmente el texto */
    padding: 20px;
    height: 100%;
}

.galeria-info h3 {
    font-size: 48px;
    margin: 0;
}

.galeria-info p {
    font-size: 16px;
}

.galeria-imagen-grande {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.galeria-imagen-grande img {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.icono-lupa {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #007bff;
}

.galeria-thumbnails {
    flex: 0.5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    overflow-y: auto;
    max-height: 70vh;
}

.galeria-thumb img {
    width: 100%;
    cursor: pointer;
    border: 4px solid white;
    transition: border-color 0.3s ease;
}

.galeria-thumb.selected img {
    border-color: #007bff; /* Cambia el color del borde cuando está seleccionado */
}

.galeria-thumb.selected img {
    border-color: #333;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.overlay-imagen {
    max-width: 80%;
    max-height: 80%;
}

.overlay-pie {
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .galeria-contenedor {
        flex-direction: column;
        align-items: center;
    }

    .galeria-thumbnails {
        grid-template-columns: repeat(3, 1fr);
        overflow-x: auto;
		width: 100px;
    }

    .galeria-imagen-grande img {
        max-width: 100%;
    }
}
