/* =====================
   VARIABLES
===================== */
:root {
    --vino-oscuro: #1a0000;
    --vino-medio: #3a0000;
    --dorado: rgba(212,175,55,0.9);
    --dorado-soft: rgba(212,175,55,0.35);
    --glass-bg: rgba(255, 255, 255, 0.05);
}

/* =====================
   RESET & BASE
===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.productos-page {
    background: radial-gradient(circle, #4a0000 0%, #1a0000 100%);
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
}

/* =====================
   NAVBAR (Glassmorphism)
===================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 120;
}

.nav-logo {
    text-decoration: none;
    color: var(--dorado);
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    font-weight: bold;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-location {
    padding: 6px 14px;
    border: 1px solid var(--dorado);
    border-radius: 20px;
    color: var(--dorado);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.nav-location:hover {
    background: var(--dorado);
    color: var(--vino-oscuro);
}

/* =====================
   HAMBURGER
===================== */
.hamburger {
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background: var(--dorado);
    transition: all 0.3s ease;
}

/* =====================
   NAV MENU (Recuperando Textura Premium)
===================== */
.nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    z-index: 110;

    /* Mix: Fondo oscuro móvil + Textura original */
    background: rgba(26, 0, 0, 0.95);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);

    background-image:
            linear-gradient(rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
            radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 40%);

    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    padding: 2rem 0;

    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.nav-menu.active {
    transform: translateY(0);
    opacity: 1;
}

.nav-menu a {
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--dorado);
}

/* =====================
   PRODUCTOS (DYNAMIC GRID)
===================== */
.productos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 1.5rem 40px; /* Más padding top para el nav fixed */
}

.categoria {
    margin-top: 3rem;
}

.categoria h2 {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    color: var(--dorado);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

/* 🔥 TARJETA DE PRODUCTO (Adaptada al JS) */
.producto {
    position: relative;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(212,175,55,0.25);

    /* El JS inyecta el background-image aquí */
    background-size: cover;
    background-position: center;

    /* Sombra de profundidad original */
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Overlay de gradiente para legibilidad (JS ya pone uno, pero este asegura contraste) */
.producto::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.85) 100%);
    z-index: 1;
    pointer-events: none;
    transition: background 0.3s ease;
}

.producto:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 20px rgba(212,175,55,0.25);
}

.producto:hover::after {
    background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.9) 100%);
}

.info-producto {
    position: relative;
    z-index: 2;
    padding: 1.2rem;
    text-align: center;
}

.link-producto {
    text-decoration: none;
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* BOTÓN WHATSAPP / PRECIO */
.boton-wp {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    color: var(--dorado);
    border: 1px solid var(--dorado);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.boton-wp:hover {
    background: var(--dorado);
    color: var(--vino-oscuro);
    transform: scale(1.05);
}

/* =====================
   OVERLAY (Martillado recuperado)
===================== */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);

    /* Textura martillada original */
    background-image:
            radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 40%),
            radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0%, transparent 40%);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 90;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =====================
   RESPONSIVE DESKTOP
===================== */
@media (min-width: 900px) {
    .nav-menu {
        max-width: 380px;
        left: auto;
        right: 25px;
        top: 80px;
        border-radius: 16px;
    }
}

/* Spinner animado */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(212,175,55,0.2);
    border-top: 4px solid var(--dorado);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* =====================
   ESTILOS EXCLUSIVOS PARA LOS MAPAS (Ubicaciones)
===================== */

.titulo-ubicaciones {
    text-align: center;
    color: var(--dorado, #d4af37);
    margin: 100px 0 30px 0; /* Da espacio para que el menú superior no lo tape */
    font-size: 2.2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.ubicaciones-grid {
    display: grid;
    /* Esto hace que en PC se vean varias columnas y en celular se pongan una debajo de otra automáticamente */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.ubicacion-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.3); /* Borde doradito sutil */
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.ubicacion-card:hover {
    transform: translateY(-5px); /* Pequeño saltito al pasar el mouse */
    border-color: rgba(212, 175, 55, 0.9);
}

.ubicacion-card h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.ubicacion-card iframe {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.map-link {
    display: inline-block;
    background: rgba(212, 175, 55, 0.9); /* Botón dorado */
    color: #1a0000; /* Letra oscura para que contraste */
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.map-link:hover {
    background: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}