/* Definición de variables CSS para modo claro y oscuro */
:root {
    /* Modo Claro */
    --background-color: #f5f5f5;
    --text-color: #1a1a1a;
    --header-bg: #d3d3d3;
    --nav-bg: rgba(180, 180, 180, 0.85);
    --nav-hover-bg: #a9a9a9;
    --nav-hover-text: #000000;
    --section-bg: #ffffff;
    --texto-servicio-bg: #f9f9f9;
    --separador-bg: #196ec4;
    --highlight-color: #1e90ff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --carousel-btn-bg: rgba(0, 0, 0, 0.5);
    --carousel-btn-hover-bg: rgba(0, 0, 0, 0.8);
    --search-bar-bg: #ffffff;
    --icon-color: #000000;
    --card-shadow: rgba(0, 0, 0, 0.2);
    --border-color: #e91e63;
    --hazard-color: #e07b39; /* Definido para el footer */
}

[data-theme="dark"] {
    /* Modo Oscuro */
    --background-color: #1a1a1a;
    --text-color: #e5e5e5;
    --header-bg: #333333;
    --nav-bg: rgba(60, 60, 60, 0.85);
    --nav-hover-bg: #5a5a5a;
    --nav-hover-text: #ffffff;
    --section-bg: #2c2c2c;
    --texto-servicio-bg: #333333;
    --separador-bg: #66cde9;
    --highlight-color: #00b7eb;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --carousel-btn-bg: rgba(255, 255, 255, 0.2);
    --carousel-btn-hover-bg: rgba(255, 255, 255, 0.4);
    --search-bar-bg: #3b3b3b;
    --icon-color: #ffffff;
    --card-shadow: rgba(255, 255, 255, 0.1);
    --border-color: #ff4d8d;
    --hazard-color: #f39c12; /* Definido para el footer en modo oscuro */
}

body {
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
    overflow-x: hidden;
    color: var(--text-color);
}

/* Contenedor general */
.container {
    width: 90%;
    max-width: 1800px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Contenedor Header */
header {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Barra superior fija (top-bar) */
.top-bar {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 8px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 4px var(--card-shadow);
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Agrupar por bloques */
.nombre-local,
.barra-busqueda,
.iconos-contacto {
    display: flex;
    align-items: center;
}

/* Ajustes a cada sección */
.nombre-local {
    flex: 1;
    font-size: 24px;
}

.nombre-local a {
    text-decoration: none;
    color: #000000;
}

[data-theme="dark"] .nombre-local a {
    color: #ffffff;
}

.nombre-local a:visited {
    color: #000000;
}

[data-theme="dark"] .nombre-local a:visited {
    color: #ffffff;
}

.barra-busqueda {
    flex: 2;
    justify-content: center;
    padding: 0 20px;
}

.iconos-contacto {
    flex: 1;
    justify-content: flex-end;
    gap: 15px;
}

/* Íconos */
.icono-ws,
.icono-ubicacion {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.icono-ws a {
    text-decoration: none;
    color: var(--text-color);
}

.icono-ws i,
.icono-ubicacion i {
    font-size: 16px;
    color: var(--icon-color);
}

/* Botón de cambio de tema */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
}

.theme-icon {
    font-size: 20px;
    color: var(--text-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-icon:hover {
    transform: scale(1.2);
    color: var(--border-color);
}

/* Botón de menú (oculto en desktop) */
.menu-toggle {
    display: none;
}

/* Barra de búsqueda */
.search-bar {
    padding: 8px;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    background-color: var(--search-bar-bg);
    color: var(--text-color);
    border: 1px solid var(--card-shadow);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
}

.search-bar:focus {
    outline: none;
    border-color: var(--border-color);
}

/* Barra de navegación */
.nav-container {
    display: block;
}

.nav-bar {
    background-color: var(--nav-bg);
    padding: 6px 0;
    text-align: center;
    position: sticky;
    z-index: 30;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    box-shadow: 0 2px 4px var(--card-shadow);
    transition: background-color 0.3s ease;
}

.nav-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.nav-bar li {
    display: flex;
}

.nav-bar a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
}

.nav-bar a:hover {
    background-color: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

/* Carrusel */
.carousel {
    width: 100%;
    position: relative;
    z-index: 20;
    margin-top: 0;
    padding: 0;
}

.carousel-inner {
    display: flex;
    width: 100%;
    height: 500px; /* Altura fija para las imágenes */
    overflow: hidden;
    position: relative;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    display: none;
}

.carousel-item.active {
    display: block;
}

/* Estilos para los enlaces del carrusel */
.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: var(--text-color);
}

/* Estilos para las imágenes del carrusel */
.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Imagen se muestra completa */
}

/* Contenedor para el texto del carrusel (fuera de la imagen) */
.carousel-caption-container {
    text-align: center;
    padding: 10px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
}

.carousel-caption {
    display: none; /* Ocultamos inicialmente, se mostrará el activo con JS */
}

.carousel-caption.active {
    display: block;
}

.carousel-caption h3 {
    font-size: 1.3em;
    margin: 0 0 5px;
    color: var(--text-color);
}

.carousel-caption p {
    font-size: 0.9em;
    margin: 0;
    color: var(--text-color);
    opacity: 0.9;
}

/* Botones del carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--carousel-btn-bg);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    z-index: 30;
}

.carousel-btn:hover {
    background-color: var(--carousel-btn-hover-bg);
}

#prevBtn {
    left: 10px;
}

#nextBtn {
    right: 10px;
}

/* Indicadores del carrusel (fuera de la imagen, debajo) */
.carousel-indicators {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 10px 0;
    z-index: 30;
}

.carousel-indicators .indicator {
    width: 10px;
    height: 10px;
    background-color: var(--carousel-btn-bg);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicators .indicator.active {
    background-color: var(--carousel-btn-hover-bg);
}

/* Sección de galería */
.gallery-section {
    background-color: var(--section-bg);
    padding: 20px 0;
    text-align: center;
    font-size: 18px;
    position: relative;
    z-index: 10;
    margin-top: 0;
}

.gallery-section h1 {
    text-align: center;
    font-size: 32px;
    margin: 10px 80px 30px 80px;
    color: var(--text-color);
    border-bottom: 2px solid #196ec4;
    padding-bottom: 10px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.gallery-section p {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: var(--text-color);
    opacity: 0.8;
}

.gallery-section h2 {
    font-size: 1.8em;
    margin: 20px 0;
    color: var(--text-color);
}

/* Caja de servicio */
.servicio {
    width: 90%;
    max-width: 1800px;
    margin: 20px auto;
    background-color: var(--section-bg);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0px 0px 5px var(--shadow-color);
    position: relative;
    z-index: 10;
}

/* Separador de secciones */
.separador {
    background-color: var(--separador-bg);
    padding: 12px;
    font-weight: bold;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    font-size: 24px;
    box-shadow: 0 2px 4px var(--shadow-color);
    border-radius: 5px;
}

/* Contenido de servicio */
.contenido {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 0;
}

/* Imagen del servicio */
.imagen-servicio {
    flex: 0 0 800px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.imagen-servicio img {
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin: 0;
}

/* Estilo específico para la sección STICKERS */
#stickers .imagen-servicio {
    flex: 0 0 800px;
}

#stickers .imagenes-superior {
    display: flex;
    gap: 20px;
}

#stickers .imagen-servicio img {
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 250px;
}

/* Texto del servicio */
.texto-servicio {
    flex: 1;
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-color);
    padding: 10px;
    background-color: var(--texto-servicio-bg);
    border-radius: 5px;
    box-shadow: 0 1px 3px var(--shadow-color);
    margin: 0;
}

.texto-servicio p,
.texto-servicio h2 {
    margin: 10px 0;
}

.texto-servicio h2 {
    font-size: 24px;
    color: var(--text-color);
    font-weight: bold;
}

.texto-servicio strong {
    color: var(--highlight-color);
}

.texto-servicio .highlight {
    color: var(--highlight-color);
    font-weight: 500;
}

.texto-servicio .icono-texto {
    color: var(--highlight-color);
    margin-right: 10px;
    font-size: 22px;
}

/* Estilos para la galería de productos y resultados de búsqueda */
.product-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.search-results-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.product-card {
    background-color: var(--section-bg);
    border-radius: 5px;
    box-shadow: 0 2px 4px var(--card-shadow);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px var(--card-shadow);
}

.product-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 5px;
    margin-bottom: 10px;
}

.product-name {
    font-size: 1.3em;
    color: var(--text-color);
    margin: 10px 0;
    font-family: 'Poppins', sans-serif;
}

.product-price {
    font-size: 1em;
    color: var(--highlight-color);
    margin: 5px 0;
}

.product-inventory {
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
    margin: 5px 0;
}

.out-of-stock {
    font-size: 0.9em;
    color: #ff0000;
    font-weight: bold;
    margin-top: 5px;
}
/* estilo para detalles */ 
details {
    margin-bottom: 15px;
    border: 1px solid #5a87d7;
    border-radius: 5px;
    padding: 2px;
    transition: all 0.3s ease; /* Suaviza la transición del hover */
}

details:hover {
    border-color: #3a5ea7; /* Cambia el color del borde al pasar el mouse */
    box-shadow: 0 2px 5px rgba(90, 135, 215, 0.3); /* Añade una sombra ligera */
}

summary {
    cursor: pointer;
    font-weight: bold;
    color: #333;
    padding: 5px;
    background-color: #86d2e948;
    transition: background-color 0.3s ease; /* Suaviza el cambio de fondo */
}

summary:hover {
    background-color: #6bb3d0; /* Cambia el fondo del summary al pasar el mouse */
    color: #fff; /* Opcional: cambia el color del texto para contraste */
}

summary h2 {
    margin: 0;
    font-size: 1.5em;
    display: inline; /* Evita salto de línea */
}

details[open] summary {
    background-color: #f5f5f5;
}

details p {
    margin: 10px 0 0 0;
    padding-left: 10px;
}

/* Estilo para resaltar productos al desplazar */
.highlight-product {
    border: 2px solid #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
}

/* Estilo para los botones y enlaces "Ver Detalles" en las tarjetas de productos */
.tech-specs-link,
.tech-specs-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #1e90ff; /* Azul claro para modo claro */
    color: #000000; /* Texto negro */
    text-decoration: none;
    border-radius: 0; /* Forma cuadrada */
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: none; /* Para .tech-specs-button */
    cursor: pointer; /* Para .tech-specs-button */
}

/* Modo oscuro */
[data-theme="dark"] .tech-specs-link,
[data-theme="dark"] .tech-specs-button {
    background-color: #00b7eb; /* Cian para modo oscuro */
    color: #000000; /* Texto negro */
}

/* Efecto hover */
.tech-specs-link:hover,
.tech-specs-button:hover {
    background-color: #1c86e6; /* Azul más oscuro para modo claro */
    transform: translateY(-2px);
    box-shadow: 0 2px 4px var(--shadow-color);
}

[data-theme="dark"] .tech-specs-link:hover,
[data-theme="dark"] .tech-specs-button:hover {
    background-color: #00a3d3; /* Cian más oscuro para modo oscuro */
}

/* Efecto active */
.tech-specs-link:active,
.tech-specs-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Asegurar que el botón encaje en la tarjeta */
.product-card .tech-specs-link,
.product-card .tech-specs-button {
    width: fit-content;
    align-self: center;
}

/* Estilos responsivos para móviles */
@media (max-width: 768px) {
    .carousel-inner {
        height: 400px; /* Reducir altura en móviles */
    }

    .carousel-image {
        height: 100%; /* Mantiene el ajuste */
    }

    .carousel-caption h3 {
        font-size: 1.2em;
    }

    .carousel-caption p {
        font-size: 0.9em;
    }

    .tech-specs-link,
    .tech-specs-button {
        padding: 6px 12px;
        font-size: 13px;
        margin-top: 8px;
    }
}

/* Footer */
.footer {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 40px 20px;
    border-top: 2px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
    margin: 5px 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--nav-hover-text);
}

.footer-section p i {
    margin-right: 8px;
    color: var(--icon-color);
}

.footer-section p a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section p a:hover {
    color: var(--nav-hover-text);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 14px;
    margin: 0;
    color: var(--text-color);
}

/* Estilos para redes sociales */
.footer-section .social-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section .social-links li a i {
    color: var(--icon-color);
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-section .social-links li a:hover,
.footer-section .social-links li a:hover i {
    color: var(--nav-hover-text);
}