* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
}

/* Contenedor Principal del Slider */
.slider-container {
    width: 100%;
    max-width: 900px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    padding: 20px;
}

/* Visor de Imagen Grande */
.main-image-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    background-color: #111;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image-wrapper:hover img {
    transform: scale(1.02);
}

/* Botones de Navegación Sobre la Imagen Principal */
.main-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(4, 46, 4, 0.5);
    color: #baff00;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background-color 0.3s ease, transform 0.2s ease;
    user-select: none;
}

.main-nav-btn:hover {
    background: #006600;
    transform: translateY(-50%) scale(1.08);
}

.main-prev {
    left: 15px;
}

.main-next {
    right: 15px;
}

.zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    z-index: 10;
}

/* Tira de Miniaturas */
.thumbnails-bar {
    display: flex;
    align-items: center;
    margin-top: 15px;
    position: relative;
    gap: 8px;
}

.thumbnails-track-container {
    overflow: hidden;
    width: 100%;
    border-radius: 6px;
}

.thumbnails-track {
    display: flex;
    gap: 8px;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Estilos de las Miniaturas Reducidas */
.thumbnail-item {
    --max-visible: 6;
    --gap-total: calc(8px * (var(--max-visible) - 1));
    flex: 0 0 calc((100% - var(--gap-total)) / var(--max-visible));
    
    height: 65px;
    object-fit: cover;
    
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail-item:hover {
    opacity: 0.85;
}

.thumbnail-item.active {
    opacity: 1;
    border-color: #c4862c;
    box-shadow: 0 0 8px rgba(196, 134, 44, 0.4);
}

/* Botones de Navegación de la Tira Inferior */
.nav-btn {
    background-color: #ffffff;
    border: 1px solid #ddd;
    color: #333;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover:not(:disabled) {
    background-color: #c4862c;
    color: #fff;
    border-color: #c4862c;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

/* Modal Lightbox con Fondo Transparente al 70% */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.70);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #c4862c;
}

/* Adaptabilidad para Dispositivos Móviles */
@media (max-width: 768px) {
    .main-image-wrapper {
        height: 320px;
    }

    .thumbnail-item {
        --max-visible: 5;
        height: 55px;
    }

    .main-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        padding: 10px;
    }

    .main-image-wrapper {
        height: 240px;
    }

    .thumbnail-item {
        --max-visible: 4;
        height: 48px;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .main-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}