/* Reseteo básico para que se vea igual en todos los navegadores */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================
   CABECERA PRINCIPAL Y CONTACTO (CENTRADOS)
========================================= */
.cabecera-principal {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    gap: 5px; 
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 20px 15px 20px; 
    border-bottom: 1px solid #eeeeee;
}

.logo-img {
    max-width: 150px; 
    height: auto;
}

.contacto-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; 
}

/* Ocultamos la barrita de ubicación en la PC (Laptop) */
.separador-movil {
    display: none;
}

/* Estilo de los enlaces y textos */
.contacto-item, .direccion-item {
    text-decoration: none;
    color: #4a4a4a; 
    display: flex;
    align-items: center;
    gap: 8px; 
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Colores originales de las marcas solo para los íconos */
.whatsapp i { color: #25D366; font-size: 18px; }
.facebook i { color: #1877F2; }
.instagram i { color: #E4405F; }
.tiktok i { color: #000000; }
.icono-ubicacion { color: #E1306C; font-size: 18px; }

.separador {
    color: #cccccc;
    margin: 0 8px;
}

.redes-sociales {
    display: flex;
    align-items: center;
}

/* Efecto al pasar el mouse (se pone dorado) */
.contacto-item:hover {
    color: #d4af37; 
}

/* =========================================
   MODO CELULAR (RESPONSIVE)
========================================= */
@media (max-width: 768px) {
    .cabecera-principal {
        flex-direction: column;
        gap: 15px; 
        padding: 15px;
    }
    
    .contacto-container {
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px; 
    }

    .redes-sociales {
        display: flex;
        align-items: center;
    }

    /* Ocultamos solo los textos */
    .texto-contacto {
        display: none; 
    }
    
    /* Mantenemos la barrita separadora y le damos más espacio */
    .separador {
        display: inline-block;
        margin: 0 15px; 
        font-size: 20px; 
        color: #cccccc;
    }

    /* Hacemos los íconos más grandes para que sean fáciles de tocar */
    .contacto-item i, .direccion-item i {
        font-size: 28px;
    }
    /* ¡Mostramos la barrita en el celular! */
    .separador-movil {
        display: inline-block;
    }
}

body {
    background-color: #fafafa; 
    color: #262626;
    padding: 20px;
    overflow-x: hidden; 
}

/* --- Animación para cuando aparecen las fotos --- */
@keyframes aparecer {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- NUEVO: Animación para el fondo mientras cargan las fotos --- */
@keyframes cargandoFondo {
    0% { background-color: #efefef; }
    50% { background-color: #e0e0e0; }
    100% { background-color: #efefef; }
}

/* --- Cabecera --- */
.cabecera {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.cabecera h1 {
    font-size: 2rem;
    letter-spacing: 1px;
}

.cabecera p {
    color: #8e8e8e;
    margin-top: 5px;
}

/* =========================================
   FILTROS Y DESLIZADOR DE CATEGORÍAS
========================================= */
.filtros-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    
    /* LA MAGIA PEGAJOSA */
    position: -webkit-sticky; /* Soporte para Safari */
    position: sticky;
    top: -1px; /* Se ancla justo en el techo de la pantalla */
    z-index: 900; /* Obliga a la barra a pasar por encima de las fotos */
    background-color: #fafafa; /* Mismo color de tu fondo para ocultar las fotos que suben */
    padding: 15px 20px; /* Un poco de aire arriba y abajo para que no se vea apretado */
}

.filtros-categoria {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth; /* Movimiento fluido al hacer clic en las flechas */
    padding-bottom: 5px; 
    flex-grow: 1; 
    scrollbar-width: none; /* Oculta la barra en Firefox */
}

/* Oculta la barra nativa en Chrome, Safari y Edge para un look súper limpio */
.filtros-categoria::-webkit-scrollbar {
    display: none; 
}

/* --- Botones de Categoría (Estilo Texto Minimalista) --- */
.btn-filtro {
    flex-shrink: 0; 
    background: transparent;
    border: none; /* Quitamos el contorno de botón */
    padding: 5px 0; /* Padding vertical, sin padding horizontal para que el subrayado no sea más ancho que la palabra */
    margin: 0 12px; /* Separación horizontal entre cada categoría */
    cursor: pointer;
    font-weight: 500;
    font-size: 13px; /* Tamaño ligeramente más elegante */
    color: #4a4a4a;
    text-transform: uppercase; /* Convierte todo el texto a mayúsculas */
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent; /* Prepara el espacio para que la línea aparezca sin dar "saltos" */
}

/* Efecto al pasar el mouse o al estar seleccionado */
.btn-filtro.activo, .btn-filtro:hover {
    background-color: transparent; /* Anula el fondo oscuro que teníamos antes */
    color: #1a1a1a; /* Oscurece la letra para resaltar */
    font-weight: 600;
    border-bottom: 2px solid #d4af37; /* Color rojo del subrayado (puedes cambiarlo a #d4af37 si prefieres dorado) */
}

/* --- Botón VIP Independiente --- */
.btn-especial {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 5px 0;
    margin: 0 12px;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    color: #d4af37; /* Letra dorada */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-especial.activo, .btn-especial:hover {
    border-bottom: 2px solid #d4af37;
    color: #b5952f;
}

/* --- Tiradores (Flechas Doradas) --- */
.btn-scroll {
    background: transparent;
    border: 1px solid #dbdbdb; 
    color: #d4af37; /* El dorado elegante de tu logo */
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.btn-scroll:hover {
    background-color: #262626;
    color: #d4af37;
    border-color: #262626;
}

/* En celulares, ocultamos las flechas (el usuario desliza con el dedo) */
@media (max-width: 768px) {
    .btn-scroll {
        display: none;
    }
}

/* =========================================
   LA CUADRÍCULA MÁGICA (CSS GRID PRO)
========================================= */
.galeria-grid {
    display: grid;
    /* Le quitamos el minmax. Ahora las columnas siempre medirán exactamente 280px */
    grid-template-columns: repeat(auto-fill, 280px);
    justify-content: center; /* Esto centra las tarjetas en la pantalla si sobran huecos */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto; 
}

/* --- Adaptación táctil (Tablets y Celulares) --- */
@media (max-width: 1024px) {
    .producto-info {
        opacity: 1; 
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%); 
        justify-content: flex-end; 
        padding-bottom: 20px;
    }
    
    .producto-info h3 { font-size: 1.1rem; margin-bottom: 5px; }
    .producto-info p { font-size: 0.85rem; }
}

/* --- Tarjetas de Producto --- */
.producto-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    background-color: #efefef; 
    cursor: pointer;
    /* MEJORA PRO: Sumamos la animación de esqueleto de carga al fondo */
    animation: aparecer 0.4s ease-out, cargandoFondo 2s infinite ease-in-out;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.producto-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    -webkit-touch-callout: none;
    user-select: none;
    pointer-events: none;
}

/* --- Efecto Hover (Información superpuesta) --- */
.producto-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    opacity: 0; 
    transition: opacity 0.3s ease; 
}

/* MEJORA PRO: Solo aplica el hover si el dispositivo usa ratón (evita bugs en celular) */
@media (hover: hover) {
    .producto-card:hover .producto-info {
        opacity: 1; 
    }
}

.producto-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.producto-info p {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* =========================================
   EFECTO LIGHTBOX
========================================= */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); 
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000; 
    opacity: 0;
    pointer-events: none; 
    transition: opacity 0.3s ease;
    overflow-y: auto; /* Permite bajar si el celular es pequeño */
    padding: 40px 20px; /* Da aire arriba y abajo */
    justify-content: center; /* Acomoda todo desde arriba, sin aplastar */
}

#lightbox:not(.lightbox-oculto) {
    opacity: 1;
    pointer-events: auto;
}

#lightbox-img {
    max-width: 90%;
    max-height: 55vh; /* Achicamos un poco la foto para que quepa el texto */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin-top: 20px;
}

#lightbox-caption {
    color: white;
    margin-top: 15px;
    font-size: 1.2rem;
    text-align: center;
    font-weight: bold;
}

.btn-cerrar {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-cerrar:hover {
    color: #ccc;
}

#lightbox-desc {
    color: #e0e0e0; 
    margin-top: 10px;
    font-size: 1rem;
    text-align: center;
    max-width: 80%; 
    line-height: 1.4;
}

/* =========================================
   BOTÓN FLOTANTE DE WHATSAPP
========================================= */
.btn-whatsapp {
    position: fixed; 
    bottom: 30px;    
    right: 30px;     
    background-color: #25d366; 
    width: 65px;
    height: 65px;
    border-radius: 50%; 
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); 
    z-index: 999; 
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-whatsapp:hover {
    transform: scale(1.1); 
    background-color: #20b858; 
}

/* =========================================
   BOTÓN FLOTANTE DE BÚSQUEDA
========================================= */
.btn-buscar-flotante {
    position: fixed; 
    bottom: 110px;   /* <--- CAMBIO AQUÍ: Lo subimos para que quede sobre WhatsApp */
    right: 30px;     /* <--- CAMBIO AQUÍ: Lo alineamos a la derecha */
    background-color: #1a1a1a; 
    color: #d4af37; 
    width: 65px;
    height: 65px;
    border-radius: 50%; 
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); 
    z-index: 999; 
    border: 2px solid #d4af37; 
    cursor: pointer;
    font-size: 22px;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.btn-buscar-flotante:hover {
    transform: scale(1.1); 
    background-color: #d4af37; 
    color: #1a1a1a;
}

/* Adaptación táctil: en celulares se apilan para no estorbar horizontalmente */
@media (max-width: 768px) {
    .btn-buscar-flotante {
        bottom: 110px; /* Se sube justo encima del botón verde */
        right: 30px;
        width: 60px; 
        height: 60px;
        font-size: 20px;
    }
    .btn-whatsapp {
        width: 60px;
        height: 60px;
    }
}

/* =========================================
   ANIMACIÓN DE CARGA (SPINNER)
========================================= */
.contenedor-loader {
    grid-column: 1 / -1; /* Lo centra ocupando todo el ancho */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: #8e8e8e;
    font-weight: 500;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #d4af37; /* Tu dorado elegante */
    border-radius: 50%;
    animation: girarSpinner 1s linear infinite; /* Lo hace girar */
    margin-bottom: 15px;
}

@keyframes girarSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* =========================================
   BARRA DE BÚSQUEDA
========================================= */
.buscador-container {
    display: flex;
    align-items: center;
    width: 450px; /* FORZAMOS un ancho generoso para que entre todo el texto */
    max-width: 90vw; /* 90vw asegura que en celular no reviente la pantalla */
    margin-top: 15px;
    border: 1px solid #dbdbdb;
    border-radius: 20px; 
    padding: 8px 15px;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}

/* Efecto dorado cuando el usuario está escribiendo */
.buscador-container:focus-within {
    border-color: #d4af37; 
}

.barra-busqueda {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #262626;
    background: transparent;
}

.btn-buscar-icono {
    background: transparent;
    border: none;
    color: #d4af37; /* La lupita en dorado */
    cursor: pointer;
    font-size: 16px;
    padding-left: 10px;
}
/* =========================================
   PIE DE PÁGINA (FOOTER)
========================================= */
.pie-pagina {
    background-color: transparent;
    border-top: 1px solid #eeeeee;
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px; /* Da un buen respiro después de la última fila de fotos */
}

.footer-contenido p {
    color: #8e8e8e;
    font-size: 14px;
    margin: 5px 0;
}

.footer-contenido strong {
    color: #262626; /* Letra oscura para resaltar la marca */
    font-weight: 600;
}

.lema-footer {
    font-style: italic;
    color: #d4af37 !important; /* El toque dorado corporativo */
}
/* =========================================
   BOTÓN DE LIKES (CORAZÓN INTERACTIVO)
========================================= */
.btn-like-container {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10; /* Se asegura de estar por encima del fondo oscuro y la imagen */
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.btn-like-container:hover {
    transform: scale(1.05); /* Efecto de rebote al pasar el mouse */
}

.corazon-icono {
    color: #cccccc; /* Gris por defecto */
    font-size: 16px;
    transition: color 0.3s ease;
}

/* Esta clase se activa con JavaScript al hacer clic */
.corazon-icono.animar-rojo {
    color: #e3000f; /* Corazón rojo pasión */
    animation: latido 0.4s ease;
}

.like-contador {
    font-size: 14px;
    font-weight: 700;
    color: #262626;
}

@keyframes latido {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* =========================================
   CARRUSEL Y VIDEOS (LIGHTBOX MULTIMEDIA)
========================================= */
.lightbox-media-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

#lightbox-media-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px; /* Evita que la ventana salte mientras carga */
}

#lightbox-media-wrapper img, 
#lightbox-media-wrapper iframe {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    object-fit: contain;
}

/* Forzamos el formato de cine (16:9) para los videos */
#lightbox-media-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.btn-carrusel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 26, 26, 0.8);
    color: #d4af37;
    border: 1px solid #d4af37;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
}

.btn-carrusel:hover {
    background: #d4af37;
    color: #1a1a1a;
}

/* Separamos las flechas a los costados */
.btn-prev { left: -60px; }
.btn-next { right: -60px; }

/* En celulares metemos las flechas dentro de la foto para que no se salgan de la pantalla */
@media (max-width: 900px) {
    .btn-prev { left: 5px; }
    .btn-next { right: 5px; }
}