body
{
    font-family: 'Noto Sans', sans-serif;
    padding: 0;
    margin: 0;
    background-color: #e7ebf3;
}
@media screen and (max-width: 768px) {
    /* --- ESTRUCTURA BÁSICA --- */
    html, body {
        overflow-x: hidden; /* Evita la barra blanca lateral */
    }

    /* --- BARRA SUPERIOR (nav.barraup) --- */
    .barraup {
        flex-direction: column; /* Apila logo, buscador y carrito */
        align-items: center;
        padding-bottom: 10px;
    }

    nav img {
        margin: 10px auto;
        width: 150px;
        height: 60px;
    }

    .buscador {
        margin-top: 5px; 
        margin-bottom: 10px;
        width: 90%;
        justify-content: center;
    }

    .barra_busqueda {
        width: 70%;
        margin-right: 5px;
    }

    .carro {
        position: absolute;
        top: 15px;
        right: 15px;
        margin-top: 0;
    }
    
    /* --- MENÚ DE NAVEGACIÓN (navbar) --- */
    .navbar {
        width: 100%;
        box-sizing: border-box;
        padding: 0 10px;
      }

    .menu {
        min-width: auto; /* Ancho mínimo para que quepa el menú */
    }

    .dropdown:hover > .submenu {
        display: none; /* Desactiva submenús anidados al pasar el ratón */
    }

    /* --- MOSTRADOR DE PRODUCTO PRINCIPAL (.mostrador) --- */
    .mostrador {
        flex-direction: column; /* ¡CLAVE! Apila la imagen y la información */
        align-items: center;
    }

    .producto {
        flex: none; /* Elimina la regla flex de escritorio */
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    
    #foto {
        margin-left: -3.5em;
        max-height: 700px;
        max-width: 600px;
    }

    /* Ajuste para el botón y texto de información */
    .mostrador > div:nth-child(2) {
        text-align: center; /* Centra el texto de información */
        padding: 0 10px;
    }
    
    /* Ajuste para el botón */
    .agregarcarro {
        padding: 15px 30px; /* Reduce el tamaño del botón */
        font-size: 1em;
    }

    /* --- PRODUCTOS MÁS BUSCADOS (productosbusc) --- */
    .productlist {
        display: flex;
        flex-direction: row; /* Mantiene la fila horizontal */
        flex-wrap: nowrap;
        overflow-x: auto; /* Permite scroll horizontal dentro de la lista */
        padding: 10px 0;
        justify-content: flex-start;
    }

    .animexpo {
        margin: 0px 50px 0px 0px; /* Espaciado entre los productos */
        width: 150px; /* Ancho fijo para cada producto */
        min-width: 150px; /* Asegura que no se achique */
        height: auto;
    }
    
    /* Desactivar animación de escala en táctil */
    .animexpo:hover {
        transform: none;
    }

    /* --- FOOTER --- */
    footer {
        flex-direction: column; /* Apila las secciones del footer */
        align-items: center;
        padding: 15px 0;
    }

    .socialmedia {
        padding: 10px 0;
        justify-content: center;
        width: 100%;
    }
    
    .Secciones {
        flex-direction: column; /* Apila las listas de enlaces */
        width: 100%;
        align-items: center;
    }

    .Secciones ul {
        margin-bottom: 10px;
        text-align: center;
    }

    .Secciones ul li h4 {
        margin: 0 0 5px 0;
    }

    .copyright {
        text-align: center;
    }
}
nav
{
    background-color: #16366d;
}
main
{
  padding: 10px;
}
nav img
{
  margin-left: 25px;
  margin-top: 10px;
  width: 200px;
  height: 80px;
  transition: 0.5s;
}
nav img:hover
{
  
  filter: drop-shadow(0 0 5px rgb(250, 250, 250));
  transition: 0.5s;
}
.navbar
{
    background-color: #16366d;
}
.menu
  {
    font-family: 'Noto Sans', 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);
    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 {
    display: block;
    padding: 10px 15px;
    color: rgb(255, 255, 255);
    text-decoration: none;
    white-space: nowrap;
  }

  .submenu li a:hover {
    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
{
    height: 25px;
    width: 250px;
    border-radius: 15px;
    border-style: none;
}
.carro
{
  margin-right: 25px;
    margin-top: 30px;
    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));
}
#foto
{
  width: 500px;
  height: 500px;
}
.agregarcarro
{
  font-family: 'Noto Sans', sans-serif;
  border: none;
  background-color: cadetblue;
  color: white;
  cursor: pointer;
  padding: 20px 60px 20px 60px;
  border-radius: 10px;
}
.agregarcarro:hover
{
  transition: 0.5s;
  background-color: rgb(36, 84, 121);
}
.agregarcarro:active
{
  transition: 0s;
  padding: 18px 58px 18px 58px;
  background-color: rgb(35, 60, 78);
  transform: translateX(2px) translateY(2px);
}
.mostrador
{
  display: flex;
}
.productexp
{
  background-color: #10264d;
  padding: 175px 5px 0px 5px;
  border-radius: 15px;
}
.producto
{
  flex: 1;
}
#valorContador
{
  color: white;
  display: flex;
  justify-content: center;
  position: absolute;
  z-index: 10;
  transform: translateX(-6px) translateY(-8px);
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 50%;
  background-color: red;
}
footer
{
    background-color: #16366d;
}
.socialmedia
{
  display: flex;
  padding-top: 25px;
  padding-bottom: 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.5s;
}
.fa-square-facebook:hover
{
  transition: 0.5s;
  color: #0545da;
  filter: drop-shadow(0 0 5px rgb(250, 250, 250));
}
.fa-instagram
{
  color: #ffffff;
  transition: 0.5s;
}
.fa-instagram:hover
{
  transition: 0.5s;
  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;
}
.contenedorterm
{
  display: flex;
  flex-direction: row;
}
#termo
{
  width: 200px;
  height: 200px;
}
.animexpo
{
  margin-right: 6em;
  width: 210px;
  height: auto;
  transition: 0.3s;
}
.animexpo:hover
{
  transition: 0.3s;
  transform: scale(1.05);
}
.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: 10px;
    cursor: pointer;
    z-index: 100;
}

/* 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: "Noto Sans", 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;
}

/* ========================================================================= */
/* MEJORAS ESPECÍFICAS PARA PÁGINA DE COMPRA */
/* ========================================================================= */

/* Clase específica para la información del producto */
.producto-info {
    text-align: left;
    padding: 0 20px;
}

/* Mejora para el contador del carrito en móvil */
#valorContador {
    font-size: 0.8em;
    padding: 2px 6px;
    transform: translateX(-8px) translateY(-8px);
}

/* ========================================================================= */
/* MEDIA QUERIES - RESPONSIVE */
/* ========================================================================= */

@media screen and (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* --- BARRA SUPERIOR CORREGIDA --- */
    .menu-hamburger {
        display: block;
        z-index: 100;
        position: relative;
    }
    
    .navbar .menu {
        display: none;
    }
    
    .buscador {
        display: none;
    }
    
    .barraup {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        position: relative;
        min-height: 70px;
    }
    
    nav img {
        margin: 0;
        width: 140px;
        height: 55px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
    }
    
    .carro {
        margin: 0;
        order: 3;
        position: relative;
        z-index: 100;
        transform: translateY(-1em);
    }
    
    /* --- MOSTRADOR DE PRODUCTO --- */
    .mostrador {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    
    .producto {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    
    #foto {
        width: 100%;
        max-width: 400px;
        height: auto;
        margin: 0 auto;
        display: block;
    }
    
    .producto-info {
        width: 100%;
        padding: 0 10px;
        text-align: center;
    }
    
    .agregarcarro {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    /* --- PRODUCTOS MÁS BUSCADOS CORREGIDO --- */
    .productosbusc {
        padding: 20px 10px;
    }
    
    .productosbusc h2 {
        text-align: center;
        margin-bottom: 20px;
        font-size: 1.4em;
    }
    
    .productlist {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 15px 10px;
        justify-content: flex-start;
        gap: 20px;
        scrollbar-width: thin;
        scrollbar-color: #16366d #e7ebf3;
    }
    
    .productlist::-webkit-scrollbar {
        height: 8px;
    }
    
    .productlist::-webkit-scrollbar-track {
        background: #e7ebf3;
        border-radius: 10px;
    }
    
    .productlist::-webkit-scrollbar-thumb {
        background: #16366d;
        border-radius: 10px;
    }
    
    .animexpo {
        flex: 0 0 auto;
        width: 250px;
        min-width: 250px;
        height: auto;
        margin: 0;
    }
    
    .productexp {
        background-color: #10264d;
        padding: 40px 20px 20px 20px;
        border-radius: 15px;
        display: block;
        text-align: center;
        height: 100%;
        box-sizing: border-box;
    }
    
    #calefon {
        width: 100%;
        max-width: 180px;
        height: auto;
        margin: 0 auto;
        display: block;
    }
    
    /* --- FOOTER MÓVIL --- */
    footer {
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
    }
    
    .socialmedia {
        padding: 10px 0;
        justify-content: center;
        width: 100%;
    }
    
    .Secciones {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }
    
    .Secciones ul {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .copyright {
        text-align: center;
        margin-top: 15px;
    }
}