/* ── CONTENEDOR PRINCIPAL ── */
.wss-community-stories { all: initial; display: block; max-width: 1280px; margin: 0 auto; padding: 48px 24px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.wss-community-stories * { box-sizing: border-box; }
.wss-header { text-align: center; margin-bottom: 36px; }
.wss-title { font-size: clamp(24px, 3vw, 36px); font-weight: 700; color: #111; line-height: 1.2; margin-bottom: 10px; }
.wss-subtitle { font-size: 16px; color: #666; max-width: 540px; margin: 0 auto; line-height: 1.6; }

/* ── GRID DE TARJETAS ── */
.wss-grid { display: grid; grid-template-columns: repeat(var(--wss-columns, 5), 1fr); gap: 16px; }
.wss-card { position: relative; aspect-ratio: 9/16; background: #111; border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease; }
.wss-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 16px 40px rgba(0,0,0,0.22); z-index: 2; }
.wss-card video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── EFECTOS DE TARJETA ── */
.wss-hover-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.15); pointer-events: none; transition: opacity 0.3s ease; }
.wss-hover-hint__icon { width: 52px; height: 52px; border: 2px solid rgba(255,255,255,0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.wss-card--playing .wss-hover-hint { opacity: 0; }
.wss-card-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 12px 14px; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%); z-index: 2; pointer-events: none; }
.wss-card-product-row { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.3); padding: 6px; border-radius: 8px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.05); }
.wss-card-thumb { width: 40px; height: 40px; border-radius: 6px!important; object-fit: cover; }
.wss-product-name { font-size: 13px; color: #fff !important; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.wss-product-price, .wss-product-price * { font-size: 14px; font-weight: 700; color: #fff !important; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }

/* ── LIGHTBOX (BASE MÓVIL POR DEFECTO) ── */
.wss-lightbox { display: none; position: fixed; inset: 0; background: #000; z-index: 999999; }
.wss-lightbox-container { position: relative; width: 100%; height: 100%; background: #000; margin: 0 auto; }

/* Cabecera unificada y blindada */
.wss-lightbox-header { position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; height: 80px !important; display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 0 20px !important; background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%) !important; z-index: 10 !important; pointer-events: none !important; }
.wss-lightbox-counter { color: #fff; font-size: 13px; font-weight: 600; background: rgba(0,0,0,0.4); padding: 6px 16px; border-radius: 100px; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.wss-lightbox-close { pointer-events: auto !important; width: 40px !important; height: 40px !important; background: rgba(0,0,0,0.4) !important; border-radius: 50% !important; color: #fff !important; font-size: 18px !important; cursor: pointer !important; border: 1px solid rgba(255,255,255,0.1) !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: background 0.2s, transform 0.2s; }
.wss-lightbox-close:hover { background: rgba(255,255,255,0.2) !important; transform: scale(1.05); }

button.wss-lightbox-close {
    width: 20px;
    height: 20px;
    border-radius: 100%;
    padding: 20px;
}

/* Contenedores de scroll */
.wss-videos-container { height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.wss-videos-container::-webkit-scrollbar { display: none; }
.wss-video-slide { position: relative; height: 100dvh; width: 100%; scroll-snap-align: start; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wss-slide-video { width: 100%; height: 100%; object-fit: cover; }

/* Indicador de Pausa */
.wss-slide--paused::after { content: '⏸'; position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); font-size: 60px; color: rgba(255,255,255,0.8); z-index: 5; animation: wss-pause-flash 0.5s ease forwards; text-shadow: 0 4px 12px rgba(0,0,0,0.5); pointer-events: none; }
@keyframes wss-pause-flash { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }

/* Botón de volumen eliminado permanentemente */
.wss-volume-btn { display: none !important; }

/* ── TARJETA DEL PRODUCTO ── */
.wss-product-card { position: absolute; bottom: 28px; left: 20px; right: 20px; background: rgba(25,25,25,0.8); border-radius: 20px; padding: 18px; z-index: 100; max-width: 480px; margin: 0 auto; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.wss-product-content { display: flex; gap: 14px; align-items: center; }
.wss-product-thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.3); background: #fff; flex-shrink: 0; }
.wss-product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wss-product-info { flex: 1; min-width: 0; }
.wss-product-info h3 { font-size: 16px; font-weight: 600; color: #ffffff !important; margin: 0 0 4px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: inherit; }
.wss-product-info .price, .wss-product-info .price * { font-size: 18px; font-weight: 700; color: #e0e0e0 !important; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.5); background: transparent !important; }

/* ── BOTONES DE ACCIÓN BLINDADOS ── */
.wss-product-actions { display: flex; gap: 12px; margin-top: 16px; }
.wss-product-actions button.wss-add-to-cart { flex: 2; height: 40px; background: #fb0c4c !important; color: #ffffff !important; border: none !important; border-radius: 10px !important; font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.2s ease !important; box-shadow: 0 4px 12px rgb(134 21 51) !important; display: flex; align-items: center; justify-content: center; text-transform: uppercase; margin: 0 !important; padding: 0 !important; }
.wss-product-actions button.wss-add-to-cart:hover:not(:disabled) { background: #e0e0e0 !important; color: #000000 !important; transform: translateY(-2px) !important; box-shadow: 0 6px 16px rgba(255,255,255,0.3) !important; }
.wss-product-actions button.wss-add-to-cart:active:not(:disabled) { transform: translateY(0) !important; }
.wss-product-actions button.wss-add-to-cart.wss-btn--added { background: #00c853 !important; color: #ffffff !important; box-shadow: 0 4px 12px rgba(0,200,83,0.4) !important; }
.wss-product-actions a.wss-view-product { flex: 1; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15) !important; color: #ffffff !important; border: 1px solid rgba(255,255,255,0.3) !important; border-radius: 10px !important; text-decoration: none !important; font-size: 13px; font-weight: 600; transition: all 0.2s ease !important; box-shadow: none !important; margin: -1px !important; padding: 0 !important; }
.wss-product-actions a.wss-view-product:hover { background: rgba(255,255,255,0.3) !important; color: #ffffff !important; border-color: #ffffff !important; }

/* ── TOAST NOTIFICATIONS ── */
.wss-toast { position: fixed; bottom: 50px; left: 50%; transform: translateX(-50%); background: rgba(18,18,18,0.9); color: #fff !important; padding: 14px 28px; border-radius: 100px; font-size: 14px; font-weight: 500; z-index: 1000010; box-shadow: 0 8px 32px rgba(0,0,0,0.4); pointer-events: none; border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(10px); }
.wss-toast--error { background: rgba(220,53,69,0.95); border-color: rgba(255,100,100,0.3); }

/* ══════════════════════════════════════════════════════════════════
   ── PC / DESKTOP (BLINDADO CONTRA THEMES - ESTILO TIKTOK) ── 
   ══════════════════════════════════════════════════════════════════ */
@media (min-width: 800px) {
    /* 1. Fondo oscuro con difuminado (cubre todo el monitor) */
    .wss-lightbox {
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    /* 2. El Teléfono Virtual en el Centro (Ancho y alto bloqueados) */
    .wss-lightbox-container {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 420px !important; /* Ancho fijo para que no se estire */
        max-width: 95vw !important;
        height: 85vh !important; /* Alto fijo */
        border-radius: 24px !important; /* BORDES REDONDEADOS APLICADOS AQUÍ */
        overflow: hidden !important; /* Esto recorta la cabecera, videos y TODO lo que salga de las curvas */
        box-shadow: 0 20px 80px rgba(0,0,0,0.8) !important;
        border: 1px solid rgba(255,255,255,0.15) !important;
        background: #000000 !important;
    }

    /* 3. Ajustamos los slides internos para que no rompan el scroll */
    .wss-videos-container { height: 100% !important; }
    .wss-video-slide { height: 100% !important; }
    
    /* 4. Ajustar video sin recortarlo */
    .wss-slide-video {
        object-fit: cover !important; /* Muestra el video completo sin deformarlo */
        width: auto !important;
        height: 100% !important;
        border-radius: 0 !important; /* Eliminamos el borde del video porque la caja principal ya lo recorta */
    }
}

/* ── RESPONSIVE COMPLEMENTARIO ── */
@media (max-width: 1100px) { .wss-grid { --wss-columns: 4 !important; } }
@media (max-width: 800px) { .wss-grid { --wss-columns: 3 !important; gap: 10px; } }
@media (max-width: 540px) { .wss-grid { --wss-columns: 2 !important; } .wss-product-card { padding: 14px; bottom: 16px; left: 16px; right: 16px;} }
@media (max-width: 340px) { .wss-grid { --wss-columns: 1 !important; } }
