/* =========================================
   ESTILOS GENERALES
   ========================================= */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.titulo-galeria {
    color: #672432;
    font-weight: 800;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    text-transform: uppercase;
}
.titulo-galeria::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #672432 0%, #a44c5d 100%);
    border-radius: 2px;
}
.subtitulo-galeria {
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 15px auto 0 auto;
}

/* Botones de Filtro (Galerías) */
.filtros-galeria {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.btn-filtro {
    background-color: #ffffff;
    color: #672432;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-filtro:hover { border-color: #a44c5d; color: #a44c5d; }
.btn-filtro.active {
    background-color: #672432;
    color: #ffffff;
    border-color: #672432;
    box-shadow: 0 4px 10px rgba(103, 36, 50, 0.3);
}

/* =========================================
   VISOR PRINCIPAL Y CARRETE DE MINIATURAS
   ========================================= */

.carrusel-principal {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marco-principal {
    width: 100%;
    height: 450px; /* Altura controlada para la foto grande */
    border-radius: 15px;
    overflow: hidden;
    background-color: #111; /* Fondo oscuro por si la foto no llena el espacio */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#imagenPrincipal {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Asegura que la foto se vea completa sin recortes */
    transition: opacity 0.3s ease;
}

.info-principal {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(103, 36, 50, 0.9), transparent);
    padding: 30px 20px 15px 20px;
    color: white;
    text-align: left;
}
.info-principal h4 { margin: 0; font-weight: 700; }

/* Botones de Anterior/Siguiente (Flechas) */
.btn-nav-carrusel {
    background-color: rgba(103, 36, 50, 0.8);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.btn-nav-carrusel:hover { background-color: #672432; transform: scale(1.1); }
.btn-nav-carrusel.prev { left: 15px; }
.btn-nav-carrusel.next { right: 15px; }

/* Carrete de miniaturas */
.carrete-miniaturas {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 15px 10px;
    margin-top: 15px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}
.carrete-miniaturas::-webkit-scrollbar { height: 6px; }
.carrete-miniaturas::-webkit-scrollbar-thumb { background-color: #672432; border-radius: 10px; }
.carrete-miniaturas::-webkit-scrollbar-track { background-color: #eee; }

.miniatura {
    flex: 0 0 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}
.miniatura img { width: 100%; height: 100%; object-fit: cover; }
.miniatura:hover { opacity: 0.9; }
.miniatura.activa {
    opacity: 1;
    border-color: #672432;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(103, 36, 50, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .marco-principal { height: 300px; }
    .miniatura { flex: 0 0 90px; height: 60px; }
    .btn-nav-carrusel { width: 35px; height: 35px; font-size: 1rem; }
}