/* --- RESET & VARIABLES --- */
:root {
    --bg-body: #ffffff;
    --bg-light: #f9f9f9;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --card-bg: #f8f8f8; /* Color de fondo del "marco" de la obra */
    --card-border: #e5e5e5;
    --accent: #2c3e50;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth; /* Desplazamiento suave al hacer clic en el menú */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
}

/* --- NAV BAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    z-index: 100;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: #999; }
.btn-nav { border-bottom: 1px solid var(--text-main); }

/* --- HERO --- */
.hero {
    text-align: center;
    padding: 6rem 1rem 4rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* --- SECCIONES --- */
/* --- CORRECCIÓN DE SCROLL (Para que el menú no tape el título) --- */
section {
    /* Esto crea un "colchón" invisible arriba de cada sección al hacer click en el link */
    scroll-margin-top: 120px; 
}

/* Ajuste específico para móviles si el menú es más chico o grande */
@media (max-width: 768px) {
    section {
        scroll-margin-top: 100px;
    }
}

.collection-section {
    padding: 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.bg-light { background-color: var(--bg-light); width: 100%; max-width: 100%; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p { color: var(--text-muted); font-size: 0.95rem; }

/* --- GRID (Modificado para alinear arriba) --- */
.grid-uniforme {
    display: grid;
    /* Ajustamos el ancho mínimo para que se vean bien */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    
    /* ESTO ES LA CLAVE: 'start' evita que las tarjetas se estiren.
       Cada una tendrá la altura natural de su contenido. */
    align-items: center; 
    justify-items: center;
    justify-content: center;
    margin-bottom: 20px;;
}

/* --- TARJETAS DE PRODUCTO (Estilo Marco Galería) --- */
.product-card {
    width: 100%;
    max-width: 400px; /* Un poco más angostas para elegancia */
    cursor: pointer;
    
    /* EL MARCO: Fondo gris suave y borde */
    background-color: var(--card-bg); 
    border: 1px solid var(--card-border);
    padding: 15px; /* Espacio interno (el "aire" del marco) */
    
    /* Quitamos height: 100% para que el texto suba */
    display: flex;
    flex-direction: column;
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px); /* Efecto de elevación elegante */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background-color: #fff; /* Se ilumina un poco al pasar el mouse */
    border-color: #d0d0d0;
}

.img-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    width: 100%;
}

.product-card img {
    width: 100%;
    height: auto; 
    display: block;
    /* Borde muy sutil en la imagen misma */
    border-radius: 1px; 
}

/* Etiquetas (Vendido, Nuevo) */
.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.badge.vendido { background: #e0e0e0; color: #777; }
.badge.reservado { background: #fff3cd; color: #856404; }

/* Ajustes de Texto dentro del marco */
.info {
    text-align: left;
    padding-top: 0.2rem; 
}

.info h3 {
    font-size: 1.05rem;
    font-weight: 500;
    font-family: var(--font-heading);
    margin-bottom: 0.4rem;
    color: #222;
}

.price {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.price.sold { text-decoration: line-through; opacity: 0.6; }

/* --- FOOTER (Estilo Oscuro) --- */
footer {
    background-color: #1a1a1a;
    color: #ffffff;
    text-align: center;
    padding: 5rem 1rem;
    margin-top: 5rem;
}

footer .btn-outline {
    display: inline-block;
    border: 1px solid #ffffff;
    padding: 10px 25px;
    text-decoration: none;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin: 1.5rem 0;
    transition: all 0.3s;
}

footer .btn-outline:hover {
    background: #ffffff;
    color: #1a1a1a;
}

footer .socials {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #dddddd;
}

/* Link de Instagram Alineado */
footer .socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

footer .socials a:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

footer .copyright {
    font-size: 0.8rem;
    color: #888888;
}

/* --- LIGHTBOX (MODAL) --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    padding-top: 40px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.92); 
    backdrop-filter: blur(8px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 85vh;
    width: auto;
    height: auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
    animation-name: zoom;
    animation-duration: 0.3s;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: 100;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}

.close:hover { color: #bbb; }

@keyframes zoom {
    from {transform:scale(0.95); opacity: 0;} 
    to {transform:scale(1); opacity: 1;}
}

@media only screen and (max-width: 700px){
    .modal-content { width: 100%; }
}

/* --- FOTO DE PERFIL ARTISTA --- */
.artist-portrait {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 2rem;
    border: 4px solid #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .navbar { padding: 1rem; flex-direction: column; gap: 1rem; }
    .hero h1 { font-size: 2.2rem; }
    .collection-section { padding: 3rem 1.5rem; }
    .grid-uniforme { gap: 1.5rem; }
}

/* --- ESTILOS DEL MENÚ DESPLEGABLE (DROPDOWN) --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none; /* Oculto por defecto */
    position: absolute;
    background-color: #ffffff;
    min-width: 200px; /* Ancho del menú desplegado */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1000; /* Asegura que flote sobre las fotos */
    border-radius: 4px;
    padding: 10px 0;
    top: 100%; /* Aparece justo debajo del botón */
    left: 0;
    border: 1px solid #eee;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 0.85rem;
    border-bottom: 1px solid #f9f9f9;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color: #000;
}

/* Mostrar el menú al pasar el mouse sobre "Series de Acuarelas" */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Ajuste visual para la flechita */
.dropbtn {
    cursor: default; /* Para indicar que es un menú */
}

/* --- ESTILOS DE LA HAMBURGUESA --- */
.hamburger {
    display: none; /* Oculto en escritorio */
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-main); /* Usa el color de texto principal */
}

/* --- MEDIA QUERY PARA MÓVIL (Menú Hamburguesa) --- */
@media (max-width: 768px) {
    .hamburger {
        display: block; /* Mostrar botón en móvil */
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0; /* Efecto al abrir: oculta la del medio */
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg); /* Cruza la primera */
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg); /* Cruza la última */
    }

    .nav-menu {
        position: fixed;
        left: -100%; /* Oculto a la izquierda de la pantalla */
        top: 70px; /* Altura aproximada del navbar */
        gap: 0;
        flex-direction: column;
        background-color: #ffffff; /* Fondo blanco sólido */
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0; /* Al activar, entra a la pantalla */
    }

    .nav-menu li {
        margin: 16px 0;
    }

    /* Ajuste del Dropdown en móvil para que no flote raro */
    .dropdown-content {
        position: static; /* Ya no flota, empuja el contenido */
        box-shadow: none;
        border: none;
        background-color: #f9f9f9;
        display: none; /* Oculto hasta hover/click */
        width: 100%;
    }
    
    /* Pequeño truco: en móvil mostramos el dropdown siempre si está dentro del menú */
    .dropdown:hover .dropdown-content {
        display: block; 
    }
}