/* Configuraciones Generales */
:root {
    --header-height: 70px; /* Valor por defecto; se ajusta con JS al cargar */
    --sidebar-width: 185px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e6f1fa;
    color: #333;
}

/* Cabecera Fija (Sticky) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #1b3778;
    background: linear-gradient(135deg, #071028, #384f86, #f5f5f7, #ffffff);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 900;
    border-bottom: 2px solid #003366;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
}

.app-title {
    font-size: 1.3rem;
    color: #f0eeee;
}

.app-title .brand {
    color: #dde5ed;
    font-weight: bold;
}

.header-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* ============================================================ */
/* MENÚ VERTICAL LATERAL IZQUIERDO                               */
/* ============================================================ */
.sidebar-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    background-color: #a3b3c2;
    border-right: 1px solid #e5e5e5;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 800;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 7px 5px;
    overflow-y: auto; /* Barra de desplazamiento cuando hay muchas diapositivas */
    -webkit-overflow-scrolling: touch;

    height: calc(100vh - var(--header-height) - 15px); /* resta el margen inferior */
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* Botones del Menú */
.menu-tab {
    background: none;
    border: none;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: normal;
    text-align: left;
    white-space: normal;
    line-height: 1.1;
}

.menu-tab:hover {
    background-color: #e9ecef;
    color: #003366;
}

.menu-tab.active {
    background-color: #0f2666; /* Guinda de tus títulos */
    color: white;
}

/* Compensación de espacio para el contenido */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width);
    padding: 30px;
    max-width: 1200px;
}

/* Contenido de Texto */
.text-content {
    flex: 1;
    min-width: 300px;
}

/* Cuando la diapositiva no tiene imágenes (slide.sinImagenes = true),
   el texto ocupa todo el ancho disponible */
.container.sin-imagenes .text-content {
    flex: 1 1 100%;
    max-width: 100%;
}

.text-content h2 {
    color: #0d0739; /* Color guinda corporativo */
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.product-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.punto-icono {
    flex-shrink: 0;
    font-size: 1.2rem;
    line-height: 1.6;
    width: 1.4em;
    text-align: center;
}

.punto-texto {
    flex: 1;
}

.punto-enlace {
    color: #0d0739;
    text-decoration: none;
}

.punto-enlace:hover {
    text-decoration: underline;
}

/* Carrusel y Ventana Flotante */
.image-content {
    flex: 1;
    min-width: 300px;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.carousel-images {
    position: relative;
    width: 100%;
    height: 350px;
    background-color: #fff;
}

.carousel-status {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0 20px;
    text-align: center;
    color: #888;
    font-size: 0.95rem;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: zoom-in;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.nav-btn, .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    border-radius: 4px;
}

.nav-btn:hover { background: rgba(0,0,0,0.7); }
.prev { left: 10px; }
.next { right: 10px; }

.image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 12px;
}

/* LIGHTBOX INTERACTIVO */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lightbox-content-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 1000px;
    height: 70vh;
}

.lightbox-img-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    user-select: none;
}

#lightbox-img.zoomed {
    transform: scale(2.5);
    cursor: grab;
}

#lightbox-img.zoomed:active {
    cursor: grabbing;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.lightbox-controls {
    margin-top: 20px;
    text-align: center;
    color: white;
}

#zoom-btn {
    background: #801515;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.zoom-tip {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
    display: none;
}
.lightbox-nav { position: static; margin: 0 20px; }

/* ============================================================ */
/* RESPONSIVE: en pantallas angostas, el menú lateral se convierte */
/* en una barra horizontal debajo de la cabecera (como antes)      */
/* ============================================================ */
@media (max-width: 768px) {
    .sidebar-menu {
        position: static;
        width: 100%;
        height: auto;
        max-height: 140px;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid #eee;
        box-shadow: none;
        margin-top: var(--header-height);
    }
    .menu-tab {
        white-space: nowrap;
    }
    .container {
        margin-left: 0;
        margin-top: 0;
    }
}