:root {
    --bg: #ffffff;
    --surface: #fdfdfd;
    --accent: #c5a47e;
    --text-primary: #1a1a1a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
}

header {
    padding: 20px 5%;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo { font-weight: 300; letter-spacing: 4px; margin: 0; }
.logo span { font-weight: 700; color: var(--accent); }

#busqueda {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 25px;
    width: 250px;
    outline: none;
}

.productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.cartaProducto {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cajaImagen {
    background: #f8f8f8;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cajaImagen img { width: 80%; transition: 0.5s; }
.cartaProducto:hover img { transform: scale(1.1); }

.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: none; /* JS lo cambia a flex */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.detail-modal {
    width: 90%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    position: relative;
}

.detail-img img { width: 100%; background: #f8f8f8; }

.category-tag { color: var(--accent); text-transform: uppercase; font-size: 0.9rem; }
.precio-grande { font-size: 2rem; font-weight: 700; margin: 20px 0; }

.btn-add {
    background: var(--text-primary);
    color: white;
    padding: 15px;
    border: none;
    width: 100%;
    cursor: pointer;
    font-weight: 600;
}

.close-modal {
    position: absolute;
    top: -40px; right: 0;
    background: none; border: none; font-size: 2rem; cursor: pointer;
}

@media (max-width: 768px) {
    .detail-modal { grid-template-columns: 1fr; }
}