/* ---- RESET BÁSICO Y VARIABLES ---- */
:root {
    --color-primario: #007bff;
    --color-secundario: #333;
    --color-texto: #555;
    --color-fondo: #f8f9fa;
    --color-blanco: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--color-fondo);
    color: var(--color-texto);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---- COMPONENTES REUTILIZABLES ---- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background-color: #eee;
    color: #333;
    border: 1px solid #ccc;
}

.btn-primary {
    background-color: var(--color-primario);
    color: var(--color-blanco);
    border: 1px solid var(--color-primario);
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-carrito {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--color-secundario);
}

/* ---- HEADER Y NAVEGACIÓN ---- */
.main-header {
    background-color: var(--color-blanco);
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 5%;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-secundario);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-texto);
    font-weight: 500;
}

/* ---- PÁGINA DE INICIO (INDEX) ---- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background-color: var(--color-blanco);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--color-secundario);
    margin-bottom: 0.5rem;
}

.featured-products {
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.featured-products h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--color-secundario);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--color-blanco);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem 0;
    color: var(--color-secundario);
}

.product-card .price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primario);
    margin-bottom: 1rem;
}

/* ---- PÁGINA DE PRODUCTO ---- */
.product-page-main {
    padding: 2rem 5%;
    max-width: 1100px;
    margin: 2rem auto;
    background-color: var(--color-blanco);
    border-radius: 8px;
}

.product-detail-container {
    display: flex;
    gap: 2rem;
}

.product-images {
    flex: 1;
}

.product-info {
    flex: 1;
}

.product-info h1 {
    font-size: 2.5rem;
    color: var(--color-secundario);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.75rem;
    color: var(--color-primario);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.product-description {
    margin-bottom: 1.5rem;
}

.product-options {
    margin-bottom: 2rem;
}

.product-options label {
    font-weight: bold;
    margin-right: 10px;
}

.product-options select {
    padding: 8px;
    font-size: 1rem;
    border-radius: 5px;
}

.btn-comprar {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
}

/* ---- FOOTER ---- */
.main-footer {
    text-align: center;
    padding: 2rem 5%;
    background-color: #e9ecef;
    border-top: 1px solid #e0e0e0;
    margin-top: 2rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .product-detail-container {
        flex-direction: column;
    }

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