/* Estilos generales */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
}

html, body {
    height: 100%;
}

/* Barra superior */
.barra-superior {
    background-color: #007bff;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* Fijar la barra superior */
    top: 0;
    left: 0;
    width: 99%;
    z-index: 100; /* Asegurar que la barra superior esté por encima */
}

.logo img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    border: 1px solid #fff;
    border-radius: 5px;
    background-color: transparent;
}

.busqueda {
    position: relative;
    display: flex;
    width: 40%;
    flex-wrap: nowrap;
}

.busqueda input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    flex-grow: 1;
}

.busqueda button {
    background-color: #0056b3;
    color: white;
    padding: 10px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
}


.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f3f3f3;
}

.autocomplete-item:hover, .autocomplete-item-active {
    background-color: #f9f9f9;
}

.autocomplete-item img {
    max-height: 30px;
    margin-right: 10px;
    vertical-align: middle;
}

.autocomplete-item .item-details {
    display: inline-block;
    vertical-align: middle;
}

.autocomplete-item .item-code {
    font-size: 0.8em;
    color: #666;
}

.autocomplete-item .item-title {
    font-weight: bold;
}

.highlight {
    background-color: #ffff99;
    font-weight: bold;
}

.botones {
    display: flex;
}

.botones button {
    background-color: transparent;
    border: 2px solid white;
    border-radius: 8px;
    padding: 10px 18px;
    margin-left: 10px;
    cursor: pointer;
    color: white;
    transition: background-color 0.3s, color 0.3s;
}

.botones button span {
    background-color: white;
    color: black;
    border-radius: 5px;
    padding: 2px 5px;
    margin-left: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.botones button:hover {
    background-color: white;
    color: black;
}

.botones button:hover span {
    background-color: black;
    color: white;
}

/* Menu principal */
.menu-principal {
    background-color: #343a40;
    color: white;
    padding: 5px;
    position: fixed;
    top: 75px; /* Ajustado a 75px */
    height: 30px;   /* Ajustar la altura */
    left: 0;
    width: 99%;
    z-index: 99;
    display: flex; /* Añadido para alinear elementos */
    align-items: center; /* Centrar verticalmente */
    justify-content: space-between; /* Distribuir el espacio entre elementos */
}

.menu-toggle {
  display: none;
  background-color: transparent;
  border: none;
  color: white;
  font-size: 1.5em;
  cursor: pointer;
}

/* Ajuste para el botón que activa el menú lateral - AHORA A LA IZQUIERDA */
.categorias-toggle {
    background-color: transparent;
    border: none;
    color: white;
    font-size: 1.0em; /* Mismo tamaño que el menú principal */
    cursor: pointer;
    position: relative;
    height: 100%; /* Para que tome la altura completa del menú principal */
    display: flex;
    align-items: center; /* Centrar verticalmente */
    font-family: sans-serif; /* Misma fuente que el menú principal */
    margin-right: 20px; /* Espacio a la derecha */
    order: 1; /* Orden en flexbox - primero */
}

.menu-principal ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end; /* Alinear a la derecha */
    height: 100%; /* Asegurar que toma toda la altura */
    margin-left: auto; /* Empujar a la derecha */
    order: 2; /* Orden en flexbox - segundo */
}

.menu-principal li {
    margin: 0 1em;
    display: flex; /* Para centrar el contenido verticalmente */
    align-items: center; /* Centrar verticalmente */
    height: 100%; /* Asegurar que ocupa toda la altura */
}

.menu-principal a {
    color: #cccccc;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
    position: relative;
}

.menu-principal a i {
    margin-right: 5px;
}

.menu-principal a:hover {
    color: #ffffff;
    background-color: transparent;
}

.menu-principal li:hover a::before,
.menu-principal li:hover a::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ffffff;
}

.menu-principal a:hover::before {
    left: 0;
}

.menu-principal li:hover a::after {
    right: 0;
}

/* Barra de productos */
.barra-productos {
    background-color: #e0e0e0;
    margin: 0 20px;
    border: 1px solid black;
    border-radius: 5px;
    padding: 5px;
    overflow-x: auto;
    min-height: 40px; 
    position: fixed; /* Fijar la barra de productos */
    top: 120px; /* Ajustar según la altura de la barra superior + menú principal */
    left: 0;
    width: calc(100% - 50px); /* Ajustar el ancho para que coincida con el margen horizontal */
    overflow-y: hidden;
    z-index: 98; /* Asegurar que la barra de productos esté por debajo del menú principal */
    display: flex;
}

.menu-categorias {
    width: 95%; /* Ajustar el ancho al 95% del contenedor */
    background-color: #e0e0e0;
    overflow-x: hidden;
    overflow-y: hidden;
    white-space: nowrap;
    z-index: 100;
    border-top: 1px solid #dee2e6;
    padding: 8px 10px;
    margin: 0; /* Eliminar el margen automático */
    height: 25px;
}

.menu-categorias ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    transition: transform 0.3s ease;
    font-size: 13px;
    width: 100%;
    white-space: nowrap;
}

.menu-categorias li {
    margin: 0 10px;
}

.menu-categorias a {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    color: #343a40;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.menu-categorias a:hover {
    background-color: #007bff;
    color: white;
}

/* Enfoque para inputs y botones */
.busqueda input:focus,
.busqueda button:focus,
.botones button:focus {
    outline: 2px solid #007bff;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 101;
    transition: transform 0.2s ease;
    overflow: hidden;
}

.scroll-btn:hover {
    transform: translateY(-50%) scale(1.2);
}

.scroll-left {
    left: 10px;
}

.scroll-right {
    right: 10px;
}

/* Estilos para el menú vertical */
#lineas-menu {
    background-color: #e0e0e0;
    border: 1px solid #000;
    border-radius: 5px;
    padding: 10px;
    position: absolute;
    top: 100px; /* Ajustar según la altura del menú horizontal */
    left: 0;
    z-index: 1000;
    display: none;
    width: auto;
    max-height: calc(100vh - 40vh);
    overflow-y: auto;
}

#lineas-menu-content {
  position: relative;
  overflow-y: auto;
}

#lineas-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#lineas-menu li {
    margin-bottom: 2px;
}

#lineas-menu li a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #343a40;
    transition: background-color 0.3s, color 0.3s;
    font-size: 12px;
}

#lineas-menu li a:hover {
    background-color: #007bff;
    color: white;
}

/* Estilos para el menú de productos */
#productos-menu {
    background-color: #e0e0e0;
    border: 1px solid #000;
    border-radius: 5px;
    padding: 10px;
    position: absolute;
    top: calc(100px - 20vh); /* Ajustar el desplazamiento superior con -20vh */
    left: 0;
    z-index: 1000;
    display: none;
    width: auto;
    max-height: calc(100vh - 40vh);
    overflow-y: auto;
}

#productos-menu-content {
  position: relative;
  overflow-y: auto;
}

#productos-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#productos-menu li {
    margin-bottom: 2px;
}

#productos-menu li a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #343a40;
    transition: background-color 0.3s, color 0.3s;
    font-size: 12px;
}

#productos-menu li a:hover {
    background-color: #007bff;
    color: white;
}

/* Ocultar el menú de productos al pasar el ratón sobre otras opciones */
.menu-categorias a:hover ~ #productos-menu,
#lineas-menu a:hover ~ #productos-menu {
  display: none;
}

/* Estilo para la línea seleccionada */
#lineas-menu a.active {
  background-color: #007bff;
  color: white;
}

/* Estilo para el indicador de carga */
.loading-indicator {
  border: 4px solid #f3f3f3; /* Color gris claro */
  border-radius: 50%;
  border-top: 4px solid #3498db; /* Color azul */
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: none; /* Inicialmente oculto */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estilos para articulos.php */
.articulos-container {
  display: flex;
  flex-direction: column; /* Para que el mensaje de resultados esté arriba */
  align-items: center;
  margin-top: 120px; /* Espacio para el menú superior */
  padding: 20px;
  width: 100%;
}

.articulos-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

/* Mensaje de resultados más destacado */
.resultados-mensaje {
  width: 100%;
  background-color: #f8f9fa;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 16px;
  color: #333;
  border-left: 5px solid #007bff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: left;
}

/* Asegurar que las tarjetas tengan el mismo tamaño y formato */
.articulo-card {
  border: 1px solid #ccc;
  border-radius: 5px;
  margin: 10px;
  width: 280px; /* Ancho fijo para todas las tarjetas */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.articulo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.articulo-card .imagen-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f8f9fa;
}


.articulo-card img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.articulo-card .descripcion {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  font-size: 14px;
  min-height: 50px; /* Altura mínima para evitar desajustes */
  display: flex;
  align-items: center;
  justify-content: center;
}

.articulo-card .datos {
  font-size: 11px;
  line-height: 1.2;
  padding: 0 10px 10px 10px;
  text-align: center;
  flex-grow: 1; /* Para que ocupe el espacio disponible */
}

.articulo-card .datos p {
  margin: 5px 0;
}

/* Modificación para centrar el botón Ver detalles */
.articulo-card .botones-container {
  padding: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 0 0 5px 5px;
  display: flex;
  justify-content: center; /* Asegura que el contenido esté centrado */
}


.ver-ahora {
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 60%; /* Ancho ajustado */
  font-weight: bold;
  text-align: center; /* Asegura que el texto esté centrado */
  margin: 0 auto; /* Centra el botón si es necesario */
  display: flex;
  justify-content: center;
  align-items: center;
}

.ver-ahora:hover {
  background-color: #0056b3;
}

.articulo-card .botones-container button {
  margin: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* Icono de PDF para los botones */
.ficha-tecnica::before, .ficha-comercial::before {
  content: "\f1c1";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 5px;
}

.agregar-canasta::before {
  content: "\f07a";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 5px;
}

.ver-ahora {
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.ver-ahora:hover {
  background-color: #0056b3;
}

/* Estilos para resultados de búsqueda */
.resultados-mensaje {
  width: 100%;
  background-color: #f8f9fa;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 16px;
  color: #333;
  border-left: 5px solid #007bff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: left;
}

.loading-message {
  width: 100%;
  text-align: center;
  padding: 20px;
  font-size: 16px;
  color: #666;
}

.no-resultados {
  width: 100%;
  background-color: #f8f9fa;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 16px;
  color: #666;
  border-left: 5px solid #dc3545;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
}

.error-busqueda, .error-message {
  width: 100%;
  background-color: #f8d7da;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 16px;
  color: #721c24;
  border-left: 5px solid #dc3545;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
}

.mensaje-categoria {
  width: 100%;
  background-color: #e9ecef;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 16px;
  color: #333;
  border-left: 5px solid #6c757d;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Media Queries */
@media (max-width: 768px) {
    .barra-superior {
        flex-direction: column;
        align-items: flex-start;
    }

    .busqueda {
        width: 100%;
        margin-top: 10px;
    }

    .menu-principal ul {
        flex-direction: column;
        margin-left: 0; /* Anular margin-left auto para dispositivos móviles */
    }

    .menu-toggle {
        display: block;
    }

    .menu-principal ul {
        display: none;
    }

    .menu-principal.active ul {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #343a40;
        padding: 10px 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .menu-principal li {
        width: auto;
        flex: 1 1 auto;
        text-align: center;
        margin: 5px;
    }
    
    .menu-principal.active ul li a {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .articulos-container {
        margin-top: 20px;
    }
    
    /* Ajustes para el menú móvil con categorías a la izquierda */
    .categorias-toggle {
        order: 1;
        margin-right: 0;
    }
    
    .menu-toggle {
        order: 2;
    }
}

/* Modificación para el menú lateral de categorías - Ancho aumentado */
.menu-categorias-lateral {
    position: fixed;
    left: -350px; /* Aumentado de -250px a -300px para ocultarlo completamente */
    top: 115px;
    width: 350px; /* Aumentado de 250px a 300px */
    height: calc(100% - 115px);
    background-color: #343a40;
    color: white;
    transition: left 0.3s ease;
    padding-top: 10px;
    overflow-y: auto;
    z-index: 95;
}


/* El resto del CSS para el menú lateral se mantiene igual */
.menu-categorias-lateral ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-categorias-lateral ul li {
    padding: 0; /* Eliminar padding del li */
    border-bottom: 1px solid #555;
    position: relative; /* Para que el enlace pueda posicionarse correctamente */
}

/* Ajuste adicional para el menú lateral de categorías */
.menu-categorias-lateral ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px; /* Padding horizontal aumentado de 20px a 25px */
    text-align: left; /* Cambiado de center a left para mejor legibilidad */
    width: calc(100% - 50px); /* Ajuste para compensar el padding */
    color: #cccccc; 
    text-decoration: none;
    transition: all 0.3s;
    font-family: sans-serif;
}

/* Estilo para el contador de categorías */
.categoria-contador {
    font-size: 0.9em; /* Ligeramente aumentado de 0.85em */
    color: #aaa;
    font-weight: normal;
    margin-left: 8px; /* Agregar espacio entre el texto y el contador */
    min-width: 35px; /* Garantizar espacio mínimo para el contador */
    text-align: right; /* Alinear a la derecha */
}

.menu-categorias-lateral ul li:hover {
    background-color: #007bff; /* Color de fondo al hacer hover */
}

.menu-categorias-lateral ul li a:hover {
    color: #ffffff; /* Cambiar a blanco al pasar el cursor */
}

/* Mostrar el menú cuando esté activo */
.menu-categorias-lateral.active {
    left: 0;
}

/* Mantener el carrusel principal con buena altura */
.carrusel-container {
    position: relative;
    width: 100%;
    margin-top: 110px;
    overflow: hidden;
    background-color: #f8f9fa;
    height: calc(100vh - 180px); /* Mantener buena altura */
    z-index: 10;
    margin-bottom: 0 !important; /* Eliminar margen inferior */
    padding-bottom: 0 !important; /* Eliminar padding inferior */
}

.carrusel-inner {
    display: flex;
    transition: transform 0.8s ease;
    height: 100%; /* Altura al 100% del contenedor */
}

.carrusel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden; /* Para que las imágenes no desborden */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Asegurar que las imágenes del carrusel principal se muestren correctamente */
.carrusel-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Controles del carrusel */
.carrusel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: background-color 0.3s, transform 0.2s;
}

.carrusel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carrusel-prev {
    left: 20px;
}

.carrusel-next {
    right: 20px;
}

/* Indicadores del carrusel */
.carrusel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carrusel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.3s;
}

.carrusel-dot.active {
    background-color: #007bff;
    border-color: #007bff;
}

/* Adaptación móvil para el carrusel */
@media (max-width: 768px) {
    .carrusel-container {
        margin-top: 115px; /* Mantener igual margen en móviles */
        height: 60vh; /* Altura reducida en dispositivos móviles */
    }
    
    .carrusel-control {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .carrusel-prev {
        left: 10px;
    }
    
    .carrusel-next {
        right: 10px;
    }
}

/* Estilos ajustados para la sección Nosotros - Reduciendo el espaciado superior */

.seccion-nosotros {
    padding: 20px 20px 40px; /* Reducido el padding superior */
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 40px;
    /* Quitamos el margin-top excesivo y lo controlamos desde el JS */
}

.titulo-seccion {
    text-align: center;
    color: #007bff;
    margin-bottom: 30px; /* Reducido ligeramente */
    margin-top: 10px; /* Espacio mínimo al inicio */
    font-size: 32px;
    position: relative;
    padding-bottom: 15px;
}

/* El resto de los estilos permanecen igual */
.titulo-seccion::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

.nosotros-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.nosotros-bloque {
    flex: 1 1 300px;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 350px;
}

.nosotros-bloque:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.icono-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e9f2fe;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.icono-container i {
    font-size: 36px;
    color: #007bff;
}

.nosotros-bloque h3 {
    color: #343a40;
    margin-bottom: 15px;
    font-size: 22px;
    position: relative;
    padding-bottom: 10px;
}

.nosotros-bloque h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: #007bff;
}

.nosotros-bloque p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 15px;
}

/* Ajustes responsivos */
@media (max-width: 992px) {
    .nosotros-container {
        flex-direction: column;
        align-items: center;
    }
    
    .nosotros-bloque {
        max-width: 100%;
        margin-bottom: 20px; /* Reducido */
    }
}

@media (max-width: 768px) {
    .seccion-nosotros {
        padding: 15px 15px 30px; /* Reducido aún más en móviles */
    }
    
    .titulo-seccion {
        font-size: 28px;
        margin-bottom: 25px; /* Reducido en móviles */
    }
    
    .nosotros-bloque {
        padding: 20px;
    }
    
    .icono-container {
        width: 70px;
        height: 70px;
    }
    
    .icono-container i {
        font-size: 30px;
    }
    
    .nosotros-bloque h3 {
        font-size: 20px;
    }
    
    .nosotros-bloque p {
        font-size: 14px;
    }
}

/* Estilos para la sección Sucursales - Agregar a tu archivo styles.css */

.seccion-sucursales {
  padding: 20px 20px 40px;
  background-color: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 40px;
}

/* Usar el mismo estilo de título que la sección Nosotros para consistencia */
.seccion-sucursales .titulo-seccion {
  text-align: center;
  color: #007bff;
  margin-bottom: 30px;
  margin-top: 10px;
  font-size: 32px;
  position: relative;
  padding-bottom: 15px;
}

.seccion-sucursales .titulo-seccion::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #007bff;
}

.sucursales-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.sucursal-bloque {
  flex: 1 1 450px;
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  max-width: 550px;
}

.sucursal-bloque:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.sucursal-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #e9f2fe;
  padding-bottom: 15px;
}

.sucursal-header .icono-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #e9f2fe;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.sucursal-header .icono-container i {
  font-size: 28px;
  color: #007bff;
}

.sucursal-header h3 {
  color: #343a40;
  font-size: 24px;
  margin: 0;
}

.sucursal-info {
  margin-bottom: 20px;
}

.sucursal-info > div {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-start;
}

.sucursal-info i {
  color: #007bff;
  font-size: 18px;
  margin-right: 15px;
  margin-top: 3px;
  width: 20px;
  text-align: center;
}

.sucursal-info p {
  color: #6c757d;
  line-height: 1.6;
  font-size: 15px;
  margin: 0;
  flex: 1;
}

.sucursal-mapa {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.sucursal-mapa iframe {
  display: block;
}

.sucursal-botones {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 15px;
}

.boton-mapa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.boton-mapa:hover {
  background-color: #0056b3;
}

.boton-mapa i {
  margin-right: 8px;
}

/* Ajustes para móviles */
@media (max-width: 768px) {
  .seccion-sucursales {
    padding: 15px 15px 30px;
  }
  
  .seccion-sucursales .titulo-seccion {
    font-size: 28px;
    margin-bottom: 25px;
  }
  
  .sucursal-bloque {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .sucursal-header {
    flex-direction: column;
    text-align: center;
    padding-bottom: 10px;
  }
  
  .sucursal-header .icono-container {
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .sucursal-header h3 {
    font-size: 22px;
  }
  
  .sucursal-info > div {
    margin-bottom: 12px;
  }
  
  .sucursal-mapa iframe {
    height: 250px;
  }
}

/* Estilos para la sección de contacto */

.seccion-contacto {
  padding: 20px 20px 40px;
  background-color: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 40px;
}

.contacto-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.contacto-intro {
  flex: 1 1 300px;
  order: 1; /* Orden explícito para dispositivos móviles */
  max-width: 350px;
  align-self: flex-start;
}

.contacto-intro:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.contacto-intro .icono-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #e9f2fe;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}

.contacto-intro .icono-container i {
  font-size: 36px;
  color: #007bff;
}

.contacto-intro h3 {
  color: #343a40;
  margin-bottom: 15px;
  font-size: 22px;
  position: relative;
  padding-bottom: 10px;
}

.contacto-intro h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: #007bff;
}

.contacto-intro p {
  color: #6c757d;
  line-height: 1.6;
  font-size: 15px;
}

/* Asegurar que el formulario se mantiene en su posición */
.contacto-form-container {
  flex: 1 1 500px;
  order: 2; /* Orden explícito para dispositivos móviles */
  max-width: 600px;
  min-height: 520px; /* Altura mínima para evitar desplazamiento */
  position: relative; /* Para posicionamiento absoluto de mensajes */
}

/* Estilos para el mensaje de éxito */
.form-success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 30px;
  border-radius: 5px;
  text-align: center;
  margin-top: 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-success-message .success-icon {
  font-size: 48px;
  color: #28a745;
  margin-bottom: 15px;
}

.form-success-message h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #155724;
}

.btn-nuevo-mensaje {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  margin-top: 15px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-nuevo-mensaje:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.contacto-form-container:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

#contacto-form {
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: #343a40;
  font-size: 15px;
}

.form-group .required {
  color: #dc3545;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 15px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-group .error-message {
  color: #dc3545;
  font-size: 13px;
  margin-top: 5px;
  min-height: 18px;
  visibility: hidden;
}

.form-group .error-message.visible {
  visibility: visible;
}

.captcha-container {
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #e9ecef;
}

.captcha {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.captcha-image {
  background-color: white;
  border: 1px solid #ced4da;
  border-radius: 5px;
  overflow: hidden;
  margin-right: 10px;
}

.captcha-refresh button {
  background-color: transparent;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 20px;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.captcha-refresh button:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.captcha-input {
  width: 100%;
}

.submit-container {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-enviar {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-enviar i {
  margin-right: 8px;
}

.btn-enviar:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-enviar:active {
  transform: translateY(0);
}

.form-status {
  margin-top: 15px;
  padding: 10px 15px;
  border-radius: 5px;
  text-align: center;
  font-weight: 500;
  display: none;
  width: 100%;
}

.form-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* Ajustes responsivos */
@media (max-width: 992px) {
  .contacto-container {
    flex-direction: column;
    align-items: center;
  }
  
  .contacto-intro {
    max-width: 100%;
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .seccion-contacto {
    padding: 15px 15px 30px;
  }
  
  .contacto-form-container {
    padding: 20px;
  }
  
  .captcha-container {
    padding: 10px;
  }
  
  .captcha {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .captcha-image {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
  }
  
  .captcha-refresh {
    position: absolute;
    right: 10px;
    top: 10px;
  }
  
  .btn-enviar {
    width: 100%;
  }
}

/* Estilos para la vista de detalle de artículo */
.detalle-articulo {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

.detalle-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  position: relative;
}

.btn-volver {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: #6c757d;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 4px;
  transition: color 0.3s, background-color 0.3s;
  margin-bottom: 15px;
}

.btn-volver:hover {
  color: #007bff;
  background-color: #f8f9fa;
}

.btn-volver i {
  margin-right: 5px;
}

.detalle-titulo {
  color: #343a40;
  font-size: 24px;
  margin: 0;
  line-height: 1.3;
}

/* Cambios en el grid para ajustar la disposición de los elementos */
.detalle-contenido {
  display: grid;
  grid-template-columns: 350px 1fr 250px; /* Reducir el ancho de la columna de la imagen */
  gap: 20px;
  padding: 20px;
  align-items: start;
  position: relative; /* Asegurar contexto de posicionamiento */
  width: 100%;
  box-sizing: border-box;
}

/* Ajuste de la imagen para que sea más grande */
.detalle-imagen-container {
  width: 100%;
  height: auto; /* Auto en lugar de 100% */
  min-height: 300px; /* Reducir la altura mínima */
  max-height: 350px; /* Limitar la altura máxima */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  position: relative; /* Asegurar contexto de posicionamiento */
  box-sizing: border-box;
  grid-column: 1; /* Asegurar que esté en la primera columna */
}

.detalle-imagen-container img {
  max-width: 100%;
  max-height: 330px; /* Limitar la altura máxima de la imagen */
  object-fit: contain;
  display: block;
  position: relative; /* Asegurar posicionamiento relativo */
  width: auto;
  height: auto;
}

.detalle-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative; /* Asegurar contexto de posicionamiento */
  box-sizing: border-box;
  grid-column: 2; /* Asegurar que esté en la segunda columna */
  overflow: visible; /* Permitir que el contenido sea visible */
  z-index: 1; /* Asegurar que esté por encima de otros elementos */
}

.detalle-codigo {
  margin-bottom: 15px;
}

.detalle-codigo p {
  margin: 3px 0;
  color: #6c757d;
  font-size: 15px;
}

.detalle-precios {
  margin-bottom: 15px;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.detalle-precios .precio {
  font-size: 24px;
  font-weight: bold;
  color: #343a40;
  margin: 0 0 5px 0;
}

.detalle-precios .precio span {
  font-size: 16px;
  font-weight: normal;
  color: #6c757d;
}

.detalle-precios .precio-con-iva {
  font-size: 16px;
  color: #6c757d;
  margin: 5px 0;
}

.disponibilidad {
  display: flex;
  align-items: center;
  font-size: 15px;
  margin: 10px 0 0 0;
}

.disponibilidad i {
  margin-right: 5px;
}

.disponible {
  color: #28a745;
}

.no-disponible {
  color: #dc3545;
}

.detalle-descripcion, 
.detalle-caracteristicas {
  margin-bottom: 20px;
}

.detalle-descripcion h3, 
.detalle-caracteristicas h3 {
  font-size: 18px;
  color: #343a40;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e9ecef;
}

.detalle-descripcion p {
  color: #495057;
  line-height: 1.6;
  font-size: 15px;
}

.detalle-caracteristicas {
  margin-bottom: 15px;
}

.detalle-caracteristicas h3 {
  font-size: 18px;
  color: #343a40;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e9ecef;
}

.detalle-caracteristicas ul {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: -2px;
}

.detalle-caracteristicas li {
  padding: 3px 0;
  border-bottom: 1px solid #f2f2f2;
  color: #495057;
  font-size: 15px;
  line-height: 1.3;
}

.detalle-caracteristicas li:last-child {
  border-bottom: none;
}

/* Cambios en los botones para que aparezcan en una sola columna */
.detalle-botones-container {
  width: 100%;
  display: flex;
  flex-direction: column; /* Asegurar que están en columna */
  gap: 12px;
  position: relative; /* Asegurar contexto de posicionamiento */
  box-sizing: border-box;
  grid-column: 3; /* Asegurar que esté en la tercera columna */
  z-index: 1; /* Asegurar que esté por encima de otros elementos */
}

/* Responsive */
/* Estilos responsivos para la vista de detalle */
@media (max-width: 1200px) {
  .detalle-contenido {
    grid-template-columns: 400px 1fr 220px; /* Ajustar columnas para pantallas más pequeñas */
    gap: 15px;
  }
  
  .detalle-imagen-container {
    min-height: 400px;
  }
}

@media (max-width: 992px) {
  .detalle-contenido {
    grid-template-columns: 1fr; /* Una sola columna para tablets */
    gap: 25px;
  }
  
  .detalle-imagen-container {
    height: 450px; /* Altura fija para tablets */
    max-width: 100%;
    margin: 0 auto;
  }
  
  .detalle-imagen-container img {
    max-height: 430px;
  }
  
  .detalle-botones-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .detalle-contenido {
    padding: 15px;
  }
  
  .detalle-imagen-container {
    height: 350px; /* Altura ajustada para móviles */
  }
  
  .detalle-imagen-container img {
    max-height: 330px;
  }
  
  .detalle-botones-container button {
    height: 48px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .detalle-header {
    padding: 15px;
  }
  
  .detalle-titulo {
    font-size: 20px;
  }
  
  .detalle-imagen-container {
    height: 300px; /* Más reducido para móviles pequeños */
  }
  
  .detalle-imagen-container img {
    max-height: 280px;
  }
  
  .detalle-botones-container button {
    height: 44px;
    font-size: 12px;
  }
}

/* Asegurar que los botones son lo suficientemente grandes */
.detalle-botones-container button {
  width: 100%;
  height: 52px; /* Un poco más grandes */
  padding: 0 15px;
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: background-color 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px; /* Asegurar espacio entre botones */
}

.detalle-botones-container button i {
  margin-right: 10px;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.detalle-botones-container button i {
  margin-right: 8px;
  font-size: 16px;
  min-width: 16px;
}

.btn-cotizar {
  background-color: #007bff;
}

.btn-cotizar:hover {
  background-color: #0056b3;
}

.btn-ficha-comercial {
  background-color: #28a745;
}

.btn-ficha-comercial:hover {
  background-color: #218838;
}

.btn-ficha-tecnica {
  background-color: #17a2b8;
}

.btn-ficha-tecnica:hover {
  background-color: #138496;
}

.btn-hoja-seguridad {
  background-color: #dc3545;
}

.btn-hoja-seguridad:hover {
  background-color: #c82333;
}

.btn-video {
  background-color: #6f42c1;
}

.btn-video:hover {
  background-color: #5a2d91;
}

.detalle-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.detalle-botones button {
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.detalle-botones button i {
  margin-right: 8px;
}

.btn-contacto {
  background-color: #28a745;
  color: white;
}

.btn-contacto:hover {
  background-color: #218838;
}

.btn-cotizar {
  background-color: #007bff;
  color: white;
}

.btn-cotizar:hover {
  background-color: #0069d9;
}

/* Ajustes responsivos para la imagen */
@media (max-width: 1200px) {
  .detalle-contenido {
    grid-template-columns: 300px 1fr 220px; /* Reducir aún más para pantallas medianas */
  }
  
  .detalle-imagen-container {
    min-height: 250px;
    max-height: 300px;
  }
  
  .detalle-imagen-container img {
    max-height: 280px;
  }
}

@media (max-width: 992px) {
  .detalle-contenido {
    grid-template-columns: 1fr; /* Una sola columna para tablets */
  }
  
  .detalle-imagen-container {
    height: auto;
    min-height: 300px;
    max-height: 350px; /* Altura más natural en pantallas pequeñas */
    max-width: 450px;
    margin: 0 auto;
  }
}

/* Estilos para el mensaje de carga */
.mensaje-carga {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.mensaje-carga-contenido {
  background-color: white;
  padding: 20px 30px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mensaje-carga i {
  font-size: 24px;
  margin-right: 10px;
  color: #007bff;
}

.mensaje-carga span {
  font-size: 16px;
  color: #333;
}

/* Estilos para el marco del PDF cuando se muestra en iframe */
.pdf-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9998;
  display: flex;
  flex-direction: column;
}

.pdf-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #343a40;
  color: white;
  padding: 10px 20px;
}

.pdf-viewer-title {
  font-size: 18px;
  font-weight: 500;
}

.pdf-viewer-controls {
  display: flex;
  gap: 15px;
}

.pdf-viewer-controls button {
  background-color: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.pdf-viewer-controls button i {
  margin-right: 5px;
}

.pdf-viewer-controls button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.pdf-viewer-iframe {
  flex: 1;
  width: 100%;
  border: none;
}

/* Estilos para el contenedor de la imagen con posición relativa para el zoom */
.detalle-imagen-container {
  position: relative;
  overflow: visible !important; /* Cambiar a visible para permitir que el zoom se muestre fuera del contenedor */
  cursor: crosshair; /* Cambia el cursor al pasar sobre la imagen */
}

/* Estilos para el lente de zoom - eliminar el borde y background */
.zoom-lens {
  position: absolute;
  width: 80px;
  height: 80px;
  cursor: none;
  z-index: 10;
  pointer-events: none; /* Para que no interfiera con los eventos del ratón */
}

/* Añadir solo la cruz como punto de referencia, sin borde ni fondo */
.zoom-lens::before, .zoom-lens::after {
  content: '';
  position: absolute;
  background-color: rgba(255, 0, 0, 0.8);
}

.zoom-lens::before {
  width: 1px;
  height: 21px; /* Reducido para mostrar solo la cruz, no todo el marco */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.zoom-lens::after {
  width: 21px; /* Reducido para mostrar solo la cruz, no todo el marco */
  height: 1px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Estilos para la ventana de zoom */
.zoom-window {
  position: absolute;
  width: 250px;
  height: 250px;
  background-repeat: no-repeat;
  border: 3px solid #007bff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 100;
  right: -280px; /* Posicionar a la derecha de la imagen */
  top: 0;
  background-color: white;
  overflow: hidden;
}

/* Añadir solo un punto de referencia en el centro del zoom */
.zoom-window::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: rgba(0, 0, 255, 0.7);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}


/* Ajustes responsivos para el zoom */
@media (max-width: 1200px) {
  .zoom-window {
    width: 220px;
    height: 220px;
    right: -240px;
  }
}

@media (max-width: 992px) {
  /* En pantallas más pequeñas, colocar la ventana de zoom debajo de la imagen */
  .zoom-window {
    top: 105%; /* Justo debajo de la imagen */
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin-top: 10px;
  }
  
  .contacto-container {
    flex-direction: column;
    align-items: center;
  }
  
  .contacto-intro,
  .contacto-form-container {
    max-width: 100%;
  }
  
  /* Mantener el orden visual en dispositivos más pequeños */
  .contacto-intro {
    order: 1;
    margin-bottom: 30px;
  }
  
  .contacto-form-container {
    order: 2;
    min-height: 450px; /* Altura reducida para móviles */
  }  
}

@media (max-width: 768px) {
  /* En dispositivos móviles, hacer la ventana de zoom más pequeña */
  .zoom-window {
    width: 200px;
    height: 200px;
  }
  
  .zoom-lens {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 576px) {
  /* En dispositivos muy pequeños, ajustar aún más el tamaño */
  .zoom-window {
    width: 180px;
    height: 180px;
  }
  
  .zoom-lens {
    width: 50px;
    height: 50px;
  }
}

/* Animación suave para la aparición del zoom */
.zoom-window, .zoom-lens {
  transition: opacity 0.2s ease;
  opacity: 0;
}

.zoom-window:not([style*="display: none"]), 
.zoom-lens:not([style*="display: none"]) {
  opacity: 1;
}

/* Estilos para el sistema de facturación */
.pantalla-facturacion {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pantalla-facturacion.activo {
  opacity: 1;
  visibility: visible;
}

.facturacion-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.facturacion-contenido {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 1000px;
  max-height: 90%;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.facturacion-encabezado {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 15px 15px 0 0;
}

.facturacion-encabezado h2 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 600;
}

.cerrar-facturacion {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2em;
}

.cerrar-facturacion:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.facturacion-cuerpo {
  padding: 30px;
  flex: 1;
  overflow-y: auto;
}

/* Paso 1: Captura de tickets */
.paso-tickets {
  display: block;
}

.entrada-ticket {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.entrada-ticket input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

.entrada-ticket input:focus {
  border-color: #667eea;
  outline: none;
}

.btn-agregar-ticket {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-agregar-ticket:hover {
  background: #218838;
  transform: translateY(-2px);
}

.btn-agregar-ticket:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.tickets-seleccionados {
  margin-top: 30px;
}

.tickets-lista {
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  overflow: hidden;
}

.ticket-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e1e5e9;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.ticket-item:last-child {
  border-bottom: none;
}

.ticket-item:hover {
  background: #e9ecef;
}

.ticket-info {
  flex: 1;
}

.ticket-folio {
  font-weight: 600;
  color: #333;
  font-size: 1.1em;
  margin-bottom: 5px;
}

.ticket-fecha {
  color: #6c757d;
  font-size: 0.9em;
  margin-bottom: 5px;
}

.ticket-cliente {
  color: #495057;
  font-size: 0.9em;
}

.ticket-total {
  font-size: 1.2em;
  font-weight: 600;
  color: #28a745;
  margin-right: 15px;
}

.btn-eliminar-ticket {
  background: #dc3545;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-eliminar-ticket:hover {
  background: #c82333;
  transform: scale(1.1);
}

.resumen-tickets {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
}

.resumen-tickets h4 {
  margin: 0 0 15px 0;
  font-size: 1.2em;
}

.resumen-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.resumen-row:last-child {
  margin-bottom: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  font-size: 1.1em;
}

/* Paso 2: Datos del cliente */
.paso-cliente {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #667eea;
  outline: none;
}

.form-group .error-message {
  color: #dc3545;
  font-size: 0.9em;
  margin-top: 5px;
  display: none;
}

.form-group .error-message.visible {
  display: block;
}

.form-group input.invalid,
.form-group select.invalid {
  border-color: #dc3545;
}

.required {
  color: #dc3545;
}

/* Botones del pie */
.facturacion-footer {
  padding: 20px 30px;
  background: #f8f9fa;
  border-top: 1px solid #e1e5e9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.botones-navegacion {
  display: flex;
  gap: 15px;
}

.btn-paso {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1em;
}

.btn-anterior {
  background: #6c757d;
  color: white;
}

.btn-anterior:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-siguiente {
  background: #007bff;
  color: white;
}

.btn-siguiente:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.btn-enviar-facturacion {
  background: #28a745;
  color: white;
}

.btn-enviar-facturacion:hover {
  background: #218838;
  transform: translateY(-2px);
}

.btn-paso:disabled {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.info-paso {
  color: #6c757d;
  font-size: 0.9em;
}

/* Mensaje de éxito */
.mensaje-exito-facturacion {
  text-align: center;
  padding: 40px 20px;
}

.mensaje-exito-facturacion .icono-exito {
  font-size: 4em;
  color: #28a745;
  margin-bottom: 20px;
}

.mensaje-exito-facturacion h3 {
  color: #28a745;
  margin-bottom: 15px;
  font-size: 1.5em;
}

.mensaje-exito-facturacion p {
  color: #6c757d;
  margin-bottom: 25px;
  line-height: 1.6;
}

.btn-cerrar-exito {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cerrar-exito:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .facturacion-contenido {
    width: 95%;
    margin: 10px;
    max-height: 95%;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .entrada-ticket {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-agregar-ticket {
    width: 100%;
  }
  
  .ticket-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .ticket-total {
    margin-right: 0;
  }
  
  .facturacion-footer {
    flex-direction: column;
    gap: 15px;
  }
  
  .botones-navegacion {
    width: 100%;
    justify-content: center;
  }
}

/* Estilos para el sistema de cotización */

/* Contador de artículos en el botón de la barra superior */
.botones button .cantidad {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  color: #007bff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 5px;
  transition: transform 0.3s, background-color 0.3s;
}

.botones button .cantidad.actualizado {
  transform: scale(1.2);
  background-color: #ffeb3b;
}

/* Pantalla de cotización */
.pantalla-cotizacion {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pantalla-cotizacion.activo {
  opacity: 1;
}

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

.cotizacion-contenido {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  margin: 5vh auto;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cotizacion-encabezado {
  padding: 20px;
  background-color: #007bff;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cotizacion-encabezado h2 {
  margin: 0;
  font-size: 24px;
}

.cerrar-cotizacion {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.cerrar-cotizacion:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.cotizacion-cuerpo {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-height: 200px;
}

.cotizacion-vacia {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
  color: #6c757d;
}

.cotizacion-vacia i {
  font-size: 64px;
  margin-bottom: 20px;
  color: #e9ecef;
}

.cotizacion-vacia p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Lista de artículos en la cotización */
.cotizacion-items {
  margin-bottom: 20px;
}

.cotizacion-item {
  display: grid;
  grid-template-columns: 80px 3fr 1fr 1fr 1fr 50px;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  align-items: center;
}

.cotizacion-item:last-child {
  border-bottom: none;
}

.item-imagen {
  width: 80px;
  height: 80px;
  overflow: hidden;
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
}

.item-imagen img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.item-info {
  display: flex;
  flex-direction: column;
}

.item-info h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
  line-height: 1.3;
}

.item-codigo {
  margin: 0 0 2px 0;
  font-size: 13px;
  color: #6c757d;
}

.item-tipo {
  margin: 0;
  font-size: 13px;
  color: #343a40;
  font-style: italic;
}

.item-precio {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.precio-unitario {
  font-weight: bold;
  font-size: 16px;
}

.precio-iva, .subtotal-iva {
  font-size: 12px;
  color: #6c757d;
}

.item-cantidad {
  display: flex;
  align-items: center;
}

.item-cantidad button {
  width: 30px;
  height: 30px;
  border: 1px solid #ced4da;
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #495057;
  border-radius: 4px;
}

.item-cantidad button:hover {
  background-color: #e9ecef;
}

.item-cantidad input {
  width: 40px;
  height: 30px;
  border: 1px solid #ced4da;
  text-align: center;
  margin: 0 5px;
  border-radius: 4px;
}

.item-subtotal {
  text-align: right;
  font-weight: bold;
}

.item-acciones {
  display: flex;
  justify-content: center;
}

.btn-eliminar {
  background-color: transparent;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.btn-eliminar:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Pie de página de la cotización */
.cotizacion-footer {
  padding: 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.cotizacion-total {
  text-align: right;
  margin-bottom: 20px;
}

.cotizacion-total .etiqueta {
  font-size: 18px;
  font-weight: bold;
  margin-right: 10px;
}

.cotizacion-total .valor {
  font-size: 24px;
  font-weight: bold;
  color: #343a40;
}

.cotizacion-botones {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.cotizacion-botones button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  font-size: 14px;
  transition: background-color 0.3s, transform 0.2s;
}

.cotizacion-botones button i {
  margin-right: 8px;
}

.btn-seguir-agregando {
  background-color: #6c757d;
  color: white;
}

.btn-seguir-agregando:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
}

.btn-vaciar-cotizacion {
  background-color: #dc3545;
  color: white;
}

.btn-vaciar-cotizacion:hover {
  background-color: #c82333;
  transform: translateY(-2px);
}

.btn-enviar-cotizacion {
  background-color: #28a745;
  color: white;
}

.btn-enviar-cotizacion:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

/* Formulario de envío de cotización */
.formulario-envio-cotizacion {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.formulario-envio-cotizacion.activo {
  opacity: 1;
}

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

.formulario-contenido {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  margin: 5vh auto;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.formulario-encabezado {
  padding: 20px;
  background-color: #28a745;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.formulario-encabezado h2 {
  margin: 0;
  font-size: 24px;
}

.cerrar-formulario {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.cerrar-formulario:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.formulario-cuerpo {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

#form-envio-cotizacion .form-group {
  margin-bottom: 15px;
}

#form-envio-cotizacion label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #343a40;
}

#form-envio-cotizacion .required {
  color: #dc3545;
}

#form-envio-cotizacion input,
#form-envio-cotizacion textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

#form-envio-cotizacion input:focus,
#form-envio-cotizacion textarea:focus {
  border-color: #28a745;
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

#form-envio-cotizacion .error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
  min-height: 18px;
  visibility: hidden;
}

#form-envio-cotizacion .error-message.visible {
  visibility: visible;
}

#form-envio-cotizacion input.invalid,
#form-envio-cotizacion textarea.invalid {
  border-color: #dc3545;
}

.formulario-botones {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.formulario-botones button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  font-size: 14px;
  transition: background-color 0.3s, transform 0.2s;
}

.formulario-botones button i {
  margin-right: 8px;
}

.btn-cancelar {
  background-color: #6c757d;
  color: white;
}

.btn-cancelar:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
}

.btn-enviar {
  background-color: #28a745;
  color: white;
}

.btn-enviar:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

/* Captcha para el formulario de cotización */
#captcha-cotizacion {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

#captcha-canvas-cotizacion {
  background-color: white;
  border: 1px solid #ced4da;
  border-radius: 4px;
  margin-right: 10px;
}

#refresh-captcha-cotizacion {
  background-color: transparent;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 18px;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

#refresh-captcha-cotizacion:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

#form-status-cotizacion {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
  display: none;
}

#form-status-cotizacion.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#form-status-cotizacion.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Notificaciones */
#notificaciones-container {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 350px;
  z-index: 10001;
}

.notificacion {
  display: flex;
  align-items: center;
  background-color: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 10px;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.notificacion.visible {
  transform: translateX(0);
}

.notificacion::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: #007bff;
}

.notificacion.success::before {
  background-color: #28a745;
}

.notificacion.error::before {
  background-color: #dc3545;
}

.notificacion.warning::before {
  background-color: #ffc107;
}

.notificacion.info::before {
  background-color: #17a2b8;
}

.notificacion-icono {
  width: 24px;
  text-align: center;
  margin-right: 15px;
  font-size: 20px;
}

.notificacion.success .notificacion-icono {
  color: #28a745;
}

.notificacion.error .notificacion-icono {
  color: #dc3545;
}

.notificacion.warning .notificacion-icono {
  color: #ffc107;
}

.notificacion.info .notificacion-icono {
  color: #17a2b8;
}

.notificacion-mensaje {
  flex-grow: 1;
  font-size: 14px;
  color: #343a40;
}

.cerrar-notificacion {
  background: transparent;
  border: none;
  color: #6c757d;
  cursor: pointer;
  font-size: 16px;
  padding: 3px;
  margin-left: 10px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
}

.cerrar-notificacion:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 992px) {
  .cotizacion-item {
    grid-template-columns: 80px 2fr 1fr 1fr 50px;
  }
  
  .item-precio {
    display: none;
  }
}

@media (max-width: 768px) {
  .cotizacion-contenido,
  .formulario-contenido {
    width: 95%;
    max-width: none;
    margin: 2.5vh auto;
    max-height: 95vh;
  }
  
  .cotizacion-item {
    grid-template-columns: 60px 3fr 1fr 40px;
    padding: 10px;
  }
  
  .item-imagen {
    width: 60px;
    height: 60px;
  }
  
  .item-subtotal {
    display: none;
  }
  
  .cotizacion-botones {
    flex-direction: column;
  }
  
  .cotizacion-botones button {
    width: 100%;
    justify-content: center;
  }
  
  .formulario-botones {
    flex-direction: column;
  }
  
  .formulario-botones button {
    width: 100%;
    justify-content: center;
  }
  
  #notificaciones-container {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* Estilos para el mensaje de éxito de cotización */
.mensaje-exito-cotizacion {
  text-align: center;
  padding: 30px;
  max-width: 90%;
  width: 400px;
  margin: 0 auto;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.mensaje-exito-cotizacion .icono-exito {
  font-size: 60px;
  color: #28a745;
  margin-bottom: 20px;
}

.mensaje-exito-cotizacion h3 {
  color: #28a745;
  margin-bottom: 15px;
  font-size: 24px;
}

.mensaje-exito-cotizacion p {
  margin-bottom: 25px;
  line-height: 1.6;
  color: #333;
}

.btn-cerrar-exito {
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-cerrar-exito:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

/* Cuando el formulario se convierte en contenedor flex para el mensaje de éxito */
.formulario-cuerpo.flex-center {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Título de marcas con estilos actualizados */
.marcas-titulo {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #343a40;
    padding: 0 0 8px 0; /* Solo padding inferior para la línea */
    z-index: 91;
    background-color: #fff; /* Fondo blanco para asegurar que sea visible */
    display: block;
    width: 100%;
    /* La posición se controla desde JavaScript */
}

.marcas-titulo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #007bff;
}

/* Carrusel de marcas con posicionamiento actualizado */
.marcas-carrusel-container {
    width: 100%;
    padding: 15px 0 20px;
    background-color: rgba(240, 240, 240, 0.8);
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    z-index: 90;
    position: relative; /* Agregar posición relativa para los botones */
    /* La posición se controla desde JavaScript */
}

.marcas-carrusel-inner {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    padding: 0 50px;
}

.marcas-carrusel-inner::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Estilos para las marcas */
.marca-item {
    flex: 0 0 auto;
    width: 320px;
    height: 200px;
    margin: 0 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.marca-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.marca-item img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.marca-item.active {
    border: 3px solid #007bff;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.marca-item .marca-nombre {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 14px; /* Tamaño de fuente aumentado */
    padding: 8px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.marca-item:hover .marca-nombre {
    opacity: 1;
}

/* Controles del carrusel más grandes */
.marcas-control {
    position: absolute;
    top: 70%; /* Ajustar posición vertical para centrar mejor */
    transform: translateY(-50%);
    width: 50px; /* Más grande */
    height: 50px; /* Más grande */
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 18px; /* Tamaño de fuente más grande */
}

.marcas-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.marcas-prev {
    left: 10px;
}

.marcas-next {
    right: 10px;
}

/* Adaptación móvil */
@media (max-width: 768px) {
    .marcas-titulo {
        font-size: 24px;
        margin: 10px 0 5px;
    }
    
    .marca-item {
        width: 220px; /* Aumentado aún más para mejor visibilidad en móviles */
        height: 160px;
    }
    
    .marcas-control {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Garantizamos que no haya espacios adicionales entre elementos */
body .carrusel-container + .marcas-titulo,
body .marcas-titulo + .marcas-carrusel-container {
    margin-top: 0 !important;
}


/* Estilos para main - importante para evitar solapamientos */
main {
    position: relative;
    /* El margen superior se controla desde JavaScript */
    width: 100%;
    z-index: 89; /* Por debajo de los elementos del carrusel */
}

/* Estilos para mostrar marcas en un layout de columnas flexibles en lugar de carrusel */
.marcas-grilla-container {
    display: block;
    margin: 60px 0 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.marcas-grilla {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: flex-start;
}

.marca-item {
    flex: 0 0 280px; /* Tamaño base duplicado para mejor visibilidad */
    height: 220px; /* Altura fija duplicada */
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    text-align: center;
    padding: 8px 12px; /* Padding aumentado proporcionalmente */
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.marca-item img {
    max-width: 100%;
    max-height: 140px; /* Duplicado para dar más espacio al logo */
    height: auto;
    border-radius: 6px;
    margin-bottom: 8px; /* Aumentado el margen proporcionalmente */
    object-fit: contain;
}

.marca-item .marca-nombre {
    display: none; /* Ocultar la descripción del producto bajo el logo */
}

.marca-item:hover,
.marca-item.active {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background-color: #007bff;
    color: white;
}

.marca-item:hover .marca-nombre,
.marca-item.active .marca-nombre {
    display: none; /* Mantener oculto incluso en hover y active */
}

/* Responsive design para la grilla de marcas */
@media (max-width: 768px) {
    .marcas-grilla {
        gap: 6px;
        justify-content: center;
    }
    
    .marca-item {
        flex: 0 0 200px; /* Aumentado para mejor visibilidad en tablets */
        height: 160px; /* Altura aumentada proporcionalmente */
        padding: 6px 10px; /* Padding aumentado proporcionalmente */
    }
    
    .marca-item img {
        max-height: 100px; /* Aumentado para mejor visibilidad en tablets */
    }
    
    .marca-item .marca-nombre {
        font-size: 0.9rem; /* Aumentado para mejor legibilidad en tablets */
        width: 100%; /* Ocupa todo el ancho */
    }
}

@media (max-width: 480px) {
    .marcas-grilla {
        gap: 5px;
    }
    
    .marca-item {
        flex: 0 0 160px; /* Aumentado para mejor visibilidad en móviles pequeños */
        height: 130px; /* Altura aumentada proporcionalmente */
        padding: 4px 8px; /* Padding aumentado proporcionalmente */
    }
    
    .marca-item img {
        max-height: 80px; /* Aumentado para mejor visibilidad en móviles pequeños */
    }
    
    .marca-item .marca-nombre {
        font-size: 0.8rem; /* Aumentado para mejor legibilidad en móviles pequeños */
        width: 100%; /* Ocupa todo el ancho */
    }
}

/* Ocultar los botones de navegación que existían antes */
.marcas-carrusel-container .marcas-prev,
.marcas-carrusel-container .marcas-next {
    display: none !important;
}

/* Estilos para el modal de Términos y Condiciones/Aviso de Confidencialidad */
.terminos-modal {
    display: flex;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.terminos-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.terminos-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 20px auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,0,0,0.1);
    animation-name: animatetop;
    animation-duration: 0.4s;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.terminos-modal.show .terminos-modal-content {
    transform: scale(1);
}

.terminos-modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.terminos-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.terminos-modal-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    background-color: #f8f9fa;
    flex-shrink: 0;
}

.terminos-tab {
    flex: 1;
    padding: 15px 20px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    outline: none;
}

.terminos-tab:hover {
    background-color: #e9ecef;
    color: #343a40;
}

.terminos-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: #fff;
    font-weight: 600;
}

.terminos-modal-close {
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: rgba(255,255,255,0.1);
}

.terminos-modal-close:hover,
.terminos-modal-close:focus {
    background-color: rgba(255,255,255,0.25);
    transform: rotate(90deg);
    text-decoration: none;
    cursor: pointer;
}

.terminos-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    background-color: #fff;
}

.terminos-modal-body::-webkit-scrollbar {
    width: 8px;
}

.terminos-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.terminos-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.terminos-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.terminos-contenido-tab {
    display: none;
}

.terminos-contenido-tab.active {
    display: block;
}

.terminos-contenido {
    color: #333;
    line-height: 1.8;
    font-size: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.terminos-contenido p {
    margin-bottom: 1.2em;
    text-align: justify;
    color: #444;
}

.terminos-contenido p:first-child {
    margin-top: 0;
}

.terminos-contenido strong {
    color: #dc3545;
    font-weight: 700;
}

.terminos-contenido b {
    color: #dc3545;
    font-weight: 700;
}

.terminos-contenido a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid #007bff;
    transition: all 0.2s ease;
}

.terminos-contenido a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.terminos-loading {
    text-align: center;
    padding: 60px 40px;
    color: #666;
    font-size: 16px;
}

.terminos-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.terminos-error {
    text-align: center;
    padding: 60px 40px;
    color: #dc3545;
    font-size: 16px;
}

.terminos-error::before {
    content: '⚠️ ';
    font-size: 24px;
    display: block;
    margin-bottom: 10px;
}

/* Animación del modal */
@keyframes animatetop {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive para el modal */
@media (max-width: 768px) {
    .terminos-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px auto;
        border-radius: 8px;
    }
    
    .terminos-modal-header {
        padding: 15px 20px;
    }
    
    .terminos-modal-header h2 {
        font-size: 1.2em;
    }
    
    .terminos-modal-body {
        padding: 20px 15px;
    }
    
    .terminos-contenido {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .terminos-modal-close {
        width: 32px;
        height: 32px;
        font-size: 28px;
    }
}

.loading-terminos i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive para el modal */
@media (max-width: 768px) {
    .modal-terminos-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px auto;
    }
    
    .modal-terminos-header h2 {
        font-size: 1.2em;
    }
    
    .tab-terminos {
        padding: 12px 10px;
        font-size: 0.9em;
    }
    
    .contenido-termino iframe {
        height: 500px;
    }
}
