/* ==========================================
   🎠 CAROUSEL VISUALIZER (Product Detail)
   ========================================== */
.pd-main-img-wrapper {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.pd-carousel-track {
    display: flex;
    overflow-x: hidden; /* Desktop: scroll con scrollIntoView() o clic */
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    -ms-overflow-style: none;  /* IE y Edge */
    scrollbar-width: none;     /* Firefox */
}

/* Ocultar scrollbar en Chrome, Safari y Opera */
.pd-carousel-track::-webkit-scrollbar {
    display: none;
}

.pd-carousel-item {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    background: #f8fafc;
}

.pd-carousel-item img, 
.pd-carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-carousel-pagination {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(15, 23, 42, 0.75);
    color: white !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.1);
}

/* ==========================================
   📱 BARRA INFERIOR FIJA (Móvil)
   ========================================== */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f172a; /* Azul oscuro corporativo */
    display: none; /* Oculto en PC */
    flex-direction: column; /* Apilados verticalmente */
    align-items: stretch;
    gap: 10px;
    padding: 12px 15px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
    z-index: 2000;
}

.mbb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #475569;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    width: 60px; /* Ancho fijo para mantener simetría */
}

.mbb-item i {
    font-size: 20px;
    color: #1e293b;
}

.hidden {
    display: none !important;
}


.mbb-btn-pdf {
    background: #1e293b;
    color: white !important;
    text-decoration: none;
    text-align: center;
    padding: 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1px solid #334155;
    transition: background-color 0.2s;
}

.mbb-btn-pdf i { font-size: 16px; color: white !important; }

.mbb-btn-buy {
    background: #25D366; /* Verde WhatsApp */
    color: white !important;
    text-decoration: none;
    text-align: center;
    padding: 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    flex-grow: 1; /* Crecer para ocupar el espacio restante */
}

.mbb-btn-buy:hover {
    background: #c2410c;
}

/* ==========================================
   🔄 RESPONSIVE ADJUSTMENTS (< 900px)
   ========================================== */
@media (max-width: 900px) {
    /* Mostrar barra inferior */
    .mobile-bottom-bar {
        display: flex; 
    }

    #pd-pdf-wrapper {
        display: none !important; /* Ocultar en bloque de descripción en Móvil */
    }
    
    body {
        padding-bottom: 140px; /* Mas alto para 2 lineas */ /* Espacio para barra flotante */
    }

    /* Carrusel Táctil */
    .pd-carousel-track {
        overflow-x: auto; /* Scroll táctil */
        scroll-snap-type: x mandatory;
    }

    .pd-carousel-item {
        scroll-snap-align: center;
    }

    /* Reparación de Orden del Grid en Celular */
    .pd-content-col {
        display: flex;
        flex-direction: column;
        gap: 20px;
        order: 1; /* Ensure it stays at the top */
        min-width: 0;
    }

    .pd-main-img-wrapper {
        order: 1; /* Primero: visualizador carrusel */
        aspect-ratio: 4/3 !important; 
        max-height: 280px !important; 
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
    }

    .pd-thumbs-col {
        display: none !important; /* Ocultar miniaturas en móvil */
    }

    .pd-videos-col {
        display: none !important; /* Ocultar miniaturas en móvil */
    }

    .pd-description {
        order: 4; /* Cuarto: descripción */
        margin-top: 20px;
    }

    .pd-sidebar-col {
        display: none !important; /* Ocultar Sidebar en Móviles */
    }
}

/* ==========================================
   Pestañas de Medios (Opción B)
   ========================================== */
.pd-mobile-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    position: relative;
    z-index: 10;
}

.pd-tab-btn {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.pd-tab-btn.active {
    background: #3b82f6;
    color: white !important;
    border-color: #3b82f6;
}

/* ==========================================
   🧩 SKELETON LOADERS
   ========================================== */
.skeleton-box {
    background-color: #1e293b !important;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    color: transparent !important;
    user-select: none;
}

.skeleton-box::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer { 100% { transform: translateX(100%); } }
