/* Estilos Globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif; /* Fuente más moderna */
    background: #f8f8f8; /* Gris más claro */
    color: #333;
    line-height: 1.6;
}

/* Contenedor Principal (para el contenido central, como promociones) */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 1.5rem; /* Ajuste para mayor espacio */
}

/* Main Header (donde está el logo, buscador y accesos de usuario) */
.main-header {
    background: white;
    padding: 1rem 1.5rem; /* Ajuste padding */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    /* ELIMINADO: border-bottom: 1px solid #e0e0e0; */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Sombra sutil */
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 8px; /* Menos espacio */
}
.logo {
    height: 60px; /* Tamaño ajustado */
}
.brand-title {
    font-size: 22px; /* Más grande */
    font-weight: 700; /* Más audaz */
    color: #003366;
    text-transform: uppercase; /* Para un look más de marca */
}

/* Search Bar */
.center {
    display: flex;
    align-items: center;
    margin-top: 0; /* No margin-top en desktop */
    gap: 0;
    position: relative;
    flex-grow: 1; /* Permitir que crezca */
    max-width: 400px; /* Limitar ancho */
    margin: 0 20px; /* Margen a los lados */
}
.center input {
    padding: 12px 15px; /* Más padding */
    border-radius: 8px 0 0 8px; /* Bordes redondeados */
    border: 1px solid #c9c9c9; /* Borde más suave */
    width: 100%;
    font-size: 15px;
    outline: none; /* Quitar contorno al enfocar */
    transition: border-color 0.3s ease;
}
.center input:focus {
    border-color: #007BFF;
}
.center button {
    padding: 12px 20px; /* Más padding */
    border: none;
    background: #007BFF;
    color: white;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}
.center button:hover {
    background: #0056b3;
}
#sugerencias {
    position: absolute;
    top: 100%; /* Debajo del input */
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    z-index: 9999;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}
#sugerencias div {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 15px;
    color: #555;
    transition: background 0.2s ease, color 0.2s ease;
}
#sugerencias div:hover {
    background: #f0f8ff;
    color: #0056b3;
}

/* Right Section Header (iconos de usuario/carrito) */
.right {
    display: flex;
    align-items: center;
    gap: 20px; /* Más espacio */
}
.right a {
    font-size: 24px; /* Iconos más grandes */
    color: #007BFF;
    transition: color 0.3s ease, transform 0.3s ease;
}
.right a:hover {
    color: #0056b3;
    transform: translateY(-2px); /* Pequeña elevación */
}

/* Nav Bar (barra de navegación principal con categorías y enlaces) */
.nav-bar {
    background: #e8f0ff; /* Fondo azul claro */
    padding: 0.8rem 1.5rem; /* Más compacto */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); /* Sombra muy sutil */
}

/* Dropdown Categorias */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropbtn {
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}
.dropbtn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 250px; /* Un poco más ancho */
    box-shadow: 0px 4px 12px rgba(0,0,0,0.15); /* Sombra más definida */
    z-index: 100; /* Asegurar que esté por encima */
    border-radius: 8px; /* Bordes redondeados */
    overflow: hidden;
    padding: 5px 0; /* Pequeño padding interno */
}

.dropdown-content a {
    color: #0056b3;
    padding: 12px 18px; /* Más padding */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease;
}
.dropdown-content a:hover {
    background: #f0f8ff; /* Fondo más suave al hover */
    color: #003366;
}
.dropdown-content a i {
    font-size: 18px;
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* Nav Links (enlaces de navegación como Home, Información, Contacto, Finalizar Compra) */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 25px; /* Más espacio entre links */
    align-items: center;
    margin-top: 0; /* No margin-top en desktop */
}
.nav-links a {
    color: #0056b3;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Más espacio icono-texto */
    font-size: 16px;
    transition: color 0.3s ease, transform 0.2s ease;
}
.nav-links a:hover {
    color: #003366;
    transform: translateY(-1px);
}

/* Slider (carrusel de imágenes) */
.slider {
    width: 100%;
    height: 450px; /* Altura ajustada */
    overflow: hidden;
    position: relative;
    margin-top: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Sombra para el slider */
    border-radius: 10px; /* Bordes redondeados */
}

.slides {
    display: flex;
    width: 100%;
    height: 100%; /* Asegurar que ocupe toda la altura */
    animation: slide 20s infinite;
}

.slides .slide {
    flex: 0 0 100%;
    height: 100%; /* Asegurar que ocupe toda la altura */
}

.slides img {
    width: 100%;
    height: 100%; /* Ocupar el 100% del contenedor slide */
    object-fit: cover; /* Recortar imagen para cubrir el área */
    border-radius: 10px; /* Bordes redondeados */
}

@keyframes slide {
    0%, 20% { transform: translateX(0); }
    25%, 45% { transform: translateX(-100%); }
    50%, 70% { transform: translateX(-200%); }
    75%, 95% { transform: translateX(-300%); }
    100% { transform: translateX(0); }
}

/* Promociones Section (productos destacados en la home) */
.promociones {
    background: white;
    padding: 2.5rem; /* Más padding */
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0,0,0,0.08); /* Sombra más definida */
    margin-top: 3rem;
}
.promociones h2 {
    color: #003366; /* Color de marca */
    margin-bottom: 2rem; /* Más espacio */
    font-size: 2rem; /* Más grande */
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}
.promociones h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 3px;
    background-color: #007BFF; /* Línea decorativa */
    border-radius: 2px;
}

.promos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Más espacio */
    gap: 2.5rem; /* Más espacio */
}

.card {
    background: #fdfdfd;
    border-radius: 12px; /* Más redondeado */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); /* Sombra más pronunciada */
    padding: 1.5rem; /* Más padding */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Para flexbox interno */
    flex-direction: column;
    justify-content: space-between;
}
.card:hover {
    transform: translateY(-7px); /* Más elevación */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* Sombra más intensa */
}
.card img {
    max-width: 100%;
    height: 180px; /* Altura fija para la imagen */
    object-fit: contain; /* Para que la imagen no se distorsione */
    margin-bottom: 1rem;
    border-radius: 8px;
}
.card .precio {
    font-weight: bold;
    color: #003366;
    margin-top: 0.8rem;
    font-size: 1.3rem; /* Precio más grande */
}
.card .nombre {
    font-size: 1.1rem;
    color: #555;
    margin-top: 0.5rem;
    word-wrap: break-word; /* Romper palabras largas */
}

/* Footer */
.footer {
    background: #1a1a1a; /* Gris oscuro casi negro */
    color: white;
    padding: 3rem 1.5rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem; /* Más espacio */
}

.footer .column {
    flex: 1 1 250px; /* Ajuste para columnas */
    padding: 0 1rem; /* Pequeño padding interno */
}

.footer h4 {
    margin-bottom: 1.2rem; /* Más espacio */
    color: #fff;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 8px; /* Más padding */
    font-size: 1.2rem;
}

.footer ul {
    list-style: none;
    padding: 0;
}
.footer ul li {
    margin-bottom: 10px; /* Más espacio */
}

.footer ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 15px;
}
.footer ul li a:hover {
    color: #007BFF;
}

.social-icons a {
    margin-right: 15px; /* Más espacio */
    font-size: 24px; /* Iconos más grandes */
    color: white;
    transition: color 0.3s ease;
}
.social-icons a:hover {
    color: #007BFF;
}

.newsletter input {
    padding: 10px; /* Más padding */
    border-radius: 6px; /* Más redondeado */
    border: none;
    width: calc(70% - 5px); /* Ajuste */
    margin-right: 8px; /* Más espacio */
    font-size: 15px;
}
.newsletter button {
    padding: 10px 15px;
    background: #007BFF;
    border: none;
    color: white;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.newsletter button:hover {
    background: #0056b3;
}
.footer p {
    font-size: 15px;
    margin-bottom: 10px;
    color: #ccc;
}
.footer .logo-footer {
    height: 80px; /* Logo más grande */
    margin-bottom: 15px;
}

.bottom-bar {
    text-align: center;
    color: #aaa; /* Color más claro */
    padding-top: 2.5rem; /* Más padding */
    font-size: 13px;
    border-top: 1px solid #333; /* Separador sutil */
    margin-top: 2rem;
}

/* ================================
   Responsive Design (ajustes para pantallas más pequeñas)
   ================================ */

/* Para pantallas pequeñas (móviles) */
@media (max-width: 768px) {
    /* La .top-bar ya ha sido eliminada del HTML y CSS. */

    .main-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 1rem; /* Menos padding */
    }
    .logo-wrap {
        width: 100%;
        justify-content: center;
    }
    .brand-title {
        font-size: 18px;
    }
    .logo {
        height: 50px; /* Logo más pequeño en móvil */
    }

    .center {
        flex-direction: row;
        width: 100%;
        margin: 0; /* Sin margen */
        max-width: 100%; /* Ocupar todo el ancho disponible */
    }
    .center input {
        width: calc(100% - 50px); /* Ajuste para el botón de búsqueda */
        border-radius: 5px 0 0 5px;
    }
    .center button {
        border-radius: 0 5px 5px 0;
        padding: 10px 15px;
    }

    .right {
        justify-content: center;
        gap: 25px; /* Más espacio */
        width: 100%;
        margin-top: 10px;
    }
    .right a {
        font-size: 26px; /* Iconos un poco más grandes */
    }

    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 1rem;
    }
    .dropdown {
        width: 100%;
    }
    .dropbtn {
        width: 100%;
        font-size: 14px;
        padding: 10px 15px;
    }
    .dropdown-content {
        min-width: 100%; /* Ocupar todo el ancho */
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 12px; /* Más compacto */
    }
    .nav-links a {
        font-size: 15px;
        width: 100%; /* Para que los enlaces ocupen todo el ancho */
        padding: 5px 0; /* Pequeño padding vertical */
    }

    .slider {
        height: 280px; /* Altura más pequeña para móviles */
        margin-top: 1.5rem;
    }

    .container {
        padding: 1rem; /* Menos padding en móvil */
    }

    .promociones {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    .promociones h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .promos {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* 2 columnas en móvil */
        gap: 1.5rem;
    }
    .card {
        padding: 1rem;
    }
    .card img {
        height: 120px;
    }
    .card .precio {
        font-size: 1.1rem;
    }
    .card .nombre {
        font-size: 0.95rem;
    }

    .footer {
        padding: 2rem 1rem 1.5rem;
        margin-top: 3rem;
    }
    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }
    .footer .column {
        padding: 0;
        text-align: center;
    }
    .footer h4 {
        margin-bottom: 1rem;
        text-align: center;
        border-bottom: none; /* Quitar borde */
        padding-bottom: 0;
    }
    .footer .column ul {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrar enlaces */
    }
    .footer ul li {
        margin-bottom: 8px;
    }
    .social-icons {
        margin-top: 15px;
        text-align: center;
    }
    .newsletter input {
        width: calc(100% - 10px); /* Ajuste */
        margin-bottom: 10px;
        margin-right: 0;
    }
    .newsletter button {
        width: 100%;
    }
    .bottom-bar {
        padding-top: 1.5rem;
        margin-top: 1.5rem;
        font-size: 12px;
    }
}

/* Para tabletas */
@media (min-width: 769px) and (max-width: 1024px) {
    .container, .main-header, .nav-bar, .footer { /* Ajuste: .top-bar ya no existe */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .center {
        max-width: 350px;
        margin: 0 10px;
    }
    .promos {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.5rem;
    }
    .slider {
        height: 350px;
    }
}

footer a {
  color: #9e9e9e; /* Un color gris claro, puedes cambiarlo por el que quieras */
  text-decoration: none; /* Quita el subrayado */
}

footer a:hover {
  color: #ffffff; /* El enlace se vuelve blanco al pasar el mouse */
}