/* =================================================================
   SBM FLASH DEALS (TIKTOK SHOP SPLIT LAYOUT)
   ================================================================= */
#sbm-admin-virtual-products-container { margin-top: 1rem; padding-top: 0; display: none; max-width: 1100px; width: 100%; margin-left: auto; margin-right: auto; flex-direction: column; align-items: center; }
#sbm-admin-virtual-products-container.is-visible { display: flex; }

.sbm-vp-heading { display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 1.5rem; position: relative; width: 100%; color: #1f2937; }
.sbmalpha-container.sbmalpha-bg-image .sbm-vp-heading { color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.sbm-vp-heading::after { content: ''; display: block; width: 60px; height: 3px; background: var(--sbm-primary-color); position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); border-radius: 3px; }
.sbm-vp-heading svg { width: 28px; height: 28px; color: #d97706; stroke-width: 2px; margin: 0 8px 0 0; }

.sbm-vp-slider { display: flex; gap: 15px; overflow-x: auto; padding: 10px 10px 25px 10px; scroll-snap-type: x mandatory; cursor: grab; user-select: none; scrollbar-width: none; width: 100%; box-sizing: border-box; justify-content: flex-start; }
.sbm-vp-slider::-webkit-scrollbar { display: none; }
.sbm-vp-slider::after { content: ''; display: block; min-width: 10px; }
.sbm-vp-slider.active { cursor: grabbing; scroll-snap-type: none; }

.sbm-vp-card { flex: 0 0 140px; height: 250px; scroll-snap-align: start; position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.1); background: #000; border: 1px solid #eee; }
.sbm-vp-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
.sbm-vp-card img.sbm-vp-bg-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: transform 0.5s; pointer-events: none; }
.sbm-vp-card:hover img.sbm-vp-bg-img { transform: scale(1.1); opacity: 1; }
.sbm-vp-overlay { position: absolute; bottom: 0; left: 0; right: 0; height: 60%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); pointer-events: none; }
.sbm-vp-content { position: absolute; bottom: 12px; left: 10px; right: 10px; z-index: 2; text-align: left; }
.sbm-vp-title { color: #fff; font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.sbm-vp-price { color: #4ade80; font-weight: 700; font-size: 0.85rem; }

/* MODAL CHIA ĐÔI (SPLIT LAYOUT) */
#sbm-vp-story-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 100000; flex-direction: row; overflow: hidden; backdrop-filter: blur(10px); }
#sbm-vp-story-modal.is-visible { display: flex; }

/* CỘT TRÁI: STORY CHÍNH */
.sbm-story-main-col { flex: 7; position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.sbm-story-bg-blur { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(40px) brightness(0.3); z-index: -1; opacity: 0.8; }
.sbm-story-top-bar { position: absolute; top: 0; left: 0; right: 0; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; z-index: 40; background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent); }
.sbm-story-close { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); transition: 0.2s;}
.sbm-story-close:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }
.sbm-story-toggle-playlist { display: none; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 8px 16px; border-radius: 50px; font-size: 0.9rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(5px); }

.sbm-story-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; width: 100%; max-height: calc(100vh - 200px); padding: 20px; box-sizing: border-box; }
.sbm-story-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }

.sbm-story-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 30px 30px; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%); z-index: 30; text-align: left; }
.sbm-story-source-badge { display: inline-block; background: #3b82f6; color: #fff; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; text-transform: uppercase; margin-bottom: 10px; letter-spacing: 1px;}
.sbm-story-title { color: #fff; font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.sbm-story-price { color: #4ade80; font-size: 1.8rem; font-weight: 800; margin-bottom: 20px; }

/* 2 Nút Mới */
.sbm-story-actions { display: flex; gap: 15px; }
.sbm-story-btn { padding: 14px 20px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; border: none; transition: transform 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.sbm-story-btn:hover { transform: translateY(-3px); }
.sbm-btn-vp-cart { background: var(--sbm-primary-color); color: #fff; flex: 2; box-shadow: 0 5px 15px rgba(239,68,68,0.3); }
.sbm-btn-vp-contact { background: rgba(255,255,255,0.15); color: #fff; flex: 1; border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(10px); }

/* CỘT PHẢI: PLAYLIST (DANH SÁCH PHÁT) */
.sbm-story-playlist-col { flex: 3; background: #fff; height: 100%; overflow-y: auto; border-left: 1px solid #e5e7eb; display: flex; flex-direction: column; transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.sbm-playlist-header { padding: 20px; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); z-index: 10; }
.sbm-playlist-header h4 { margin: 0; font-size: 1.1rem; color: #111827; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sbm-playlist-close { display: none; background: none; border: none; font-size: 1.5rem; color: #6b7280; cursor: pointer; }

.sbm-playlist-content { padding: 15px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.sbm-pl-item { display: flex; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; background: #f9fafb; }
.sbm-pl-item:hover { background: #f3f4f6; }
.sbm-pl-item.is-active { border-color: var(--sbm-primary-color); background: #fef2f2; }
.sbm-pl-item img { width: 60px; height: 80px; border-radius: 8px; object-fit: cover; box-shadow: 0 2px 5px rgba(0,0,0,0.1); flex-shrink: 0; }
.sbm-pl-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.sbm-pl-title { font-size: 0.9rem; font-weight: 600; color: #374151; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.sbm-pl-price { font-size: 0.9rem; font-weight: 700; color: #ef4444; }
.sbm-playlist-loader { padding: 20px; text-align: center; }

/* MOBILE RESPONSIVE (DRAWER EFFECT) */
@media (max-width: 768px) {
    .sbm-story-main-col { flex: 1 1 100%; }
    .sbm-story-toggle-playlist { display: block; }
    
    .sbm-story-playlist-col { 
        position: absolute; right: 0; top: 0; bottom: 0; width: 85%; 
        transform: translateX(100%); z-index: 100; 
        box-shadow: -10px 0 30px rgba(0,0,0,0.2); 
    }
    .sbm-story-playlist-col.is-open { transform: translateX(0); }
    .sbm-playlist-close { display: block; }
}