.varela-round-regular {
  font-family: "Varela Round", sans-serif;
  font-weight: 400;
  font-style: normal;
}
@media screen and (max-width: 768px) {
  html, body {
      /* Evita que el contenido pueda forzar un ancho mayor al de la ventana */
      overflow-x: hidden; 
      width: 100%;
      margin: 0;
      padding: 0;
  }
  /* ========================================================================= */
  /* BARRA SUPERIOR (nav.barraup) */
  /* ========================================================================= */
  .barraup {
        flex-direction: column; /* Apila los elementos verticalmente */
        align-items: center; /* Centra los elementos */
        padding-bottom: 10px;
    }

    nav img {
        margin: 10px auto; /* Centra el logo */
        width: 150px; /* Reduce el tamaño del logo */
        height: 60px;
    }

    .buscador {
        margin-top: 5px; 
        margin-bottom: 10px;
        display: flex; /* Para alinear el botón y la barra de búsqueda */
        justify-content: center;
        width: 100%; /* Ocupa todo el ancho disponible */
    }

    .barra_busqueda {
        width: 70%; /* Le da un ancho relativo */
        margin-right: 5px; /* Ajusta el margen que tenías */
        /* Eliminamos el '8em' de margen derecho que era para pantallas grandes */
    }
    
    .boton_busca {
        margin-right: 0; /* Elimina margen innecesario */
    }

    .carro {
        position: absolute; /* Posiciona el carrito en una esquina */
        top: 15px;
        right: 15px;
        margin-top: 0;
    }

    /* ========================================================================= */
    /* BARRA DE NAVEGACIÓN (navbar y menu) */
    /* ========================================================================= */
    .navbar {
        width: 100%;
        box-sizing: border-box;
        padding: 0 10px;
    }

    .menu {
        justify-content: flex-start; /* Alinea los ítems a la izquierda */
        min-width: auto; /* Asegura que el menú tenga un ancho mínimo */
    }

    .submenu {
        position: static; /* Los submenús ya no se superponen, sino que ocupan el espacio normal del flujo del documento */
        min-width: 100%;
        border-radius: 0;
    }
    
    .dropdown:hover > .submenu {
        display: none; /* Desactivar los submenús anidados al pasar el ratón */
    }

    /* Opcional: Para una navegación más usable en móvil, podrías considerar ocultar los submenús y mostrarlos con JavaScript al hacer click. */
    /* Como alternativa simple, los ítems de menú se expanden en la versión móvil */

    .subderecha {
        top: auto;
        left: auto;
    }


    /* ========================================================================= */
    /* PRODUCTOS (ofertas y destacados) */
    /* ========================================================================= */
    main {
        padding: 10px; /* Reduce el padding general */
    }

    /* Reglas para mantener la lista horizontal y con scroll */
    .productlist { 
        display: flex; /* Asegura que se mantengan en fila */
        flex-direction: row; /* Explícitamente horizontal */
        flex-wrap: nowrap; /* Evita que los ítems salten a una nueva línea */
        overflow-x: auto; /* ¡CLAVE! Permite el desplazamiento horizontal */
        padding-bottom: 10px;
        justify-content: flex-start; /* Alinea al inicio */
    }
    
    /* Reglas para los contenedores de producto individuales */
    .animexpo {
        margin: 10px 0;
        /* Cambia el 90% a un valor menor, por ejemplo 60% o 70% */
        width: 65%; /* Estrecha el contenedor azul */
        max-width: 300px; 
        height: auto;
        transition: 0.3s;
    }
    
    /* El único producto de OFERTA puede seguir apilándose verticalmente */
    .ofertas .animexpo {
        flex-direction: column;
        align-items: center;
        margin: 10px auto;
    }
    
    /* Ajustes para las imágenes dentro de los productos */
    #termo, #calefon {
        width: 100%; /* La imagen ocupa el ancho del contenedor .productexp */
        height: auto; 
        max-width: 160px; /* Limita el tamaño de la imagen */
    }
    
    #calefon {
        margin-top: 1em; 
    }

    .animexpo:hover {
        transform: none; /* Desactiva el efecto de escala en táctil */
    }

    /* ========================================================================= */
    /* CARRUSEL */
    /* ========================================================================= */
    /* No se requieren cambios en el carrusel, ya que usa ancho 100% y CSS keyframes */


    /* ========================================================================= */
    /* FOOTER */
    /* ========================================================================= */
    footer {
        flex-direction: column; /* Apila las secciones verticalmente */
        align-items: center;
        padding: 15px 0;
    }

    .socialmedia {
        padding: 10px 0;
        justify-content: center;
    }
    
    .facebook, .instagram {
        margin: 0 10px; /* Espacio entre íconos */
    }
    
    .fa-square-facebook, .fa-instagram {
        margin-left: 0;
    }

    .Secciones {
        flex-direction: column; /* Apila las listas de enlaces */
        width: 100%;
        align-items: center;
    }

    .Secciones ul {
        margin-bottom: 20px;
        text-align: center;
    }

    .Secciones ul li h4 {
        margin: 0 0 10px 0;
    }
    
    .copyright {
        text-align: center;
        margin-top: 15px;
    }
}
body
{
  font-family: "Varela Round", sans-serif;
  padding: 0;
  margin: 0;
  background-color: #e7ebf3;
}
nav
{
  background-color: #16366d;
}
nav img
{
  margin-left: 25px;
  margin-top: 10px;
  width: 200px;
  height: 80px;
}
.navbar {
  background-color: #16366d;
}
.menu
{
  font-family: "Varela Round", sans-serif;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.menu > li
  {
    position: relative;
  }

  .menu > li > a
  {
    display: block;
    padding: 12px 20px;
    color: rgb(255, 255, 255);
    transition: 0.5s;
    text-decoration: none;
  }
  
  .menu > li > a:hover
  {
    border-radius: 8px;
    transition: 0.5s;
    background: #0b1c38;
    color: rgb(104, 104, 104);
  }
  
  /* Submenús ocultos inicialmente */
  .submenu {
    display: none;           /* se ocultan de entrada */
    position: absolute;
    top: 100%;
    left: 0;
    background: #102850;
    min-width: 180px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }
  
  /* Ítems dentro del submenú */
  .submenu li a {
    transition: 0.5s;
    display: block;
    padding: 10px 15px;
    color: rgb(255, 255, 255);
    text-decoration: none;
    white-space: nowrap;
  }
  
  .submenu li a:hover {
    transition: 0.5s;
    border-radius: 8px;
    background: #112b57;
  }

  /* Mostrar submenú al pasar el mouse */
  .dropdown:hover > .submenu {
    display: block;
  }

  /* Submenú en cascada hacia la derecha */
  .subderecha {
    top: 0;
    left: 100%;
  }
  .barraup
  {
    display: flex;
    justify-content: space-between;

  }
.barra_inicio
{
    background-color: #16366d;
}
.boton_busca
{
    margin-right: 5px;
    height: 28px;
    width: 28px;
    border-radius: 25px;
    border-style: none;
}
.boton_busca:hover
{
    transition: 0.5s;
    color:white;
    background-color: #0545da;
}
.buscador
{
    margin-top: 35px; 
}
.barra_busqueda
{
  margin-right: 8em;
    height: 25px;
    width: 250px;
    border-radius: 15px;
    border-style: none;
}
.carro
{
    margin-right: 25px;
    margin-top: 45px;
    color: white
}
.carro:hover
{
    transition: 0.5s;
    color:#0545da
}
.barra_inicio img
{
    width: 200px;
    height: 80px;
    filter: drop-shadow(0 0 5px rgb(250, 250, 250));
}
main
{
  padding: 0 15px 15px 15px;
}
#termo
{
  width: 200px;
  height: 200px;
}
#calefon
{
  width: 200px;
  height: 160px;
  margin-top: 2.5em;
}
.productexp
{
  background-color: #10264d;
  padding: 175px 5px 0px 5px;
  border-radius: 15px;
}
.animexpo
{
  margin-right: 10px;
  width: 210px;
  height: auto;
  transition: 0.3s;
}
.animexpo:hover
{
  transition: 0.3s;
  transform: scale(1.05);
}

footer
{
    background-color: #16366d;
}
.socialmedia
{
    display: flex;
    padding-top: 25px;
    padding-bottom: 25px;
    padding-right: 25px;
}
.facebook
{
    margin-right: 15px;
}
.icono-social
{
    font-size: 3em;
    margin-right: 15px;
    transition: color 0.3s;
}
.fa-square-facebook
{
    margin-left: 20px;
    color: #ffffff;
    transition: 0.3s;
}
.fa-square-facebook:hover
{
    transition: 0.3s;
    color: #0545da;
    filter: drop-shadow(0 0 5px rgb(250, 250, 250));
}
.fa-instagram
{
    color: #ffffff;
    transition: 0.3s;
}
.fa-instagram:hover
{
    transition: 0.3s;
    color: #ff0095;
    filter: drop-shadow(0 0 5px rgb(250, 250, 250));
}
.Secciones
{
  display: flex;
  justify-content: center;
}
.Secciones ul
{
  padding-left: 0px;
}
.Secciones ul li
{
  margin-bottom: 10px;
  list-style: none;
}
.Secciones ul li h4
{
  margin-right: 8px;
  margin-left: 20px;
  color: white;
}
.Secciones ul li a
{
  margin-right: 8px;
  margin-left: 8px;
  color: white;
  transition: 0.5s;
  text-decoration: none;
}
.Secciones ul li a:hover
{
  margin-left: 0px;
  margin-right: 0px;
  padding: 8px;
  color: grey;
  transition: 0.5s;
  border-radius: 10px;
  background-color: #0b1c38;
}
.copyright
{
  color: white;
}
footer
{
  justify-content: space-around;
  display: flex;
  flex-wrap: nowrap;
}
.carousel 
{
  width: 100%;
  overflow: hidden;
  position: relative;
}
.slides 
{
  display: flex;
  animation: slide 12s infinite;
}
.slide 
{
  width: 100%;
  flex-shrink: 0;
}
.slide img 
{
  width: 100%;
  display: block;
}
@keyframes slide 
{
  0% { transform: translateX(0); }
  30% { transform: translateX(0); } 
  
  33% { transform: translateX(-100%); }
  63% { transform: translateX(-100%); }
  
  66% { transform: translateX(-200%); }
  96% { transform: translateX(-200%); }
  
  /* Esto es el salto instantáneo de vuelta al inicio */
  100% { transform: translateX(0); } 
}
.productlist
{
  display: flex;
  flex-direction: row;
}

/* ========================================================================= */
/* MENÚ FULL-SCREEN PARA MÓVIL */
/* ========================================================================= */

/* Botón hamburguesa - solo visible en móvil */
.menu-hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    padding: 15px;
    cursor: pointer;
    margin-right: 10px;
}

/* Full-Screen Menu */
.menu-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #16366d 0%, #0b1c38 100%);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.menu-fullscreen.active {
    display: flex;
}

.close-menu {
    align-self: flex-end;
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    padding: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-menu:hover {
    color: #0545da;
}

.menu-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Logo en full-screen */
.fullscreen-logo {
    text-align: center;
    margin-bottom: 20px;
}

.fullscreen-logo img {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Búsqueda en full-screen */
.fullscreen-search {
    display: flex;
    margin: 20px 0;
    background: white;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-input-full {
    flex: 1;
    border: none;
    background: none;
    padding: 15px 20px;
    font-size: 1.1em;
    outline: none;
    font-family: "Varela Round", sans-serif;
}

.search-btn-full {
    background: #0545da;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn-full:hover {
    background: #033099;
}

/* Navegación full-screen */
.fullscreen-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 20px 0;
}

.nav-item {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    padding: 18px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    border-radius: 8px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.nav-item i:first-child {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.accordion-arrow {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

/* Submenús acordeón */
.nav-submenu {
    display: none;
    padding-left: 20px;
    background: rgba(11, 28, 56, 0.5);
    border-radius: 8px;
    margin: 5px 0;
}

.nav-submenu.active {
    display: flex;
    flex-direction: column;
}

.nav-submenu a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 15px 20px;
    font-size: 1.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.nav-submenu a:last-child {
    border-bottom: none;
}

.nav-submenu a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding-left: 25px;
}

.nav-submenu a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Información de contacto */
.contact-info {
    margin-top: 30px;
    color: white;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 25px;
}

.contact-info h4 {
    margin-bottom: 15px;
    color: #0545da;
    font-size: 1.2em;
}

.contact-info p {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1em;
}

/* Redes sociales en full-screen */
.fullscreen-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.fullscreen-social a {
    color: white;
    font-size: 1.8em;
    transition: all 0.3s;
}

.fullscreen-social a:hover {
    transform: translateY(-3px);
}

.fullscreen-social .fa-square-facebook:hover {
    color: #0545da;
}

.fullscreen-social .fa-instagram:hover {
    color: #ff0095;
}

/* ========================================================================= */
/* MEDIA QUERIES - RESPONSIVE */
/* ========================================================================= */

@media screen and (max-width: 768px) {
    /* Mostrar botón hamburguesa en móvil */
    .menu-hamburger {
        display: block;
        order: 1;
        margin: 0;
    }
    
    /* Ocultar menú original en móvil */
    .navbar .menu {
        display: none;
    }
    
    /* Ocultar barra de búsqueda original en móvil */
    .buscador {
        display: none;
    }
    
    /* Reorganizar barra superior */
    .barraup {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        position: relative;
    }
    
    nav img {
        margin: 0;
        width: 140px;
        height: 55px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .carro {
        margin: 0;
        order: 3;
    }
    
    /* Asegurar que el contenido no se desborde */
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* Para tablets más grandes */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .menu-hamburger {
        display: none; /* Seguir mostrando menú normal en tablet */
    }
}

/* Para desktop - asegurar que el full-screen no interfiera */
@media screen and (min-width: 769px) {
    .menu-fullscreen {
        display: none !important;
    }
    
    .menu-hamburger {
        display: none;
    }
}