/* Estilos generales para páginas de categoría */
body {
    background-color: #f5f5f7; /* Fondo blanco grisáceo claro para las páginas de productos */
}

.container {
    width: 90%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Sección de título de categoría (similar a "Explore the lineup") */
.category-hero {
    padding: 60px 0 30px; /* Padding superior para separar del header */
    text-align: center;
    background-color: #fff; /* Fondo blanco para esta sección */
    border-bottom: 1px solid #e0e0e0; /* Pequeño separador */
}

.category-hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-title {
    font-size: 3rem; /* Título grande */
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 15px;
}

.view-all-link {
    font-size: 1.1rem;
    color: #ff9000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #ff9000;
    text-decoration: underline;
}

/* Sección del Grid de Productos */
.product-category-grid {
    padding: 60px 0;
    background-color: #f5f5f7; /* Fondo ligero para la sección de productos */
}

.product-grid-4-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 4 columnas, responsive */
    gap: 30px; /* Espacio entre productos */
    justify-content: center; /* Centra el grid si no ocupa todo el ancho */
}

.product-item {
    background-color: #fff;
    border-radius: 18px; /* Bordes más redondeados */
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Sombra suave */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.product-img {
    max-width: 100%;
    height: 250px; /* Altura fija para las imágenes */
    object-fit: contain; /* Asegura que la imagen se ajuste sin distorsionarse */
    display: block;
    margin: 0 auto;
}

/* Puntos de navegación (simulando los colores de la imagen) */
.dots-nav {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 8px; /* Espacio entre los puntos */
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #d2d2d7; /* Color gris claro por defecto */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #6e6e73; /* Color gris oscuro para el activo */
}
/* Colores específicos de los productos */
/* iPhone 13 Pro  */
.product-item:nth-child(1) .dot:nth-child(1) { background-color: #e5904d; }
.product-item:nth-child(1) .dot:nth-child(2) { background-color: #5c5c5c; }
.product-item:nth-child(1) .dot:nth-child(3) { background-color: #c0c0c0; }
.product-item:nth-child(1) .dot:nth-child(4) { background-color: #2e2e2e; }

/* iPhone Air - Azul claro */
.product-item:nth-child(2) .dot:nth-child(1) { background-color: #c9e0f6; }
.product-item:nth-child(2) .dot:nth-child(2) { background-color: #f0f0f0; }
.product-item:nth-child(2) .dot:nth-child(3) { background-color: #e0d8eb; }
.product-item:nth-child(2) .dot:nth-child(4) { background-color: #d1e4dc; }


/* iPhone 17 - Violeta */
.product-item:nth-child(3) .dot:nth-child(1) { background-color: #e0d8eb; }
.product-item:nth-child(3) .dot:nth-child(2) { background-color: #f0f0f0; }
.product-item:nth-child(3) .dot:nth-child(3) { background-color: #c9e0f6; }
.product-item:nth-child(3) .dot:nth-child(4) { background-color: #d1e4dc; }


/* iPhone 16 - Azul más oscuro */
.product-item:nth-child(4) .dot:nth-child(1) { background-color: #8c8cef; }
.product-item:nth-child(4) .dot:nth-child(2) { background-color: #5c5c5c; }
.product-item:nth-child(4) .dot:nth-child(3) { background-color: #f0f0f0; }
.product-item:nth-child(4) .dot:nth-child(4) { background-color: #e0d8eb; }

/* Otros iPhones (ej. iPhone SE) */
.product-item:nth-child(5) .dot:nth-child(1) { background-color: #a7a7a7; } /* Gris */
.product-item:nth-child(5) .dot:nth-child(2) { background-color: #e8e8e8; } /* Blanco */
.product-item:nth-child(5) .dot:nth-child(3) { background-color: #333333; } /* Negro */
.product-item:nth-child(5) .dot:nth-child(4) { background-color: #d0d0d0; } /* Plata */

.product-item:nth-child(6) .dot:nth-child(1) { background-color: #7b2c2c; } /* Rojo oscuro */
.product-item:nth-child(6) .dot:nth-child(2) { background-color: #1a1a1a; } /* Negro */
.product-item:nth-child(6) .dot:nth-child(3) { background-color: #e0e0e0; } /* Plata */
.product-item:nth-child(6) .dot:nth-child(4) { background-color: #004d00; } /* Verde oscuro */

.product-item:nth-child(7) .dot:nth-child(1) { background-color: #4a6797; } /* Azul */
.product-item:nth-child(7) .dot:nth-child(2) { background-color: #e8e8e8; } /* Blanco */
.product-item:nth-child(7) .dot:nth-child(3) { background-color: #6b4c91; } /* Morado */
.product-item:nth-child(7) .dot:nth-child(4) { background-color: #d94f70; } /* Rosa */

.product-item:nth-child(8) .dot:nth-child(1) { background-color: #1e1e1e; } /* Negro */
.product-item:nth-child(8) .dot:nth-child(2) { background-color: #0056b3; } /* Azul */
.product-item:nth-child(8) .dot:nth-child(3) { background-color: #ffffff; } /* Blanco */
.product-item:nth-child(8) .dot:nth-child(4) { background-color: #4CAF50; } /* Verde */



.product-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-top: 15px;
    margin-bottom: 8px;
}

.product-description {
    font-size: 1rem;
    color: #6e6e73;
    line-height: 1.5;
    min-height: 45px; /* Altura mínima para descripciones para mantener el diseño uniforme */
    margin-bottom: 20px;
    flex-grow: 1; /* Permite que la descripción ocupe espacio si es más larga */
}

.product-price {
    font-size: 2rem;
    color: #16aa19;
    margin-bottom: 20px;
    display: block;
}

.product-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.btn-buy {
    background-color: #ff9000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px; /* Botón píldora */
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-buy:hover {
    background-color: #060606;
}

.btn-learn-more {
    color: #ff9000;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center; /* Centra el texto y el ">" si es un icono */
}

.btn-learn-more:hover {
    color: #ff9000;
    text-decoration: underline;
}


/* Responsive para el Grid de Productos */
@media (max-width: 1200px) {
    .product-grid-4-columns {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Ajusta a 3 columnas en pantallas más grandes si cabe */
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .category-title {
        font-size: 2.5rem;
    }
    .product-grid-4-columns {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* 3 o 2 columnas en tablets */
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 40px 0 20px;
    }
    .category-title {
        font-size: 2rem;
    }
    .view-all-link {
        font-size: 1rem;
    }
    .product-grid-4-columns {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Una o dos columnas en móviles */
        gap: 25px;
    }
    .product-item {
        padding: 25px;
    }
    .product-name {
        font-size: 1.4rem;
    }
    .product-description {
        font-size: 0.95rem;
    }
    .product-img {
        height: 200px;
    }
    .product-actions {
        flex-direction: column; /* Botones apilados en móviles */
        gap: 10px;
    }
    .btn-buy, .btn-learn-more {
        width: 80%; /* Ancho completo con algo de margen */
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 1.8rem;
    }
    .product-grid-4-columns {
        grid-template-columns: 1fr; /* Una columna en móviles muy pequeños */
        gap: 20px;
    }
    .product-item {
        padding: 20px;
    }
    .product-img {
        height: 180px;
    }
}

