/* 1. Contenedor Principal */
.d1302-container {
    position: relative;
    width: 100%;
    /* Las variables se llenan desde el PHP */
    height: var(--h-pc, 500px); 
    overflow: hidden;
    background: #f0f0f0;

    /* Configuración de Cursor para arrastrar */
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: pan-y; /* Permite scroll vertical pero atrapa el horizontal */
}

/* Cursor cuando se agarra */
.d1302-container:active {
    cursor: grabbing;
}

/* 2. Wrapper (Envoltorio) */
.d1302-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

/* 3. Slide Individual */
.d1302-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    z-index: 1;
    pointer-events: none; /* Ignorar clics en slides ocultos */
}

.d1302-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto; /* Permitir clics en slide visible */
}

/* 4. Imágenes de fondo */
.d1302-img-pc, .d1302-img-mv {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: block;
}

.d1302-link {
    display: block;
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
}

/* 5. RESPONSIVE (Tablets y Móviles) */
.d1302-img-mv { display: none; } /* Ocultar móvil por defecto */

/* Tablet (hasta 1024px) */
@media (max-width: 1024px) {
    .d1302-container {
        height: var(--h-tb, 400px);
    }
}

/* Móvil (hasta 768px) */
@media (max-width: 768px) {
    .d1302-container {
        height: var(--h-mv, 300px);
    }
    .d1302-img-pc { display: none; } /* Ocultar PC */
    .d1302-img-mv { display: block; } /* Mostrar Móvil */
}

/* 6. Flechas de Navegación */
.d1302-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* Reset de padding */
}

.d1302-nav button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.d1302-prev { left: 10px; }
.d1302-next { right: 10px; }

/* 7. Puntos (Dots) */
.d1302-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.d1302-dot {
    display: block;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.d1302-dot.active {
    background: #fff;
    transform: scale(1.2);
}