/* ==========================================================================
   1. VARIABLES & CONFIGURACIÓN BASE
   ========================================================================== */

.pcr-entorno-pruebas {
    background: #050508;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.pcr-split-imagen-visor {
    display: flex;
    flex-direction: row;
    gap: 40px;
    background: #0d0d13;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 35px;
    border-radius: 6px;
    width: 100%;
    max-width: 1100px;
    box-sizing: border-box;
}

/* ==========================================================================
   2. GALERÍA & VISOR DE IMÁGENES
   ========================================================================== */

.pcr-bloque-multimedia {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex: 1.2;
    max-width: 600px;
}

.pcr-main-img-box {
    flex: 1;
    height: 420px;
    overflow: hidden; 
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Lógica dinámica mediante Variable CSS (--total-imagenes) */
.pcr-slider-track {
    display: flex;
    height: 100%;
    width: calc(var(--total-imagenes, 1) * 100%); 
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    will-change: transform;
}

.pcr-slide-item {
    width: calc(100% / var(--total-imagenes, 1));
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 10px;
}

.pcr-slide-item img {
    max-height: 400px;
    max-width: 100%;
    object-fit: contain;
    pointer-events: none;
}

.pcr-col-miniaturas {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 85px;
    min-width: 85px;
    flex-shrink: 0;
    justify-content: flex-start;
}

.pcr-item-thumb {
    width: 85px;
    height: 85px;
    background: #050508;
    border: 2px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.pcr-item-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.pcr-item-thumb.active {
    border-color: #00d2ff !important;
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.5) !important;
    background: rgba(0, 210, 255, 0.05) !important;
}

/* ==========================================================================
   3. INFORMACIÓN DEL PRODUCTO & ACCIONES
   ========================================================================== */

.pcr-bloque-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pcr-info-ean {
    font-size: 12px;
    color: #555566;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pcr-info-ean span {
    color: #888899;
    font-family: monospace;
}

.pcr-info-title h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.pcr-hr-separador {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 10px 0;
}

.pcr-contenedor-precio-compra {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pcr-info-price-box {
    display: flex;
    flex-direction: column;
}

.pcr-price-amount {
    font-size: 42px;
    font-weight: 800;
    color: #00d2ff;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
    line-height: 1;
}

.pcr-price-amount small {
    font-size: 20px;
    font-weight: 400;
    margin-left: 2px;
}

.pcr-action-container {
    margin-top: auto;
}

.pcr-btn-add-cart {
    width: 100%;
    background: transparent;
    border: 2px solid #00d2ff;
    color: #00d2ff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
    margin-bottom: 15px;
}

.pcr-btn-add-cart:hover {
    background: #00d2ff;
    color: #050508;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

/* ==========================================================================
   4. BLOQUE DE STOCK Y BOTÓN COMPARTIR (FILA HORIZONTAL)
   ========================================================================== */

.pcr-info-stock-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

.pcr-left-actions {
    flex: 1; 
    display: flex;
    justify-content: center;
}

.pcr-right-stock {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.pcr-stock-status-text {
    font-size: 13px;
    color: #a0a0b0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pcr-stock-status-text strong {
    color: #ffffff;
}

/* Botón Compartir Círculo Neón */
.btn-share-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #00f3ff;
    color: #00f3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.btn-share-circle:hover {
    background: #00f3ff;
    color: #000;
    box-shadow: 0 0 15px #00f3ff;
    transform: scale(1.05);
}

.btn-share-circle i {
    margin-left: -1px;
}

/* Medidor de Stock Nativo (<meter>) */
.pcr-stock-meter {
    width: 100%;
    max-width: 250px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    border: none;
}

.pcr-stock-meter::-webkit-meter-bar {
    background: #1a1a1a;
    border-radius: 2px;
    border: none;
}

/* Estados de Color del Medidor */
.pcr-stock-meter::-webkit-meter-even-less-good-value { background: #ff3344; box-shadow: 0 0 8px #ff3344; border-radius: 2px; }
.pcr-stock-meter::-webkit-meter-sub-optimum { background: #ffaa00; box-shadow: 0 0 8px #ffaa00; border-radius: 2px; }
.pcr-stock-meter::-webkit-meter-optimum { background: #00ff66; box-shadow: 0 0 8px #00ff66; border-radius: 2px; }

.pcr-stock-meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: #ff3344; box-shadow: 0 0 8px #ff3344; }
.pcr-stock-meter:-moz-meter-sub-optimum::-moz-meter-bar { background: #ffaa00; box-shadow: 0 0 8px #ffaa00; }
.pcr-stock-meter:-moz-meter-optimum::-moz-meter-bar { background: #00ff66; box-shadow: 0 0 8px #00ff66; }

/* Legado: Nodos LED manuales */
.pcr-stock-bar-leds { display: flex; gap: 5px; width: 100%; max-width: 250px; }
.pcr-led-node { flex: 1; height: 6px; background: #1a1a1a; border-radius: 2px; }
.pcr-led-node.led-critico { background: #ff3344; box-shadow: 0 0 8px #ff3344; }
.pcr-led-node.led-medio { background: #ffaa00; box-shadow: 0 0 8px #ffaa00; }
.pcr-led-node.led-correcto { background: #00ff66; box-shadow: 0 0 8px #00ff66; }

/* ==========================================================================
   5. MODAL INTERFAZ COMPARTIR COMPONENTE
   ========================================================================== */

#btn-share-floating {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 55px;
    height: 55px;
    background: #0d0e12;
    border: 2px solid #00f3ff;
    border-radius: 50%;
    color: #00f3ff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    transition: all 0.2s ease;
}

#btn-share-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.6);
    background: #00f3ff;
    color: #000;
}

.share-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 33%;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.share-modal-overlay.active { display: flex; }

.share-modal-content {
    background: #0d0e12;
    border: 2px solid #1f2330;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.8);
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
}

.share-modal-header {
    background: #11141d;
    padding: 15px 20px;
    border-bottom: 1px solid #1f2330;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h5 { color: #fff; margin: 0; font-size: 0.95rem; letter-spacing: 1px; }

.share-close-btn { background: none; border: none; color: #4b5366; font-size: 1.5rem; cursor: pointer; transition: color 0.2s; line-height: 1; }
.share-close-btn:hover { color: #ff0055; }

.share-modal-body { padding: 20px; text-align: center; }
.share-subtitle { color: #a9afc2; font-size: 0.75rem; margin-bottom: 20px; text-align: left; }

.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.share-item {
    background: #151821; border: 1px solid #2a2f42; padding: 15px 10px; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
    transition: all 0.2s ease;
}

.share-item i { font-size: 1.6rem; }
.share-item span { color: #a9afc2; font-size: 0.7rem; font-weight: bold; letter-spacing: 0.5px; }
.share-item:hover { background: #1a1e2a; transform: translateY(-3px); }

/* Efectos Neón en Botones de Compartir */
.share-item.wa i { color: #25d366; }
.share-item.wa:hover { border-color: #25d366; box-shadow: 0 0 12px rgba(37, 211, 102, 0.4), inset 0 0 6px rgba(37, 211, 102, 0.1); background: rgba(37, 211, 102, 0.05); }
.share-item.wa:hover i { text-shadow: 0 0 8px #25d366; }

.share-item.x-tw i { color: #00f3ff; }
.share-item.x-tw:hover { border-color: #00f3ff; box-shadow: 0 0 12px rgba(0, 243, 255, 0.4), inset 0 0 6px rgba(0, 243, 255, 0.1); background: rgba(0, 243, 255, 0.05); }
.share-item.x-tw:hover i { text-shadow: 0 0 8px #00f3ff; }

.share-item.mail i { color: #ffffff; }
.share-item.mail:hover { border-color: #ffffff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.4), inset 0 0 6px rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); }
.share-item.mail:hover i { text-shadow: 0 0 8px #ffffff; }

.share-item.copy i { color: #00d2ff; }
.share-item.copy:hover { border-color: #00d2ff; box-shadow: 0 0 12px rgba(0, 210, 255, 0.4), inset 0 0 6px rgba(0, 210, 255, 0.1); background: rgba(0, 210, 255, 0.05); }
.share-item.copy:hover i { text-shadow: 0 0 8px #00d2ff; }

#share-toast {
    margin-top: 15px; background: #00f3ff; color: #000; font-size: 0.65rem; font-weight: bold;
    padding: 8px; border-radius: 4px; display: none; box-shadow: 0 0 15px rgba(0, 243, 255, 0.4); letter-spacing: 0.5px;
}

/* ==========================================================================
   6. RESPONSIVE TABLETS (Hasta 1024px)
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .pcr-entorno-pruebas { padding: 0px !important; }
    .pcr-split-imagen-visor { flex-direction: column !important; padding: 20px !important; gap: 25px !important; border-radius: 0px !important; }
    .pcr-bloque-multimedia { max-width: 100% !important; width: 100% !important; flex-direction: column !important; gap: 20px !important; }
    .pcr-main-img-box { width: 100% !important; height: 380px !important; order: 1 !important; }
    .pcr-slide-item img { max-height: 360px !important; }
    
    .pcr-col-miniaturas { 
        flex-direction: row !important; flex-wrap: nowrap !important; width: 100% !important; 
        min-width: 100% !important; justify-content: space-between !important; order: 2 !important; gap: 6px !important; 
    }
    .pcr-item-thumb { width: calc(25% - 5px) !important; max-width: 85px !important; height: 75px !important; padding: 5px !important; flex: 1 1 auto !important; }

    .pcr-contenedor-precio-compra { flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; margin-top: 10px !important; }
    .pcr-info-price-box { width: calc(50% - 6px) !important; flex: 0 0 calc(50% - 6px) !important; }
    .pcr-action-container { width: calc(50% - 6px) !important; flex: 0 0 calc(50% - 6px) !important; margin-top: 0 !important; }
    .pcr-btn-add-cart { margin-bottom: 0 !important; padding: 14px 8px !important; font-size: 13px !important; gap: 6px !important; white-space: nowrap !important; }
    .pcr-price-amount { font-size: 36px !important; }
}

/* ==========================================================================
   7. RESPONSIVE MÓVILES (Hasta 480px)
   ========================================================================== */

@media screen and (max-width: 480px) {
    .pcr-entorno-pruebas { 
        padding: 0px !important; 
        min-height: auto !important;
        margin-top: 0px !important; 
    }
    .pcr-split-imagen-visor { 
        padding: 10px 12px !important; 
        gap: 15px !important; 
        border-top: none !important; 
    }
    
    .pcr-bloque-multimedia {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
        height: 190px !important;
        max-height: 190px !important;
        margin-bottom: 5px !important;
    }

    .pcr-main-img-box { 
        flex: 1 !important;
        height: 190px !important; 
        order: 1 !important;
    }
    
    .pcr-slide-item { height: 190px !important; padding: 5px !important; }
    .pcr-slide-item img { max-height: 180px !important; object-fit: contain !important; }
    
    .pcr-col-miniaturas {
        flex-direction: column !important;
        width: 50px !important;
        min-width: 50px !important;
        height: 190px !important;
        max-height: 190px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        order: 2 !important;
        gap: 5px !important;
        justify-content: flex-start !important;
        padding-right: 2px !important;
    }

    .pcr-item-thumb { 
        width: 48px !important;
        height: 48px !important; 
        padding: 3px !important;
        flex: 0 0 48px !important;
    }

    .pcr-info-title h3 { font-size: 19px !important; }
    .pcr-info-ean { font-size: 11px !important; }

    /* Ajuste de Stock & Share en Móvil */
    .pcr-stock-meter { height: 8px !important; max-width: 200px !important; }
    .pcr-stock-status-text { font-size: 11px !important; }
    .btn-share-circle { width: 40px !important; height: 40px !important; font-size: 1rem !important; }

    .pcr-price-amount { font-size: 28px !important; }
    .pcr-price-amount small { font-size: 15px !important; }
    .pcr-btn-add-cart { font-size: 11px !important; padding: 12px 4px !important; }
    .pcr-btn-add-cart svg { width: 15px !important; height: 15px !important; }

    .share-modal-content {
        width: 100% !important; max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        border-bottom: none !important; border-left: none !important; border-right: none !important;
        animation: slideFromBottom 0.3s cubic-bezier(0.1, 0.8, 0.3, 1) forwards !important;
    }

    .share-grid { gap: 10px !important; }
    .share-item { padding: 16px 10px !important; transform: none !important; }
    .share-item i { font-size: 1.7rem !important; }
    #btn-share-floating { bottom: 15px !important; left: 15px !important; width: 48px !important; height: 48px !important; font-size: 1.1rem !important; }
}

@keyframes slideFromBottom {
    from { transform: translateY(100%); opacity: 0.9; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   8. CHIVATO DE RESPONSIVE
   ========================================================================== */

.pcr-chivato-css span::after { content: "Escritorio ( > 1024px )"; }
@media screen and (max-width: 1024px) { .pcr-chivato-css span::after { content: "Tablet / Móvil ( < 1024px ) - Adaptado"; } }
@media screen and (max-width: 480px) { .pcr-chivato-css span::after { content: "Móvil Estricto ( < 480px ) - Optimizado"; } }