@import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Roboto:wght@700&display=swap');

body {
    font-family: 'Open Sans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #f4f4f4;
    color: #161c3c;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

header img {
    margin-left: 20px;
}

.header-content {
    flex-grow: 1;
    text-align: center;
}

header h1 {
    margin: 0;
    padding: 0;
}

/* Barra de navegación */
nav {
    background: linear-gradient(90deg, #00cfff 0%, #7b6fff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav button {
    background-color: transparent;
    color: white;
    border: none;
    padding: 14px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
    border-radius: 4px;
}

nav button:hover {
    background-color: rgba(255,255,255,0.15);
    color: #fff;
}

footer {
    background: linear-gradient(90deg, #00cfff 0%, #7b6fff 100%);
    color: white;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

footer p {
    margin: 0;
    padding: 0;
    font-size: 14px;
}

/* Estilos para el botón de redirección en el header */
.redirect-button {
    height: 100%;
    aspect-ratio: 1 / 1;
    background-color: #00b7ff;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.redirect-button img {
    width: 70%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Estilos para los carruseles */
.carrusel-container {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    max-width: 100%; /* Asegúrate de que el contenedor ocupe todo el ancho disponible */
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden; /* Añade esto para que la barra de desplazamiento no afecte el layout general */
}

.carrusel {
    display: flex; /* Alinea los productos en una fila */
    overflow-x: hidden;      /* Oculta la barra horizontal */
    overflow-y: visible;
    white-space: nowrap;
    position: relative;
    height: auto;
    max-height: none;
    scrollbar-width: none;   /* Firefox */
    padding: 10px; /* Añade un poco de espacio interno */
    gap: 10px; /* Espacio entre los productos */
    scroll-behavior: smooth; /* Para un desplazamiento suave (opcional) */
    -webkit-overflow-scrolling: touch; /* Mejora el desplazamiento en iOS */
}

.carrusel::-webkit-scrollbar {
    display: none;           /* Chrome, Safari, Edge */
}

.carrusel .producto,
.producto-link .producto {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    height: 320px;
    min-height: 320px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.5s;
}

.carrusel .producto img {
    max-width: 100%;
    border-radius: 5px;
    max-height: 150px; /* Ajusta la altura máxima de las imágenes si es necesario */
    object-fit: contain; /* Asegura que la imagen se ajuste dentro del contenedor sin recortar */
}

.carrusel .producto h3,
.producto-link .producto h3 {
    font-size: 1.1em;
    margin: 8px 0 4px 0;
    font-weight: bold;
    min-height: 40px;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.carrusel .producto p,
.producto-link .producto p {
    font-size: 0.95em;
    color: #444;
    min-height: 38px;
    max-height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    text-overflow: ellipsis;
    white-space: normal;
    margin: 0 0 6px 0;
    width: 100%;
}

.carrusel .producto .precio {
    background: linear-gradient(90deg, #00cfff 0%, #7b6fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

.filtro {
    float: left;
    width: 20%;
    padding: 20px;
}

.producto h3 a {
    text-decoration: none; /* Elimina el subrayado */
    color: #333; /* Cambia el color a un tono neutro */
    font-weight: bold;
}

.producto h3 a:hover {
    color: #00b7ff; /* Color diferente al pasar el mouse */
}

.filtro-button {
    display: block;
    margin: 10px 0;
    text-align: center;
}

.filtro-button img {
    width: 50px;
    height: 50px;
}

.productos {
    float: right;
    width: 75%;
}

.producto {
    border: 1px solid #ddd;
    padding: 20px;
    margin: 10px;
    display: inline-block;
    width: calc(25% - 40px);
    vertical-align: top;
    background: #fffdf7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.productos .producto img { /* Especifica el selector para evitar conflictos */
    width: 100%;
    height: auto;
    max-height: 200px; /* Reduje la altura máxima para consistencia */
    object-fit: cover;
    border-radius: 5px;
}

.productos .producto h3 {
    margin: 10px 0;
    color: #555;
    font-size: 1em; /* Reduce el tamaño del título para consistencia */
}

.productos .producto p {
    color: #666;
    font-size: 0.9em;
}

.productos .producto .precio {
    background: linear-gradient(90deg, #00cfff 0%, #7b6fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

.button {
    display: inline-block;
    padding: 12px 25px;
    margin: 20px auto;
    color: #fff;
    background: #00b7ff;
    text-decoration: none;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    transition: background 0.3s;
}

.button:hover {
    background: #6464ac;
}

.search-form {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    width: 650px;
    margin: 0 auto;
}

.search-form input[type="text"] {
    padding: 5px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    flex: 1;
}

.search-form button {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #ddd;
    background-color: #00b7ff;
    color: white;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.search-form button:hover {
    background-color: #6464ac;
}

.container {
    text-align: center;
}

.pagination-container {
    clear: both;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination-link {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    background-color: #f4f4f4;
    text-decoration: none;
    color: #333;
}

.pagination-link:hover {
    background-color: #ddd;
}
.pagination-link.active {
    background-color: #333;
    color: #fff;
    border-color: #333;
}
.pagination .arrow {
    font-size: 20px;
    padding: 10px 15px;
    margin: 0 5px;
    text-decoration: none;
    color: #333;
}
.pagination .arrow:hover {
    background-color: #ddd;
}
/* Estilos para las sugerencias en el buscador */
.suggestions {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    width: 600px; /* Ajustar según tu diseño */
    margin: 0 auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

/* Nuevos estilos sugeridos */
a.producto-link,
.producto-link {
    text-decoration: none !important;
    color: inherit !important;
    display: inline-block;
    width: 220px; /* Igual que .carrusel .producto */
    vertical-align: top;
}

.producto-link .producto {
    cursor: pointer;
}

.producto-link:hover .producto,
.producto-link:focus .producto {
    box-shadow: 0 4px 16px rgba(0,183,255,0.18), 0 2px 8px rgba(100,100,172,0.12);
    transform: translateY(-4px) scale(1.03);
}

.producto-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    width: 240px;      /* Ajusta el ancho según tu diseño */
    vertical-align: top;
    margin: 0 10px;
}

.producto-link .producto {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,183,255,0.10), 0 1.5px 6px rgba(100,100,172,0.08);
    padding: 18px 10px;
    width: 100%;
    height: 320px;     /* Alto fijo para todas las tarjetas */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

.producto-link .producto img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.producto-link .producto h3 {
    font-size: 1.1em;
    margin: 8px 0 4px 0;
    font-weight: bold;
    min-height: 40px;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.producto-link .producto p {
    font-size: 0.95em;
    color: #444;
    min-height: 38px;
    max-height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    text-overflow: ellipsis;
    white-space: normal;
    margin: 0 0 6px 0;
    width: 100%;
}

.producto-link .producto .precio {
    color: #00b7ff;
    font-weight: bold;
    margin-top: auto;
    margin-bottom: 0;
    width: 100%;
}

.producto-link:hover .producto,
.producto-link:focus .producto {
    box-shadow: 0 4px 16px rgba(0,183,255,0.18), 0 2px 8px rgba(100,100,172,0.12);
    transform: translateY(-4px) scale(1.03);
}

/* MOVIL */

@media (max-width: 1200px) {
    .productos .producto {
        width: calc(33.33% - 40px);
    }
}

@media (max-width: 768px) {
    .productos .producto {
        width: calc(50% - 40px);
    }
}

@media (max-width: 480px) {
    .productos .producto {
        width: calc(100% - 40px);
    }
}
@media (max-width: 480px) {
    header h1 {
      display: none; /* Este comando oculta el elemento */
    }
}
@media (max-width: 768px) {
    body {
        font-family: 'Open Sans', Arial, sans-serif;
        margin: 0; /* Los márgenes ocuparán el 5% del ancho de la ventana */
        padding: 0; /* El espaciado interno será el 2% del ancho de la ventana */
        background-color: #f4f4f4;
    }
    header {
        background-color: #f4f4f4;
        color: #161c3c;
        padding: 10px 0;
        display: flex;
        align-items: center;
        justify-content: space-between; 
        margin-bottom: 10px;
        width: 100%; /* Asegura que el header ocupe todo el ancho */
        box-sizing: border-box; /* Incluye padding dentro del ancho total */
    }
    
    header img {
        margin-left: 20px;
    }
    
    .header-content {
        flex-grow: 1;
        text-align: center;
    }
    
    header h1 {
        margin: 0;
        padding: 0;
    }
    }
    @media (max-width: 1200px) {
        .producto {
            width: calc(33.33% - 40px);
        }
        .carrusel {
            overflow-x: scroll; /* Permite desplazamiento horizontal en pantallas más pequeñas */
        }
    }
    @media (max-width: 768px) {
        header {
            flex-direction: column; /* Apila elementos */
            text-align: center;
        }
        .producto {
            width: calc(50% - 40px); /* Reduce tamaño de los productos */
        }
    }
    @media (max-width: 480px) {
        .producto {
            width: calc(100% - 40px); /* Los productos ocupan todo el ancho */
        }
        nav {
            display: flex;
            justify-content: flex-start;
            flex-wrap: nowrap; /* Evita que los botones se apilen en columnas */
            overflow-x: auto; /* Habilita el desplazamiento horizontal */
            white-space: nowrap; /* Mantiene los botones en una sola línea */
            scrollbar-width: thin; /* Ajusta la barra de desplazamiento en navegadores compatibles */
        }

        .header-content form {
            flex-direction: column; /* Input y botón de búsqueda se apilan */
            width: 100%;
        }
    }
    @media (max-width: 768px) {
        footer p {
            font-size: 12px; /* Reduce tamaño de fuente */
            padding: 5px; /* Ajusta el padding */
        }
    }
    
    @media (max-width: 480px) {
        
        footer {
            text-align: center; /* Centra todo */
        }

        footer p {
            font-size: 10px; /* Texto más pequeño en móviles */
            padding: 5px; /* Reduce espacio */
        }
        footer {
            background-color: #00b7ff; /* Cambia el color para pantallas pequeñas */
            color: #fff;
        }
    }

