/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}
.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff; /* Cambia todos los textos e íconos a blanco */
    cursor: pointer;
    display: block;
    margin-right: auto;
}

/* Navigation */
.navegacion {
    background: #000; /* Fondo negro */
    color: #fff; /* Texto en blanco */
    display: flex; /* Cambia a flexbox para mayor control */
    justify-content: space-between; /* Espacia los elementos */
    align-items: center; /* Alinea verticalmente */
    padding: 0.8rem 3%;
    position: fixed; /* Fija la barra superior */
    top: 0;
    width: 100%; /* Asegura que ocupe el 100% del ancho */
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Sombra ligera */
}

/* Estilos para las 4 partes de la navegación */
.parte-navegacion {
    display: flex;
    align-items: center;
    gap: 1rem; /* Espaciado entre elementos */
}

/* Parte 1: Menú y Constructor */
.part-1 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    justify-self: start;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.logo a {
    text-decoration: none;
    color: #fff; /* Cambia el texto de "Constructor" a blanco */
    font-size: 1.2rem;
    font-weight: bold;
}

/* Parte 2: Enlaces de navegación */
.part-2 {
    display: flex;
    justify-content: center;
    justify-self: center;
}

.enlaces-navegacion {
    display: flex;
    list-style: none;
    gap: 1.5rem; /* Espaciado entre enlaces */
    margin: 0;
    padding: 0;
}

.enlaces-navegacion a {
    text-decoration: none;
    color: #fff; /* Texto en blanco */
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.enlaces-navegacion a:hover {
    color: #007bff; /* Color azul al pasar el cursor */
}

/* Parte 3: Búsqueda */
.part-3 {
    display: flex;
    align-items: center;
    justify-self: start;
    margin-right: 10rem; /* Ajusta el margen para moverlo más hacia la izquierda */
}

.search-container {
    display: flex;
    align-items: center;
    background: #fff; /* Fondo blanco */
    border-radius: 20px;
    padding: 0 10px;
    height: 35px;
    max-width: 250px; /* Limita el ancho máximo */
    width: 100%;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    font-size: 14px;
    flex: 1; /* Ocupa el espacio disponible */
    color: #333; /* Texto oscuro */
}

.search-input::placeholder {
    color: rgba(0, 0, 0, 0.7); /* Placeholder en negro */
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #333; /* Ícono oscuro */
}

/* Parte 4: Cuenta y Bolsa */
.part-4 {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Incrementa ligeramente el espacio entre los botones */
}

.part-4 button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #fff; /* Cambia todos los textos e íconos a blanco */
    position: relative;
}

.boton-cuenta, .boton-carrito {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #fff; /* Íconos en blanco */
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto; /* Ajusta el ancho automáticamente */
    height: 40px; /* Mantiene la altura consistente */
    padding: 0 10px; /* Agrega espacio interno para los botones */
    border-radius: 20px; /* Botones ligeramente redondeados */
    transition: background 0.3s ease;
}

.boton-cuenta:hover, .boton-carrito:hover {
    background: rgba(255, 255, 255, 0.2); /* Fondo al pasar el cursor */
}

.search-container {
    display: flex;
    align-items: center;
    background: #fff; /* Fondo blanco para el campo de búsqueda */
    border-radius: 20px;
    padding: 0 15px;
    height: 35px;
    color: #000; /* Texto negro dentro del campo */
    width: 100%; /* Ajusta el ancho en pantallas pequeñas */
    max-width: 300px; /* Limita el ancho máximo */
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    font-size: 14px;
    width: 100px;
    color: white;
}

.search-input::placeholder {
    color: rgba(0, 0, 0, 0.7); /* Placeholder en negro */
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 5px;
}

.search-btn::before {
    content: '🔍';
    font-size: 16px;
    color: white;
}

.account-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.account-btn::before {
    content: '👤';
    font-size: 16px;
    color: #333;
}

.account-btn::after {
    content: 'Account';
    font-size: 14px;
    color: #fff; /* Cambia el texto a blanco */
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-btn::before {
    content: '🛒';
    font-size: 16px;
    color: #333;
}

.cart-btn::after {
    content: 'Bag';
    font-size: 14px;
    color: #fff; /* Cambia el texto a blanco */
}

/* Hero Section */
.heroe {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2)), url('https://acdn.mitiendanube.com/stores/001/160/313/products/9dcfaf1e-c2a2c072b742b8ac5815904858531815-1024-1024.jpeg') no-repeat center center;
    background-size: cover; /* Asegura que la imagen ocupe todo el contenedor */
    height: 70vh; /* Altura ajustada */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    filter: brightness(0.9); /* Mejora la visibilidad del texto sobre la imagen */
}

.imagen-heroe {
    display: none; /* Oculta la etiqueta <img> ya que el fondo se maneja con CSS */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.boton-comprar {
    background: #007bff;
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.boton-comprar:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* Products Section */
.products-section {
    padding: 2rem 5%;
}

.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap; /* Ajusta los filtros en pantallas pequeñas */
    gap: 1rem;
}

.filter-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap; /* Ajusta los botones en pantallas pequeñas */
}

.mail-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    cursor: pointer;
}

.mail-option .mail-icon::before {
    content: '📧';
    font-size: 16px;
}

.mail-option .arrow-icon::before {
    content: '→';
    font-size: 16px;
}

.filter-btn {
    background: #f8f8f8;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

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

.filter-btn.active {
    color: #000000; /* Asegura que el texto activo también sea blanco */
    font-weight: 600;
}

/* Product Container */
.product-container {
    display: grid;
    grid-template-columns: 300px 1fr; /* Mantiene la barra de filtros y productos en pantallas grandes */
    gap: 2rem;
}

/* Filters */
.filters {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 10px;
    height: 100%;
    min-height: calc(100vh - 400px);
    display: block; /* Visible por defecto */
}

@media (max-width: 1024px) {
    .filters {
        display: block; /* Muestra las categorías en tabletas */
        margin-bottom: 1rem;
    }
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.filter-group ul {
    list-style: none;
}

.filter-group li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    cursor: pointer;
    color: #666;
}

.price-filter {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.radio-item input[type="radio"]:checked {
    border-color: #000;
}

/* Mostrar las imágenes completas sin recortar */
.product-card {
    position: relative; /* Necesario para posicionar el carrito */
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%; /* Asegura que las tarjetas ocupen el ancho disponible */
}

.product-card img {
    width: 100%; /* Ocupa todo el ancho del contenedor */
    height: 200px; /* Altura aumentada para imágenes más largas */
    border-radius: 8px; /* Mantiene bordes redondeados */
    margin-bottom: 0.3rem; /* Espacio reducido entre la imagen y el texto */
    display: block; /* Asegura que la imagen se muestre como bloque */
    object-fit: contain; /* Mantiene la proporción de la imagen */
    margin: 0;
}

.image-container {
    position: relative; /* Necesario para posicionar el carrito dentro de la imagen */
}

.cart-icon {
    position: absolute;
    bottom: 10px; /* Posiciona el carrito en la parte inferior */
    right: 10px; /* Posiciona el carrito en la parte derecha */
    background-color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.cart-icon:hover {
    transform: scale(1.1); /* Efecto de zoom al pasar el cursor */
    background-color: #f0f0f0; /* Cambia el fondo al pasar el cursor */
}

.radio-item input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #000;
    border-radius: 50%;
}

.radio-item label {
    color: #666;
    cursor: pointer;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
}

.color-btn.white { background: #fff; border-color: #ddd; }
.color-btn.gray { background: #808080; }
.color-btn.yellow { background: #ffd700; }
.color-btn.orange { background: #ffa500; }
.color-btn.green { background: #008000; }
.color-btn.blue { background: #0000ff; }
.color-btn.purple { background: #800080; }
.color-btn.pink { background: #ffc0cb; }
.color-btn.brown { background: #964b00; }
.color-btn.red { background: #ff0000; }
.color-btn.black { background: #000; }
.color-btn.yellowgreen { background: #9acd32; }
.color-btn.skyblue { background: #87ceeb; }

.size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.size-grid button {
    background: white;
    border: 1px solid #ddd;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.size-grid button:hover {
    background: #f0f0f0;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Tres columnas en pantallas grandes */
    gap: 1.5rem; /* Espaciado entre tarjetas */
    justify-items: stretch; /* Asegura que las tarjetas ocupen todo el espacio horizontal */
}

.product-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%; /* Asegura que las tarjetas ocupen el ancho disponible */
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cart-icon {
    position: absolute;
    bottom: 15px; /* Ajusta la posición inferior */
    right: 15px; /* Ajusta la posición derecha */
    background-color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.cart-icon:hover {
    transform: scale(1.1); /* Efecto de zoom al pasar el cursor */
    background-color: #f0f0f0; /* Cambia el fondo al pasar el cursor */
}

@media (max-width: 1024px) {
    .product-container {
        grid-template-columns: 1fr; /* Oculta la barra de filtros en pantallas medianas */
    }

    .filters {
        display: block; /* Muestra las categorías en tabletas */
        margin-bottom: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* Dos columnas en pantallas medianas */
        gap: 1rem; /* Reduce el espaciado entre tarjetas */
    }
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr; /* Solo muestra los productos en pantallas pequeñas */
    }

    .filters {
        display: none; /* Oculta las categorías en pantallas pequeñas */
    }

    .product-grid {
        grid-template-columns: 1fr; /* Una columna en pantallas pequeñas */
        gap: 1rem; /* Reduce el espaciado entre tarjetas */
    }

    .product-card {
        margin: 0 auto; /* Centra las tarjetas en pantallas pequeñas */
    }
}

@media (max-width: 480px) {
    .navegacion {
        padding: 0.5rem 1rem; /* Reduce el padding de la barra superior */
    }

    .parte-1, .parte-3 {
        display: flex; /* Mantiene visibles el logo y la barra de búsqueda */
    }

    .parte-2, .parte-4 {
        display: none; /* Oculta los enlaces de navegación y los botones de cuenta y carrito */
    }

    .menu-toggle {
        font-size: 1.2rem; /* Reduce el tamaño del ícono del menú */
    }

    .logo a {
        font-size: 1rem; /* Reduce el tamaño del texto del logo */
    }

    .contenedor-busqueda {
        max-width: 100%; /* Asegura que la barra de búsqueda ocupe todo el ancho disponible */
    }

    .entrada-busqueda {
        font-size: 0.9rem; /* Reduce el tamaño del texto en la barra de búsqueda */
    }

    .product-grid {
        grid-template-columns: 1fr; /* Una columna en celulares */
        gap: 0.5rem; /* Reduce aún más el espaciado entre tarjetas */
    }

    .product-card {
        padding: 0.8rem; /* Reduce el padding en tarjetas */
    }

    .heroe {
        height: 50vh; /* Reduce la altura del héroe en celulares */
    }

    .hero h1 {
        font-size: 1.8rem; /* Ajusta el tamaño del texto */
    }

    .boton-comprar {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .navegacion {
        padding: 0.5rem 1rem; /* Reduce el padding de la barra superior */
    }

    .menu-toggle {
        font-size: 1.2rem; /* Reduce el tamaño del ícono del menú */
    }

    .logo a {
        font-size: 1rem; /* Reduce el tamaño del texto del logo */
    }

    .enlaces-navegacion {
        gap: 0.8rem; /* Reduce el espacio entre los enlaces */
    }

    .enlaces-navegacion a {
        font-size: 0.9rem; /* Reduce el tamaño del texto de los enlaces */
    }

    .parte-4 {
        gap: 0.8rem; /* Reduce el espacio entre los botones */
    }

    .boton-cuenta, .boton-carrito {
        font-size: 1rem; /* Reduce el tamaño de los íconos */
        height: 35px; /* Reduce la altura de los botones */
        padding: 0 8px; /* Reduce el padding interno */
    }
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* Dos columnas en pantallas medianas */
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .navegacion {
        padding: 1rem;
    }
    .enlaces-navegacion {
        flex-direction: column; /* Cambia los enlaces a una columna */
        gap: 1rem;
    }

    .part-4 {
        flex-direction: column; /* Cambia los elementos de la parte 4 a una columna */
        gap: 1rem;
    }

    .mail-container {
        flex-direction: column; /* Cambia "Your Mail" a una columna */
        align-items: center;
    }

    .heroe {
        height: 50vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .boton-comprar {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 772px) and (min-width: 546px) {
    .parte-2 {
        display: none; /* Oculta los enlaces de navegación */
    }
}

@media (max-width: 480px) {
    .navegacion {
        padding: 1rem;
    }

    .enlaces-navegacion {
        flex-direction: column; /* Mantiene los enlaces en columna */
        gap: 1rem;
    }

    .part-4 {
        flex-direction: column; /* Mantiene los elementos de la parte 4 en columna */
        gap: 1rem;
    }

    .mail-container {
        flex-direction: column; /* Mantiene "Your Mail" en columna */
        align-items: center;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .boton-comprar {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .filters-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .filter-options {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filters {
        display: none; /* Oculta las categorías en pantallas muy pequeñas */
    }

    .footer-container {
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .newsletter input {
        width: 100%;
    }
}

/* Footer */
.footer {
    background-color: #f8f9fb;
    padding: 2rem 5%;
    color: #5a6170;
    font-size: 0.9rem;
    text-align: center;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-section {
    flex: 1 1 200px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #5a6170;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #007bff;
}

.footer-section h4 {
    margin-bottom: 10px;
    color: #3a4353;
}

.footer-section.address p {
    margin-top: 5px;
    line-height: 1.5;
}

/* FOOTER BOTTOM */
.footer-bottom {
    margin-top: 2rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom a {
    color: #5a6170;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #007bff;
}

.email-link {
    color: #5a6170;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.email-link:hover {
    text-decoration: underline;
}

.arrow {
    font-size: 16px;
}