/* --- VARIABLES & PALETA --- */
:root {
    /* Modo Claro (Default) */
    --bg-body: #f8f7f5;
    --bg-card: #ffffff;
    --text-main: #111111;
    --text-muted: #6b6b6b;
    --accent-gold: #cda95f;
    --accent-gold-dark: #b08d45;
    --border-color: #e5e5e5;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.04);
    
    /* Tipografías */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

/* Modo Oscuro */
body.dark-mode {
    --bg-body: #0d0d0d;
    --bg-card: #1a1a1a;
    --text-main: #f1f1f1;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.3);
}

/* --- RESET BÁSICO --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- HEADER --- */
.site-header {
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    background: var(--bg-body);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

body.scrolled .site-header {
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}
#theme-toggle:hover { border-color: var(--accent-gold); }

/* --- HERO --- */
.hero {
    height: 70vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1615634260167-c8cdede054de?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: #fff;
    margin-bottom: 4rem;
}

.hero-image-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
    max-width: 800px;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-hero {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #fff;
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
}

.btn-hero:hover {
    transform: translateY(-2px);
    background: var(--accent-gold);
    color: #fff;
}

/* --- GRID & LAYOUT --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Filtros */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--text-main);
    color: var(--bg-card);
    border-color: var(--text-main);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Móvil */
    gap: 2rem;
}

@media(min-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media(min-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- TARJETA DE PRODUCTO --- */
.product-card {
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: var(--border-color);
}

.card-image-wrapper {
    position: relative;
    padding-top: 133%; /* Aspect ratio 3:4 */
    background: #f0f0f0;
    overflow: hidden;
}

.product-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 1rem; left: 1rem;
    background: #000;
    color: #fff;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Selector */
.size-selector-wrapper {
    margin-bottom: 1.5rem;
}

.size-select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s;
}

.size-select:hover {
    border-color: var(--text-muted);
}

/* --- PRECIO DINÁMICO (NUEVO) --- */
.price-display {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 1rem; /* Separación del botón */
    border-top: 1px solid var(--border-color);
    font-size: 1rem;
    color: var(--text-muted);
}

.current-price {
    font-family: var(--font-serif);
    font-size: 1.7rem; /* Precio más grande */
    font-weight: 600;
    color: var(--accent-gold-dark);
    display: block; /* Para que ocupe su propia línea */
    margin-top: 0.25rem;
}

body.dark-mode .current-price {
    color: var(--accent-gold);
}


/* --- BOTONES TARJETA (MODIFICADO) --- */
.card-actions {
    /* Ya no es grid de 2 columnas, el botón ocupará el 100% */
    display: block; 
}

.btn {
    border: none;
    padding: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    width: 100%; /* Asegura que ocupe todo el espacio */
}

.btn-whatsapp {
    /* Estilo del botón principal (WhatsApp) */
    background: #25D366; 
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: white;
    border-color: #128C7E;
}

/* .btn-primary fue eliminado */

.microcopy {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.8rem;
    opacity: 0.7;
}

/* --- FOOTER --- */
.site-footer {
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
    padding: 3rem 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.footer-links a {
    color: var(--text-muted);
    margin: 0 0.5rem;
    text-decoration: none;
}

/* --- ANIMACIONES --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}