/* ══ ANTI-FLATSOME ════════════════════════════════════════ */
html, body { overflow: unset !important; }
.x-modal-overlay, .off-canvas-overlay, #x-off-canvas-bg,
.flatsome-overlay, #overlay-bg, .header-overlay,
.nav-overlay, .off-canvas-bg {
  display: none !important;
  pointer-events: none !important;
}

/* ══ RESET ════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ══ WRAPPER ══════════════════════════════════════════════ */
#vs-wrapper {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: #161823;
  color: #fff;
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: clip;
}

/* ══ ADMIN BAR OFFSETS ════════════════════════════════════ */
body.admin-bar #vs-wrapper  { margin-top: 32px; }
body.admin-bar .vs-header   { top: 32px !important; }
body.admin-bar .vs-tabs     { top: 92px !important; }
body.admin-bar .vs-video-cat-bar { top: 136px !important; }
body.admin-bar .vs-cat-bar  { top: 136px !important; }

@media (max-width: 782px) {
  body.admin-bar #vs-wrapper { margin-top: 32px; }
  body.admin-bar .vs-header  { top: 32px !important; }
  body.admin-bar .vs-tabs    { top: 92px !important; }
}

/* ══ SKELETON ═════════════════════════════════════════════ */
@keyframes skel { 0%,100%{opacity:.3} 50%{opacity:.6} }
.vs-skel {
  background: #2a2a3a; border-radius: 6px;
  animation: skel 1.6s ease-in-out infinite;
  display: block;
}
@keyframes spin { to{transform:rotate(360deg)} }
.vs-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #fe2c55;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.vs-header {
  position: fixed;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  z-index: 200;
  padding: 10px 14px 28px;
  background: linear-gradient(to bottom,
    rgba(10,10,18,0.97) 0%,
    rgba(10,10,18,0.7) 55%,
    transparent 100%);
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.vs-header > * { pointer-events: all; }

.vs-shop-info { display: flex; align-items: center; gap: 10px; }

.vs-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2.5px solid transparent;
  background: linear-gradient(#161823,#161823) padding-box,
              linear-gradient(135deg,#fe2c55,#ff9500,#fe2c55) border-box;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(254,44,85,0.25), 0 4px 14px rgba(0,0,0,0.5);
}
.vs-avatar img { width:100%; height:100%; object-fit:cover; }

.vs-shop-name      { font-size: 14px; font-weight: 800; line-height: 1.2; letter-spacing: -0.2px; }
.vs-shop-followers { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 1px; }

.vs-header-actions { display: flex; gap: 8px; align-items: center; }

.vs-admin-toggle-btn {
  background: linear-gradient(135deg,#667eea,#764ba2);
  color: #fff; border: none; border-radius: 20px;
  padding: 7px 14px; font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 3px 10px rgba(102,126,234,0.4);
  white-space: nowrap;
}
.vs-follow-btn {
  background: #fe2c55; color: #fff; border: none;
  border-radius: 20px; padding: 7px 14px; font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(254,44,85,0.35);
}
.vs-follow-btn.following {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
  box-shadow: none;
}
.vs-cart-icon {
  position: relative; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: rgba(255,255,255,0.1); border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
}
.vs-cart-count {
  position: absolute; top: -3px; right: -3px;
  background: #fe2c55; color: #fff; font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #161823;
}

/* ══════════════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════════════ */
.vs-tabs {
  position: fixed;
  top: 60px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  z-index: 199;
  display: flex;
  background: rgba(16,17,26,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.vs-tab {
  flex: 1; text-align: center; padding: 10px 0 8px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.45);
  cursor: pointer; position: relative;
  transition: color .2s;
}
.vs-tab.active { color: #fff; }
.vs-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 2px; background: #fe2c55; border-radius: 2px;
}

/* ══════════════════════════════════════════════════════════
   CATEGORY FILTER BAR — Video tab
══════════════════════════════════════════════════════════ */
.vs-video-cat-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 6px 12px 5px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 104px;
  z-index: 15;
  background: rgba(10,10,18,0.8);
  backdrop-filter: blur(10px);
}
.vs-video-cat-bar::-webkit-scrollbar { display: none; }
.vs-video-cat-bar.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════
   CATEGORY FILTER BAR — Sản phẩm tab
══════════════════════════════════════════════════════════ */
.vs-cat-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: rgba(16,17,26,0.98);
  position: sticky;
  top: 92px;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vs-cat-bar::-webkit-scrollbar { display: none; }

/* ══ CHIP CHUNG ═══════════════════════════════════════════ */
.vs-cat-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  flex-shrink: 0 !important;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}
.vs-cat-chip.active {
  background: rgba(254,44,85,0.15);
  border-color: #fe2c55;
  color: #fe2c55;
}
.vs-video-cat-bar .vs-cat-chip.active {
  background: rgba(11,95,255,0.15);
  border-color: #4d80ff;
  color: #7aa8ff;
}
.vs-cat-chip:active { transform: scale(0.93); }

/* ══ CAT BAR TRONG TAB SẢN PHẨM — nền trắng ══════════════ */
#vsProductList .vs-cat-bar {
  background: #fff !important;
  border-bottom: 1px solid #f0f0f0 !important;
  top: 92px;
}
#vsProductList .vs-cat-chip {
  background: #f5f5f5 !important;
  border: 1.5px solid #e8e8e8 !important;
  color: #555 !important;
}
#vsProductList .vs-cat-chip.active {
  background: rgba(254,44,85,0.08) !important;
  border-color: #fe2c55 !important;
  color: #fe2c55 !important;
}


/* ══════════════════════════════════════════════════════════
   VIDEO FEED — TikTok scroll snap dứt khoát
══════════════════════════════════════════════════════════ */
.vs-feed {
  position: fixed;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: 100dvh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  z-index: 1;
}
.vs-feed::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════════════════
   VIDEO ITEM
══════════════════════════════════════════════════════════ */
.vs-video-item {
  position: relative;
  width: 100%; height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
}
.vs-video-bg {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  background: #111;
}
.vs-yt-iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  border: 0; pointer-events: none;
}
@supports (aspect-ratio: 9/16) {
  .vs-yt-iframe { aspect-ratio: 9/16; width: auto; height: 100%; min-width: 100%; }
}
.vs-tiktok-wrap {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.vs-tiktok-wrap blockquote { margin:0!important; width:100%!important; }
.vs-tiktok-wrap iframe { width:100%!important; height:100%!important; }
.vs-video-mp4 { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vs-no-video {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(160deg,#1a1a2e,#16213e,#0f3460);
}
.vs-quick-edit-btn {
  position: absolute; top: 86px; left: 12px; z-index: 20;
  background: rgba(102,126,234,0.9); backdrop-filter: blur(6px);
  color: #fff; border: none; border-radius: 7px;
  padding: 5px 11px; font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}

/* ── Action buttons phải ─────────────────────────────── */
.vs-video-actions {
  position: absolute; right: 10px; bottom: 225px;
  z-index: 10;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.vs-action-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.vs-action-circle {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.vs-action-circle:active { transform: scale(0.9); }
.vs-action-circle.liked  { background: rgba(254,44,85,0.4); }
.vs-action-label { font-size: 10px; color: #fff; font-weight: 600; }

/* ── Info bên dưới ────────────────────────────────────── */
.vs-video-info {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  padding: 0 12px 72px;
  background: linear-gradient(to top, rgba(0,0,0,0.97) 0%, rgba(0,0,0,0.6) 45%, transparent 100%);
  pointer-events: none;
}
.vs-video-info > * { pointer-events: all; }

.vs-voucher-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(26,188,156,0.15); border: 1px solid rgba(26,188,156,0.35);
  border-radius: 8px; padding: 7px 11px; margin-bottom: 8px;
}
.vs-voucher-text { font-size: 11px; color: #1abc9c; font-weight: 600; }
.vs-claim-btn {
  background: #1abc9c; color: #fff; border: none; border-radius: 5px;
  padding: 4px 10px; font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.vs-sold-bar { font-size: 10px; color: rgba(255,255,255,0.5); margin-bottom: 5px; }

/* ══════════════════════════════════════════════════════════
   SẢN PHẨM CHÍNH — compact 1 hàng
══════════════════════════════════════════════════════════ */
.vs-main-product-card {
  background: rgba(10,10,20,0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  padding: 8px 10px 8px 8px; cursor: pointer; margin-bottom: 7px;
  transition: transform .15s;
  display: flex; gap: 9px; align-items: center;
}
.vs-main-product-card:active { transform: scale(0.98); }

.vs-product-img-small {
  width: 50px; height: 50px; border-radius: 9px; flex-shrink: 0;
  overflow: hidden; background: #1e1e2a;
}
.vs-product-img-small img { width:100%; height:100%; object-fit:cover; }

.vs-product-name-inline {
  font-size: 12px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 2px;
}
.vs-product-badges { display: flex; gap: 4px; align-items: center; margin-bottom: 3px; }
.vs-badge { font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.vs-badge-freeship { background: rgba(26,188,156,0.15); color: #1abc9c; border: 1px solid rgba(26,188,156,0.3); }
.vs-badge-sale     { background: rgba(254,44,85,0.18); color: #fe2c55; border: 1px solid rgba(254,44,85,0.3); }
.vs-badge-oos      { background: rgba(170,170,170,0.12); color: #aaa; border: 1px solid rgba(170,170,170,0.25); }
.vs-price-current  { font-size: 14px; font-weight: 800; color: #fe2c55; }
.vs-price-old      { font-size: 10px; color: rgba(255,255,255,0.35); text-decoration: line-through; margin-left: 4px; }

.vs-buy-btn-small {
  background: #fe2c55; color: #fff; border: none; border-radius: 20px;
  padding: 8px 14px; font-size: 11px; font-weight: 800;
  cursor: pointer; font-family: inherit; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(254,44,85,0.4);
}

/* ══════════════════════════════════════════════════════════
   SHELF — mở lên trên
══════════════════════════════════════════════════════════ */
.vs-shelf-wrapper { position: relative; }

.vs-shelf-hint {
  display: flex; align-items: center; gap: 7px;
  background: rgba(14,14,24,0.93); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.09); border-radius: 10px;
  padding: 8px 10px; cursor: pointer; position: relative; overflow: hidden;
}
.vs-shelf-hint::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.05),transparent);
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer { 0%{left:-100%} 100%{left:220%} }
.vs-shelf-glow {
  position: absolute; inset: 0; border-radius: 10px; pointer-events: none;
  border: 1px solid rgba(254,44,85,0);
  animation: glow 2s ease-in-out infinite;
}
@keyframes glow {
  0%,100%{border-color:rgba(254,44,85,0)}
  50%{border-color:rgba(254,44,85,0.5);box-shadow:0 0 8px rgba(254,44,85,0.2)}
}
.vs-shelf-hint.shelf-open { border-radius: 0 0 10px 10px; }
.vs-shelf-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fe2c55; flex-shrink: 0;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.45);opacity:.7} }
.vs-shelf-thumbs { display: flex; gap: 3px; }
.vs-thumb-mini {
  width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.15); overflow: hidden;
  animation: float 2.5s ease-in-out infinite;
}
.vs-thumb-mini:nth-child(2){animation-delay:.5s}
.vs-thumb-mini:nth-child(3){animation-delay:1s}
.vs-thumb-mini img { width:100%; height:100%; object-fit:cover; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
.vs-shelf-hint-title { font-size:11px; font-weight:700; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vs-shelf-hint-sub   { font-size:10px; color:#aaa; margin-top:1px; }
.vs-shelf-arrow { color:#aaa; flex-shrink:0; transition:transform .35s; display:flex; align-items:center; }
.vs-shelf-hint.shelf-open .vs-shelf-arrow { transform: rotate(180deg); }

/* Panel mở LÊN TRÊN — cuộn dọc kiểu TikTok Live */
/* ── SHELF PANEL: TikTok Live style bottom sheet ── */
.vs-shelf-panel {
  position: absolute;
  bottom: 100%; left: 0; right: 0;
  height: 0;
  overflow: hidden;
  background: rgba(10,10,18,0.97); backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.07); border-bottom: none;
  border-radius: 14px 14px 0 0;
  will-change: transform, height;
  touch-action: none;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}
.vs-shelf-panel.shelf-panel-open {
  overflow: visible;
}
/* Drag handle */
.vs-shelf-drag-handle {
  flex-shrink: 0;
  padding: 10px 0 4px;
  display: flex; align-items: center; justify-content: center;
  cursor: grab; touch-action: none;
}
.vs-shelf-drag-handle-bar {
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.22);
  border-radius: 2px;
}
.vs-shelf-panel-header {
  padding:9px 12px 7px; font-size:11px; font-weight:700; color:#fff;
  letter-spacing:.3px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  display:flex; align-items:center; justify-content:space-between;
  flex-shrink: 0;
  background: rgba(10,10,18,0.97);
}
.vs-shelf-count {
  background:rgba(254,44,85,0.18); color:#fe2c55;
  font-size:10px; font-weight:700; padding:2px 8px; border-radius:10px;
}
/* ── Cuộn DỌC — flex:1 để lấp đầy panel, scroll bên trong ── */
.vs-shelf-scroll {
  display:flex; flex-direction:column; gap:0;
  flex: 1; min-height: 0;
  overflow-y:auto; overflow-x:hidden;
  padding:4px 0 8px;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
  overscroll-behavior: contain;
}
.vs-shelf-scroll::-webkit-scrollbar { display:none; }

/* ── Item nằm NGANG: ảnh trái, info phải ── */
.vs-shelf-item {
  display:flex; flex-direction:row; align-items:center; gap:10px;
  padding:8px 12px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  cursor:pointer;
  opacity:0; animation:slideIn .3s ease forwards;
  background: transparent;
  transition: background .15s;
}
.vs-shelf-item:last-child { border-bottom:none; }
.vs-shelf-item:active { background: rgba(255,255,255,0.06); }
@keyframes slideIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.vs-shelf-item-img {
  width:64px; height:64px; flex-shrink:0;
  border-radius:8px; overflow:hidden; position:relative;
}
.vs-shelf-item-img img { width:100%; height:100%; object-fit:cover; display:block; }
.vs-shelf-sale-tag {
  position:absolute; top:3px; left:3px;
  background:#fe2c55; color:#fff; font-size:9px; font-weight:700;
  padding:1px 4px; border-radius:3px;
}
/* Info bên phải */
.vs-shelf-item-body { flex:1; min-width:0; }
.vs-shelf-freeship  { font-size:9px; color:#1abc9c; font-weight:600; margin-bottom:2px; }
.vs-shelf-item-name {
  font-size:12px; font-weight:600; color:#fff; line-height:1.35; margin-bottom:4px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.vs-shelf-item-price { font-size:13px; font-weight:800; color:#fe2c55; }
.vs-shelf-item-old  { font-size:10px; color:#888; text-decoration:line-through; margin-left:4px; }
/* Hàng giá + nút Mua nằm cùng dòng */
.vs-shelf-item-price-row {
  display:flex; align-items:center; gap:6px; flex-wrap:nowrap; margin-top:3px;
}
.vs-shelf-item-btn {
  margin-left:auto; flex-shrink:0;
  background:#fe2c55; color:#fff; border:none;
  border-radius:5px; padding:4px 10px; font-size:10px; font-weight:700;
  cursor:pointer; font-family:inherit; white-space:nowrap;
}

/* ══════════════════════════════════════════════════════════
   PRODUCT LIST TAB — Shopee style, nền trắng
══════════════════════════════════════════════════════════ */

/* Toàn bộ tab sản phẩm nền trắng */
#vsProductList {
  background: #f5f5f5 !important;
  min-height: 100%;
}

.vs-product-group  { margin-bottom: 8px; }
.vs-group-header   {
  padding: 12px 14px 8px;
  font-size: 13px; font-weight: 800; color: #111;
  background: #fff;
  display: flex; align-items: center; gap: 6px;
}
.vs-group-header::before {
  content: ''; display: inline-block;
  width: 3px; height: 16px; background: #fe2c55;
  border-radius: 2px; flex-shrink: 0;
}

/* ══ PRODUCT GRID — TikTok Shop / Shopee masonry style ════ */
/* Desktop / tablet: CSS grid bình thường */
.vs-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px 4px 8px;
  background: #f5f5f5;
  align-items: start;
}

/* ── Mobile: 2 cột dạng cột độc lập (column layout) ── */
@media (max-width: 767px) {
  .vs-grid-masonry {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 4px;
    padding: 4px 4px 8px;
  }
  /* Mỗi cột là 1 flex-column */
  .vs-masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  /* Cột phải offset = 50% chiều cao ảnh = 50% width card
     width card ≈ (100vw - 12px) / 2
     50% ảnh = (100vw - 12px) / 4                        */
  .vs-masonry-col:last-child {
    margin-top: calc((100vw - 12px) / 4);
  }
  /* Trong masonry, card full width của cột */
  .vs-masonry-col .vs-product-card {
    width: 100%;
  }
}

/* Card */
.vs-product-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.vs-product-card:active { opacity: 0.88; }

/* Ảnh wrapper */
.vs-product-card-img {
  width: 100%; aspect-ratio: 1/1;
  position: relative; overflow: hidden;
  background: #f2f2f2;
}
.vs-product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: opacity .3s;
}

/* ── VIDEO overlay trong card ── */
.vs-pc-video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;   /* click xuyên qua xuống card */
  z-index: 2;
}

/* Badge "▶ Video" góc dưới trái khi có video */
.vs-pc-yt-iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none;opacity:0;transition:opacity .4s;z-index:3;pointer-events:none;}
.vs-pc-yt-thumb{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;z-index:2;transition:opacity .3s;}
.vs-pc-vid-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.2);display:flex;align-items:center;justify-content:center;z-index:4;cursor:pointer;transition:opacity .25s;-webkit-tap-highlight-color:transparent;pointer-events:none;}
.vs-pc-vid-overlay:active{background:rgba(0,0,0,.4);}
.vs-pc-play-circle{width:48px;height:48px;background:rgba(0,0,0,.5);border-radius:50%;border:2.5px solid rgba(255,255,255,.85);display:flex;align-items:center;justify-content:center;backdrop-filter:blur(4px);pointer-events:none;}
.vs-pc-vid-overlay:active .vs-pc-play-circle{transform:scale(.88);}
.vs-pc-video-badge {
  position: absolute; bottom: 22px; left: 0;
  background: rgba(0,0,0,0.55);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 7px 2px 5px;
  border-radius: 0 10px 10px 0;
  display: flex; align-items: center; gap: 3px;
  z-index: 3;
  backdrop-filter: blur(2px);
}

/* Sale badge góc trên phải */
.vs-pc-sale-badge {
  position: absolute; top: 0; right: 0;
  background: linear-gradient(135deg, #ff6b00, #fe2c55);
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 2px 7px;
  border-radius: 0 0 0 8px;
  z-index: 4;
}

/* Freeship ribbon dưới ảnh */
.vs-pc-freeship-tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,163,122,0.88);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 6px;
  display: flex; align-items: center; gap: 2px;
  z-index: 4;
}

/* Body */
.vs-product-card-body {
  padding: 7px 8px 9px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}

/* Tên 2 dòng */
.vs-product-card-name {
  font-size: 12px; font-weight: 500; color: #222;
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Stars */
.vs-pc-stars { display: flex; align-items: center; gap: 1px; font-size: 11px; }
.vs-star-f { color: #f5a623; }
.vs-star-h { color: #f5a623; opacity: 0.55; }
.vs-star-e { color: #ddd; }
.vs-pc-rating-val { font-size: 10px; font-weight: 700; color: #f5a623; margin-left: 2px; }
.vs-pc-rating-cnt { font-size: 10px; color: #bbb; }

/* Price */
.vs-product-card-price-row { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.vs-product-card-price { font-size: 14px; font-weight: 800; color: #fe2c55; }
.vs-product-card-old   { font-size: 10px; color: #bbb; text-decoration: line-through; }

/* Meta sold + ship */
.vs-pc-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px; }
.vs-pc-sold { font-size: 10px; color: #888; font-weight: 500; }
.vs-pc-ship { font-size: 10px; color: #00a37a; font-weight: 600; }

/* Ẩn elements cũ */
.vs-product-card-btn    { display: none !important; }
.vs-product-card-sold   { display: none !important; }
.vs-product-card-freeship { display: none !important; }
.vs-product-sale-tag    { display: none !important; }


/* ── Tablet+ thẳng hàng, no stagger ── */
@media (min-width: 768px) {
  .vs-product-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 12px !important;
    padding: 0 16px 16px !important;
  }
  .vs-card-odd { margin-top: 0 !important; }
}

/* ── Mute overlay: hiện khi video tự play muted ── */


.vs-mute-btn:active { transform: scale(0.96); }
@keyframes vsMuteFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Mute icon: nhỏ góc trên phải video, tự mất khi user chạm ── */
.vs-muted-icon {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 30;
  width: 34px; height: 34px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  animation: vsMuteIconIn .3s ease;
}
@keyframes vsMuteIconIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* ══════════════════════════════════════════════════════════
   BOTTOM NAV
══════════════════════════════════════════════════════════ */
.vs-bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  z-index: 200;
  display: flex;
  align-items: stretch;
  background: #fff;
  border-top: 1px solid #efefef;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding: 0 0 max(env(safe-area-inset-bottom),0px);
  height: 56px;
}
.vs-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; padding: 6px 0;
  position: relative;
  color: #999;
  transition: color .2s;
}
.vs-nav-item svg { transition: transform .2s; }
.vs-nav-item span {
  font-size: 10px; font-weight: 600;
  color: inherit; line-height: 1;
}
/* Active state */
.vs-nav-item.active {
  color: #fe2c55;
}
.vs-nav-item.active svg {
  transform: scale(1.1);
}
/* Active indicator dot trên icon */
.vs-nav-item.active::before {
  content: '';
  position: absolute;
  top: 5px;
  width: 4px; height: 4px;
  background: #fe2c55;
  border-radius: 50%;
}
/* Cart item — nút đặc biệt */
.vs-nav-cart-btn {
  flex: 1.4;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 10px;
}
.vs-nav-cart-inner {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #fe2c55;
  color: #fff;
  border-radius: 22px;
  padding: 8px 14px;
  width: 100%;
  font-size: 12px; font-weight: 800;
  position: relative;
  box-shadow: 0 3px 10px rgba(254,44,85,0.35);
  transition: transform .15s, box-shadow .15s;
}
.vs-nav-cart-inner:active {
  transform: scale(0.95);
  box-shadow: 0 1px 6px rgba(254,44,85,0.25);
}
.vs-nav-cart-inner svg { flex-shrink: 0; }
.vs-cart-count-nav {
  position: absolute;
  top: -6px; right: -6px;
  background: #fff; color: #fe2c55;
  border: 2px solid #fe2c55;
  font-size: 10px; font-weight: 900;
  min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.vs-nav-icon   { font-size:22px; line-height:1; }
.vs-nav-label  { font-size:9px; color:inherit; font-weight:600; }
.vs-nav-item.active .vs-nav-label { color:#fe2c55; font-weight:700; }
.vs-nav-item.active .vs-nav-icon  { filter:drop-shadow(0 0 6px rgba(254,44,85,0.5)); }

/* ══════════════════════════════════════════════════════════
   OVERLAY + PANELS
══════════════════════════════════════════════════════════ */
.vs-overlay {
  position:fixed; inset:0; z-index:300;
  background:rgba(0,0,0,0.6); backdrop-filter:blur(4px);
  opacity:0; pointer-events:none; transition:opacity .3s;
}
.vs-overlay.open { opacity:1; pointer-events:all; }
/* ══════════════════════════════════════════════════════════
   DETAIL PANEL + CART PANEL — base
══════════════════════════════════════════════════════════ */
.vs-detail-panel {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 430px; z-index: 301;
  background: #ffffff; border-radius: 20px 20px 0 0;
  transition: transform .4s cubic-bezier(0.32,0.72,0,1);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vs-detail-panel.open { transform: translateX(-50%) translateY(0); }

.vs-cart-panel {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 430px; z-index: 301;
  background: #1a1b28; border-radius: 20px 20px 0 0;
  transition: transform .4s cubic-bezier(0.32,0.72,0,1);
  max-height: 90dvh; overflow-y: auto;
}
.vs-cart-panel.open { transform: translateX(-50%) translateY(0); }

/* Handle kéo xuống đóng */
.vs-detail-handle {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 0 4px; cursor: pointer; flex-shrink: 0;
  background: #fff;
}

/* Body cuộn */
.vs-detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
}
.vs-detail-body::-webkit-scrollbar { display: none; }

/* ── Gallery ─────────────────────────────────────────────── */
.vs-detail-gallery {
  position: relative;
  width: 100%;
  background: #f5f5f5;
  flex-shrink: 0;
}
.vs-gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  position: relative;
}
/* Gallery strip — horizontal scroll */
#vsGalleryStrip {
  display: flex !important;
  flex-direction: row !important;
  width: 100%;
  height: 100%;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#vsGalleryStrip::-webkit-scrollbar { display: none; }
#vsGalleryStrip > div {
  min-width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}
#vsGalleryStrip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Thumbnails */
.vs-gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.vs-gallery-thumbs::-webkit-scrollbar { display: none; }
.vs-gallery-thumb {
  width: 48px; height: 48px;
  border-radius: 7px; flex-shrink: 0; overflow: hidden;
  cursor: pointer;
  border: 2px solid #eee;
  transition: border-color .2s;
}
.vs-gallery-thumb.active { border-color: #fe2c55; }
.vs-gallery-thumb img { width:100%; height:100%; object-fit:cover; }

.vs-gallery-count {
  position: absolute; top: 10px; left: 12px;
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
  pointer-events: none;
}

/* ── Price / Title / Badges ─────────────────────────────── */
.vs-detail-price-section {
  padding: 10px 14px 8px;
  border-bottom: 1px solid #f0f0f0;
}
.vs-detail-title-section {
  padding: 10px 14px 10px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.vs-detail-title { font-size: 15px; font-weight: 700; line-height: 1.45; color: #111; }
.vs-price-old {
  font-size: 12px; color: #bbb;
  text-decoration: line-through; margin-left: 4px;
}
.vs-detail-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 5px; white-space: nowrap;
}
.vs-badge-green  { background:rgba(26,188,156,0.15); color:#1abc9c; border:1px solid rgba(26,188,156,0.3); }
.vs-badge-orange { background:rgba(255,102,0,0.1);   color:#ff8800; border:1px solid rgba(255,102,0,0.25); }

/* ── Section label ──────────────────────────────────────── */
.vs-section-label {
  font-size: 12px; font-weight: 700; color: #888;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}

/* ── Variants ───────────────────────────────────────────── */
.vs-variant-section {
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.vs-variant-options { display: flex; gap: 7px; flex-wrap: wrap; }
.vs-variant-btn {
  padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  border: 1.5px solid #ddd;
  background: #f8f8f8; color: #333;
  cursor: pointer; font-family: inherit;
}
.vs-variant-btn.selected { border-color:#fe2c55; color:#fe2c55; background:rgba(254,44,85,0.1); }
.vs-variant-btn:disabled { opacity:.35; pointer-events:none; }

/* ── Qty ─────────────────────────────────────────────────── */
.vs-qty-section {
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between;
}
.vs-qty-btn {
  width: 34px; height: 34px; border-radius: 9px;
  background: #f5f5f5; border: 1px solid #e0e0e0;
  color: #333; font-size: 20px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
}
.vs-qty-num { width: 44px; text-align: center; font-size: 16px; font-weight: 700; color: #111; }

/* ══════════════════════════════════════════════════════════
   DETAIL ACTIONS — footer bar: [phone][zalo][thêm giỏ][mua ngay]
══════════════════════════════════════════════════════════ */
.vs-detail-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 7px;
  padding: 10px 12px max(env(safe-area-inset-bottom), 12px);
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

/* Phone / Zalo icon buttons — compact + pulse animation */
.vs-contact-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.vs-phone-btn {
  background: rgba(229,57,53,0.15);
  border: 1.5px solid rgba(229,57,53,0.45);
  animation: phonePulse 2s ease-in-out infinite;
}
@keyframes phonePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(229,57,53,0.5); transform: scale(1); }
  40%      { box-shadow: 0 0 0 8px rgba(229,57,53,0); transform: scale(1.08); }
}
.vs-zalo-btn {
  background: rgba(0,104,255,0.12);
  border: 1.5px solid rgba(0,104,255,0.45);
  animation: zaloPulse 2s ease-in-out infinite;
  animation-delay: 1s;
}
@keyframes zaloPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,104,255,0.5); transform: scale(1); }
  40%      { box-shadow: 0 0 0 8px rgba(0,104,255,0); transform: scale(1.08); }
}
.vs-contact-btn:active { transform: scale(0.88) !important; animation: none !important; }

/* Thêm giỏ button */
#vsAddCartBtn {
  height: 40px;
  flex: 1;
  border-radius: 12px;
  font-size: 12px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  background: #fff;
  border: 1.5px solid #fe2c55;
  color: #fe2c55;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap;
}
#vsAddCartBtn:active { background: rgba(254,44,85,0.22); }

/* Mua ngay button */
#vsBuyNowBtn {
  height: 40px;
  flex: 1.7;
  border-radius: 12px;
  font-size: 12px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  border: none;
  background: #fe2c55; color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 3px 12px rgba(254,44,85,0.35);
  white-space: nowrap;
}
#vsBuyNowBtn:active { transform: scale(0.97); }
#vsBuyNowBtn span:first-child { font-size: 13px; font-weight: 800; }
#vsBuyNowBtn span:last-child  { font-size: 10px; opacity: .85; font-weight: 600; }

.vs-variant-label  { font-size:12px; color:#555; margin-bottom:8px; font-weight:600; }
.vs-variant-scroll { display:flex; gap:7px; flex-wrap:wrap; margin-bottom:14px; }
.vs-variant-btn {
  padding:6px 12px; border-radius:8px; font-size:12px; font-weight:600;
  border:1.5px solid #ddd; background:#f8f8f8;
  color:#333; cursor:pointer; font-family:inherit;
}
.vs-variant-btn.selected { border-color:#fe2c55; color:#fe2c55; background:rgba(254,44,85,0.06); }
.vs-variant-btn:disabled { opacity:.35; pointer-events:none; }
.vs-qty-row { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.vs-qty-label { font-size:12px; color:#555; font-weight:600; }
.vs-qty-ctrl { display:flex; align-items:center; }
.vs-qty-btn {
  width:32px; height:32px; border-radius:8px;
  background:#f5f5f5; border:1px solid #e0e0e0;
  color:#333; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.vs-qty-val { width:40px; text-align:center; font-size:15px; font-weight:700; color:#111; }
.vs-rating-row { display:flex; align-items:center; gap:6px; margin-bottom:12px; }
.vs-stars { color:#ffd700; font-size:13px; }
.vs-rating-count { font-size:12px; color:#888; }
.vs-review-item { padding:12px 0; border-bottom:1px solid #f0f0f0; }
.vs-review-item:last-child { border-bottom: none; }
.vs-review-author { font-size:13px; font-weight:700; margin-bottom:3px; color:#111; }
.vs-review-text { font-size:12px; color:#444; line-height:1.6; margin-top:4px; word-break:break-word; }
.vs-review-date { font-size:11px; color:#aaa; margin-top:4px; }

.vs-cart-header { display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,0.07); }
.vs-cart-title  { font-size:15px; font-weight:700; }
.vs-cart-body   { padding:12px 16px; }
.vs-cart-item   { display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid rgba(255,255,255,0.06); }
.vs-cart-item-img { width:52px;height:52px;border-radius:8px;overflow:hidden;flex-shrink:0;background:#1e1e2a; }
.vs-cart-item-img img { width:100%;height:100%;object-fit:cover; }
.vs-cart-item-name  { font-size:12px;font-weight:600;margin-bottom:4px;line-height:1.35; }
.vs-cart-item-price { font-size:13px;font-weight:800;color:#fe2c55; }
.vs-cart-empty { padding:40px 0;text-align:center;color:#666;font-size:14px; }
.vs-cart-footer { padding:12px 16px max(env(safe-area-inset-bottom),12px);border-top:1px solid rgba(255,255,255,0.07); }
.vs-cart-total  { display:flex;justify-content:space-between;align-items:center;margin-bottom:12px; }
.vs-cart-total-label { font-size:13px;color:#aaa; }
.vs-cart-total-val   { font-size:18px;font-weight:800;color:#fe2c55; }
.vs-cart-checkout {
  width:100%;padding:14px;background:#fe2c55;color:#fff;border:none;
  border-radius:10px;font-size:14px;font-weight:800;cursor:pointer;font-family:inherit;
}

/* ══════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════ */
.vs-toast {
  position:fixed; bottom:80px; left:50%; transform:translateX(-50%) translateY(20px);
  background:rgba(30,30,45,0.95); color:#fff; padding:10px 20px;
  border-radius:20px; font-size:13px; font-weight:600;
  z-index:500; pointer-events:none; opacity:0;
  transition:opacity .3s, transform .3s;
  white-space:nowrap; backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,0.1);
}
.vs-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════════════════
   GALLERY
══════════════════════════════════════════════════════════ */
.vs-gallery-strip {
  display:flex; overflow-x:auto; scroll-snap-type:x mandatory;
  scrollbar-width:none; width:100%; aspect-ratio:1; background:#0a0a14;
}
.vs-gallery-strip::-webkit-scrollbar { display:none; }
.vs-gallery-strip img { flex-shrink:0; width:100%; height:100%; object-fit:contain; scroll-snap-align:start; display:block; }

/* ══ PROMO ════════════════════════════════════════════════ */
.vs-promo-list { padding:12px; display:flex; flex-direction:column; gap:10px; }
.vs-promo-card {
  background:linear-gradient(135deg,#1e1f2e,#252637);
  border-radius:14px; padding:16px;
  border:1px solid rgba(255,255,255,0.07);
  display:flex; justify-content:space-between; align-items:center;
}
.vs-promo-title { font-size:14px; font-weight:700; margin-bottom:5px; }
.vs-promo-sub   { font-size:12px; color:#aaa; }
.vs-promo-claim {
  background:#fe2c55; color:#fff; border:none;
  border-radius:20px; padding:8px 16px; font-size:11px; font-weight:700;
  cursor:pointer; font-family:inherit; flex-shrink:0; margin-left:12px;
}

/* ══ FLOATING + MUTE ══════════════════════════════════════ */
.vs-floating-heart {
  position:absolute; z-index:50; pointer-events:none;
  animation:flyUp 1.2s ease-out forwards; font-size:24px;
}
@keyframes flyUp { 0%{transform:translateY(0) scale(.5);opacity:1} 100%{transform:translateY(-180px) scale(1.2);opacity:0} }


/* ══ CONTACT ══════════════════════════════════════════════ */
.vs-contact-bar { display:flex; gap:8px; margin-top:8px; }
.vs-contact-btn {
  flex:1; display:flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 10px; border-radius:10px; border:none;
  font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; transition:transform .15s;
}
.vs-contact-btn:active { transform:scale(0.96); }
.vs-contact-phone { background:rgba(26,188,156,0.15); color:#1abc9c; border:1px solid rgba(26,188,156,0.3); }
.vs-contact-zalo  { background:rgba(0,100,255,0.12); color:#5599ff; border:1px solid rgba(0,100,255,0.25); }

/* ══════════════════════════════════════════════════════════
   PRODUCT CARD — class names khớp với JS render
══════════════════════════════════════════════════════════ */
.vs-product-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  background: #111;
  border-radius: 12px 12px 0 0;
}
.vs-product-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.vs-product-img-wrap .vs-sale-tag {
  position: absolute; top: 7px; left: 7px;
  background: #fe2c55; color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 3px 7px; border-radius: 6px;
}
.vs-product-body {
  padding: 9px 10px 12px;
}
.vs-freeship-tag {
  font-size: 10px; color: #1abc9c; font-weight: 700; margin-bottom: 5px;
}
.vs-product-name {
  font-size: 12px; font-weight: 600; line-height: 1.4; margin-bottom: 7px;
  color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vs-product-price-wrap {
  margin-bottom: 5px;
}
.vs-price-main {
  font-size: 14px; font-weight: 800; color: #fe2c55;
}
.vs-price-compare {
  font-size: 10px; color: rgba(255,255,255,0.4);
  text-decoration: line-through; margin-left: 5px;
}
.vs-add-cart-btn {
  width: 100%; margin-top: 8px;
  background: rgba(254,44,85,0.12);
  border: 1.5px solid rgba(254,44,85,0.35);
  border-radius: 8px; padding: 8px;
  font-size: 11px; font-weight: 700; color: #fe2c55;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: background .15s;
}
.vs-add-cart-btn:active { background: rgba(254,44,85,0.25); }

/* ══════════════════════════════════════════════════════════
   PROMO CARDS — khớp với PHP HTML classes
══════════════════════════════════════════════════════════ */
#vsPromoTab {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vs-promo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(135deg, #1e1f2e, #252637);
  gap: 12px;
}
.vs-promo-red   { border-left: 3px solid #fe2c55; }
.vs-promo-teal  { border-left: 3px solid #1abc9c; }
.vs-promo-orange{ border-left: 3px solid #ff6600; }
.vs-promo-title {
  font-size: 13px; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.vs-promo-desc {
  font-size: 11px; color: rgba(255,255,255,0.55); line-height: 1.4;
}
.vs-promo-btn {
  flex-shrink: 0;
  background: #fe2c55; color: #fff; border: none;
  border-radius: 20px; padding: 8px 16px;
  font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.vs-promo-info { flex: 1; }

/* ══ CART CHECKOUT ════════════════════════════════════════ */
.vs-checkout-btn {
  display: block; width: 100%;
  padding: 14px; background: #fe2c55; color: #fff; border: none;
  border-radius: 12px; font-size: 14px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 14px rgba(254,44,85,0.35);
}
.vs-checkout-btn:active { transform: scale(0.98); }
.vs-close-btn {
  width:32px; height:32px; border-radius:50%;
  background:rgba(255,255,255,0.08); border:none;
  color:#fff; font-size:20px; cursor:pointer; font-family:inherit;
  display:flex; align-items:center; justify-content:center;
}
.vs-cart-item {
  display:flex; gap:10px; align-items:flex-start;
  padding:12px 0; border-bottom:1px solid rgba(255,255,255,0.07);
}
.vs-cart-item-img {
  width:60px; height:60px; border-radius:8px;
  object-fit:cover; flex-shrink:0; background:#1e1e2a;
}
.vs-cart-item-info { flex:1; min-width:0; }
.vs-cart-item-name  { font-size:12px; font-weight:600; line-height:1.4; margin-bottom:4px; }
.vs-cart-item-price { font-size:12px; color:#fe2c55; font-weight:700; margin-bottom:6px; }
.vs-cart-item-right {
  display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0;
}
.vs-cart-item-total { font-size:14px; font-weight:800; color:#fff; white-space:nowrap; }
.vs-cart-remove {
  background:rgba(254,44,85,0.1); border:1px solid rgba(254,44,85,0.25);
  color:#fe2c55; width:26px; height:26px; border-radius:6px;
  font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-family:inherit;
}
.vs-qty-mini-btn {
  width:26px; height:26px; border-radius:6px;
  background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.12);
  color:#fff; font-size:16px; cursor:pointer; font-family:inherit;
  display:flex; align-items:center; justify-content:center;
}
.vs-qty-mini-num { width:32px; text-align:center; font-size:14px; font-weight:700; }
.vs-cart-total { font-size:18px; font-weight:800; color:#fe2c55; }
.vs-cart-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px 12px;
  font-size:15px; font-weight:700;
  border-bottom:1px solid rgba(255,255,255,0.07);
  position:sticky; top:0; background:#1a1b28; z-index:1;
}
.vs-cart-body { padding:0 16px; min-height:60px; }
.vs-cart-footer {
  padding:12px 16px max(env(safe-area-inset-bottom),14px);
  border-top:1px solid rgba(255,255,255,0.07);
  position:sticky; bottom:0; background:#1a1b28;
}

/* ══════════════════════════════════════════════════════════
   PRICE + FLASH SALE — Shopee style, 1 nền gradient đỏ-cam
══════════════════════════════════════════════════════════ */
.vs-price-flash-row {
  background: linear-gradient(90deg, #d0021b 0%, #e8420c 50%, #ff6600 100%);
  padding: 10px 14px 10px 12px;
  flex-shrink: 0;
}

/* Hàng 1: tag + giá | bolt + Flash Sale */
.vs-pf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.vs-pf-left  { display: flex; align-items: center; gap: 8px; }
.vs-pf-right { display: flex; align-items: center; gap: 5px; }

/* Sale tag trong Flash Sale bar */
#vsDetailSaleTag {
  position: static !important;
  background: rgba(255,255,255,0.22) !important;
  border: 1.5px solid rgba(255,255,255,0.6) !important;
  color: #fff !important;
  font-size: 12px !important; font-weight: 900 !important;
  padding: 3px 9px !important; border-radius: 5px !important;
  flex-shrink: 0; letter-spacing: 0.3px;
}
.vs-price-main {
  font-size: 28px !important;
  font-weight: 900 !important;
  color: #fff !important;
  line-height: 1;
}
.vs-flash-bolt {
  font-size: 18px;
  animation: boltBlink 0.9s ease-in-out infinite;
  display: inline-block;
}
@keyframes boltBlink {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.7; transform:scale(1.2); }
}
.vs-flash-label {
  font-size: 15px; font-weight: 900; color: #fff;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* Hàng 2: giá gốc | Kết thúc sau + countdown */
.vs-pf-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vs-pf-bl { display: flex; align-items: center; gap: 8px; }
.vs-pf-br { display: flex; align-items: center; gap: 6px; }

.vs-price-old {
  font-size: 13px !important;
  color: rgba(255,255,255,0.55) !important;
  text-decoration: line-through;
}
.vs-pbadge-freeship {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 2px 7px; border-radius: 20px;
  white-space: nowrap;
}
.vs-flash-ends-text {
  font-size: 11px; color: rgba(255,255,255,0.8);
  font-weight: 600; white-space: nowrap;
}
.vs-flash-countdown { display: flex; align-items: center; gap: 3px; }
.vs-cd-block {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff; font-size: 13px; font-weight: 900;
  padding: 2px 6px; border-radius: 4px;
  min-width: 26px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.vs-cd-sep {
  color: rgba(255,255,255,0.7); font-weight: 900; font-size: 13px;
}

/* Title section — nền trắng */
.vs-detail-title-section {
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}
.vs-detail-title {
  font-size: 15px; font-weight: 700;
  line-height: 1.45; color: #111 !important;
}

/* ══ DETAIL PANEL — ALL WHITE OVERRIDES ══════════════════ */
.vs-detail-body { background: #fff; }

/* Badges row */
.vs-detail-body > div[style*="padding:8px 14px"] {
  background: #fff !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

/* Desc section */
#vsDetailDescSection {
  background: #fff !important;
  border-bottom: 1px solid #f0f0f0 !important;
}
#vsDetailDescSection .vs-section-label { color: #555 !important; }
#vsDetailDescSection > div:last-child { color: #444 !important; }
#vsDetailDesc { line-height: 1.65; font-size: 13px; color: #444; word-break: break-word; }

/* Review section */
.vs-detail-body > div:last-child {
  background: #fff !important;
}

/* Rating in title */
.vs-detail-title-section span[style*="color:#aaa"] { color: #999 !important; }

/* Stock info */
#vsStockInfo { color: #1abc9c !important; }

/* Variant btn số lượng */
.vs-variant-group > div:first-child { color: #555 !important; }

/* Handle bar on white */
.vs-detail-handle { background: #fff; }
.vs-detail-handle > div { background: #ddd !important; }

/* ══════════════════════════════════════════════════════════
   DETAIL PANEL — WHITE THEME FINAL OVERRIDE (v5.4)
   Ghi đè dứt khoát mọi màu tối còn sót lại
══════════════════════════════════════════════════════════ */
.vs-detail-panel,
.vs-detail-panel .vs-detail-handle,
.vs-detail-panel .vs-detail-body,
.vs-detail-panel .vs-detail-gallery,
.vs-detail-panel .vs-gallery-thumbs,
.vs-detail-panel .vs-detail-price-section,
.vs-detail-panel .vs-price-flash-row,
.vs-detail-panel .vs-price-col,
.vs-detail-panel .vs-detail-title-section,
.vs-detail-panel .vs-variant-section,
.vs-detail-panel .vs-qty-section,
.vs-detail-panel #vsDetailDescSection,
.vs-detail-panel .vs-detail-actions,
.vs-detail-panel > div { background-color: #ffffff; }

/* Đường kẻ ngang = xám nhạt */
.vs-detail-panel .vs-detail-title-section,
.vs-detail-panel .vs-variant-section,
.vs-detail-panel .vs-qty-section,
.vs-detail-panel #vsDetailDescSection { border-bottom: 1px solid #f0f0f0 !important; }

/* Text màu tối */
.vs-detail-panel .vs-detail-title        { color: #111 !important; }
.vs-detail-panel .vs-section-label       { color: #888 !important; }
.vs-detail-panel .vs-qty-num             { color: #111 !important; }
.vs-detail-panel #vsStockInfo            { color: #1abc9c !important; }
.vs-detail-panel .vs-variant-label       { color: #555 !important; }

/* Nút qty sáng */
.vs-detail-panel .vs-qty-btn {
  background: #f5f5f5 !important;
  border: 1px solid #e0e0e0 !important;
  color: #333 !important;
}

/* Nút variant sáng */
.vs-detail-panel .vs-variant-btn {
  background: #f8f8f8 !important;
  border: 1.5px solid #ddd !important;
  color: #333 !important;
}
.vs-detail-panel .vs-variant-btn.selected {
  background: rgba(254,44,85,0.06) !important;
  border-color: #fe2c55 !important;
  color: #fe2c55 !important;
}

/* Review section */
.vs-detail-panel .vs-review-item    { border-bottom: 1px solid #f0f0f0 !important; }
.vs-detail-panel .vs-review-author  { color: #111 !important; }
.vs-detail-panel .vs-review-text    { color: #555 !important; }
.vs-detail-panel .vs-review-date    { color: #aaa !important; }

/* Badge section */
.vs-detail-badge.vs-badge-green  { background: rgba(26,188,156,0.08) !important; color: #1abc9c !important; }
.vs-detail-badge.vs-badge-orange { background: rgba(255,102,0,0.06) !important;  color: #ff7700 !important; }

/* Rating text */
.vs-detail-panel #vsDetailRating   { color: #ffd700 !important; }
.vs-detail-panel #vsDetailSold     { color: #666 !important; font-size:12px !important; font-weight:600 !important; }
.vs-detail-panel #vsDetailReviewCount { color: #888 !important; }

/* Desc text */
.vs-detail-panel #vsDetailDesc { color: #444 !important; }

/* Xem tất cả đánh giá */
.vs-detail-panel a[href="#"] { color: #fe2c55 !important; }
.vs-detail-panel span[style*="font-size:13px;font-weight:700"] { color: #111 !important; }

/* Handle bar */
.vs-detail-handle > div { background: #ddd !important; }

/* Footer actions */
.vs-detail-actions {
  background: #ffffff !important;
  border-top: 1px solid #f0f0f0 !important;
}
#vsAddCartBtn {
  background: #fff !important;
  border: 1.5px solid #fe2c55 !important;
  color: #fe2c55 !important;
}
/* sale tag / sold count handled by #vsDetailSaleTag rule above */
/* ══════════════════════════════════════════════════════════
   ẨN badge -XX% của WooCommerce/theme — hiện trong Flash Sale
══════════════════════════════════════════════════════════ */

/* Badge góc ảnh do WooCommerce/theme render — ẩn toàn bộ */
#vs-app span.onsale,
#vs-app .onsale,
#vs-app .woocommerce-badge,
#vsVideoFeed span.onsale,
#vsVideoFeed .onsale,
.vs-video-item span.onsale,
.vs-detail-panel span.onsale,
.vs-detail-panel .onsale,
.vs-detail-gallery span.onsale,
.vs-product-card span.onsale,
/* Fallback: ẩn tất cả .onsale trên trang */
span.onsale {
  display: none !important;
}

/* ════════════════════════════════════════════════════════════
   DESKTOP LAYOUT ≥ 768px — TikTok style
   Sidebar inject qua JS vào body, hoàn toàn độc lập với mobile
════════════════════════════════════════════════════════════ */

/* Sidebar ẩn mặc định — JS sẽ inject và CSS sẽ show */
#vs-sidebar { display: none; }

@media (min-width: 768px) {

  /* 1. Body: nền đen full */
  body { background: #0a0a0f !important; }

  /* 2. Wrapper mở full width, bỏ max-width 430px */
  #vs-wrapper {
    max-width: 100% !important;
    margin: 0 !important;
    background: #0a0a0f !important;
    padding-top: 60px; /* chừa chỗ cho header fixed */
  }

  /* 3. Header: full width, bỏ transform căn giữa, fixed top */
  .vs-header {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 60px !important;
    padding: 0 32px !important;
    background: rgba(10,10,18,0.98) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 500 !important;
    top: 0 !important;
  }
  /* Xóa gradient dưới header trên desktop */
  .vs-header { padding-bottom: 0 !important; }

  /* 4. Ẩn mobile-only elements */
  .vs-tabs          { display: none !important; }
  .vs-bottom-nav    { display: none !important; }
  .vs-video-cat-bar { display: none !important; }

  /* 5. Sidebar fixed bên trái */
  #vs-sidebar {
    display: block !important;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 240px !important;
    background: #161823 !important;
    border-right: 1px solid rgba(255,255,255,0.07) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 400 !important;
    padding-bottom: 20px !important;
  }
  #vs-sidebar::-webkit-scrollbar { width: 3px; }
  #vs-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

  /* Sidebar: shop info */
  .vs-sb-shop {
    display: flex; flex-direction: column; align-items: center;
    padding: 22px 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 6px;
  }
  .vs-sb-avatar {
    width: 68px; height: 68px; border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg,#fe2c55,#ff6b35);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 900; color: #fff;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(254,44,85,0.3);
    flex-shrink: 0;
  }
  .vs-sb-avatar img { width:100%; height:100%; object-fit:cover; display:block; border-radius:50%; }
  .vs-sb-name { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 3px; text-align:center; }
  .vs-sb-followers { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
  .vs-sb-follow-btn {
    background: #fe2c55; color: #fff; border: none;
    font-size: 12px; font-weight: 800;
    padding: 7px 22px; border-radius: 20px; cursor: pointer;
    transition: opacity .15s; font-family: inherit;
  }
  .vs-sb-follow-btn:hover { opacity: 0.85; }
  .vs-sb-follow-btn.following {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.65);
  }

  /* Sidebar: nav items */
  .vs-sb-nav { padding: 4px 8px; }
  .vs-sb-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.55);
    cursor: pointer; transition: all .15s;
    margin-bottom: 2px; user-select: none;
  }
  .vs-sb-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
  .vs-sb-item.active { background: rgba(254,44,85,0.12); color: #fe2c55; }
  .vs-sb-item.active svg { stroke: #fe2c55; }
  .vs-sb-icon { display: flex; align-items: center; flex-shrink: 0; }
  .vs-sb-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 8px 0; }
  .vs-sb-section-title {
    font-size: 10px; font-weight: 800; color: rgba(255,255,255,0.28);
    text-transform: uppercase; letter-spacing: 1.2px;
    padding: 12px 22px 5px;
  }
  .vs-sb-cat-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.5);
    cursor: pointer; transition: all .15s; margin: 0 8px 1px;
  }
  .vs-sb-cat-item:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.82); }
  .vs-sb-cat-item.active { background: rgba(254,44,85,0.1); color: #fe2c55; }
  .vs-sb-cart-badge {
    background: #fe2c55; color: #fff;
    font-size: 10px; font-weight: 900;
    padding: 1px 7px; border-radius: 10px; margin-left: auto;
  }

  /* ── Nút Đặt hàng ngay — nổi bật desktop sidebar ── */
  .vs-sb-checkout-wrap {
    padding: 6px 10px 8px;
  }
  .vs-sb-checkout-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 13px;
    border-radius: 11px;
    cursor: pointer; user-select: none;
    font-size: 13px; font-weight: 800;
    color: #fff;
    position: relative; overflow: hidden;
    background: linear-gradient(120deg, #fe2c55 0%, #ff6640 100%);
    box-shadow: 0 3px 16px rgba(254,44,85,0.4);
    transition: transform .15s, box-shadow .15s;
    animation: vsSbCOPulse 2.4s ease-in-out infinite;
  }
  .vs-sb-checkout-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 22px rgba(254,44,85,0.65);
    animation: none;
  }
  .vs-sb-checkout-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(254,44,85,0.3);
    animation: none;
  }
  .vs-sb-checkout-btn::after {
    content: '';
    position: absolute; top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: vsSbCOShimmer 2.4s ease-in-out infinite;
    pointer-events: none;
  }
  .vs-sb-checkout-icon {
    display: flex; align-items: center; flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 7px; padding: 3px;
  }
  .vs-sb-checkout-label { flex: 1; }
  .vs-sb-checkout-arrow {
    display: flex; align-items: center; flex-shrink: 0;
    animation: vsSbCOArrow 1.15s ease-in-out infinite;
  }

  /* 6. Content panels — push right 240px */
  #vsVideoFeed,
  #vsProductList,
  #vsPromoTab {
    margin-left: 240px !important;
  }

  /* 7. Reset .vs-feed mobile (position:fixed/left:50%/transform/max-width:430px) */
  #vsVideoFeed {
    position: static !important;
    top: auto !important; left: auto !important;
    transform: none !important;
    max-width: none !important; width: auto !important;
    height: auto !important; overflow: visible !important;
    scroll-snap-type: none !important; z-index: auto !important;
    box-sizing: border-box !important;
  }
  /* Split layout khi active — width trừ sidebar 240px */
  #vsVideoFeed.vs-desktop-active {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    height: calc(100vh - 60px) !important;
    overflow: hidden !important;
    scroll-snap-type: none !important;
    width: calc(100vw - 240px) !important;
    max-width: calc(100vw - 240px) !important;
    box-sizing: border-box !important;
  }
  #vsVideoFeed.vs-desktop-active::-webkit-scrollbar { display: none !important; }
  /* Cột trái video */
  #vs-video-col {
    width: 400px !important; min-width: 400px !important; flex-shrink: 0 !important;
    height: calc(100vh - 60px) !important;
    overflow-y: scroll !important; overflow-x: hidden !important;
    scroll-snap-type: y mandatory !important; scrollbar-width: none !important;
    background: #000 !important;
    display: flex !important; flex-direction: column !important;
  }
  #vs-video-col::-webkit-scrollbar { display: none !important; }
  #vs-video-col .vs-video-item {
    width: 400px !important; min-width: 400px !important; max-width: 400px !important;
    height: calc(100vh - 60px) !important; min-height: calc(100vh - 60px) !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start !important; scroll-snap-stop: always !important;
    position: relative !important; overflow: hidden !important; display: block !important;
  }
  /* Cột phải sản phẩm */
  #vs-product-col {
    flex: 1 !important; min-width: 0 !important;
    height: calc(100vh - 60px) !important;
    overflow-y: auto !important; overflow-x: hidden !important;
    background: #f5f5f5 !important;
    display: flex !important; flex-direction: column !important;
  }
  #vs-product-col::-webkit-scrollbar { width: 4px; }
  #vs-product-col::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
  #vs-product-col-header {
    position: sticky !important; top: 0 !important; z-index: 10 !important;
    background: #fff !important; padding: 11px 14px 9px !important;
    border-bottom: 1px solid #ececec !important;
    display: flex !important; align-items: center !important;
    justify-content: space-between !important; flex-shrink: 0 !important;
  }
  #vs-product-col-header h3 { font-size: 13px !important; font-weight: 800 !important; color: #111 !important; margin: 0 !important; }
  #vs-product-col-count { font-size: 11px !important; color: #aaa !important; }
  #vs-product-col-catbar {
    display: flex !important; gap: 6px !important; padding: 7px 10px !important;
    overflow-x: auto !important; background: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
    scrollbar-width: none !important; flex-shrink: 0 !important;
  }
  #vs-product-col-catbar::-webkit-scrollbar { display: none; }
  .vs-dpc-chip {
    flex-shrink: 0 !important; padding: 4px 11px !important; border-radius: 14px !important;
    font-size: 11px !important; font-weight: 700 !important;
    background: #f0f0f0 !important; color: #555 !important;
    cursor: pointer !important; border: none !important;
    white-space: nowrap !important; font-family: inherit !important;
  }
  .vs-dpc-chip.active { background: #fe2c55 !important; color: #fff !important; }
  #vs-product-col-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important; padding: 10px !important;
    align-items: start !important; box-sizing: border-box !important;
  }
  #vs-product-col-grid .vs-product-card {
    border-radius: 8px !important; background: #fff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
    cursor: pointer !important; overflow: hidden !important;
  }
  #vs-product-col-grid .vs-product-card-body { padding: 6px 8px 9px !important; }
  #vs-product-col-grid .vs-product-card-name {
    font-size: 11px !important; font-weight: 600 !important; color: #111 !important;
    line-height: 1.35 !important; display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical !important;
    overflow: hidden !important; margin-bottom: 4px !important;
  }
  #vs-product-col-grid .vs-product-card-price { font-size: 12px !important; font-weight: 800 !important; color: #fe2c55 !important; }
  #vs-product-col-grid .vs-product-card-old { font-size: 10px !important; color: #bbb !important; text-decoration: line-through !important; margin-left: 3px !important; }
  #vs-product-col-grid .vs-pc-freeship-tag { display: none !important; }
  .vs-dpc-loading { grid-column:1/-1 !important; text-align:center !important; padding:30px !important; color:#aaa !important; font-size:12px !important; }
  .vs-dpc-sentinel { grid-column:1/-1 !important; display:flex !important; justify-content:center !important; align-items:center !important; gap:8px !important; padding:20px !important; color:#aaa !important; font-size:12px !important; }
  .vs-grid-sentinel { width:100%; }
  .vs-video-item {
    height: calc(100vh - 60px) !important;
    flex-shrink: 0 !important; position: relative !important; overflow: hidden !important;
  }

  /* 8. Product list */
  #vsProductList {
    padding-top: 80px !important;
    min-height: calc(100vh - 60px) !important;
    background: #f5f5f5 !important;
    width: calc(100% - 240px) !important;
    box-sizing: border-box !important;
  }
  #vsProductList .vs-cat-bar {
    position: sticky !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: #fff !important;
    z-index: 50 !important;
  }
  .vs-product-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px !important;
    padding: 0 16px 16px !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* 9. Promo tab */
  #vsPromoTab {
    padding-top: 80px !important;
    min-height: calc(100vh - 60px) !important;
    max-width: 760px !important;
  }

  /* 10. Detail panel + cart: căn giữa màn hình */
  .vs-detail-panel,
  .vs-cart-panel {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(100%) !important;
    max-width: 500px !important;
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
  }
  .vs-detail-panel.open,
  .vs-cart-panel.open {
    transform: translateX(-50%) translateY(0) !important;
  }

  /* Header shop info larger */
  .vs-shop-name { font-size: 15px !important; font-weight: 800 !important; }
  .vs-avatar { width: 38px !important; height: 38px !important; }
}

/* Admin bar offset trên desktop */
@media (min-width: 768px) {
  body.admin-bar .vs-header { top: 32px !important; }
  body.admin-bar #vs-sidebar { top: 92px !important; } /* 60px header + 32px admin bar */
  body.admin-bar #vs-wrapper  { padding-top: 92px !important; }
  body.admin-bar #vsVideoFeed,
  body.admin-bar #vsProductList,
  body.admin-bar #vsPromoTab { padding-top: 92px; }
}

/* ════ DESKTOP: Checkout + Cart Manager — cố định kích thước, căn giữa ════ */
@media (min-width: 768px) {
  /* Overlay mờ */
  .vs-checkout-overlay,
  .vs-cm-overlay {
    background: rgba(0,0,0,0.60) !important;
    backdrop-filter: blur(6px) !important;
  }

  /* Panel Đặt hàng nhanh */
  .vs-checkout-panel {
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    width: 560px !important;
    max-width: 92vw !important;
    max-height: 88vh !important;
    transform: translate(-50%, -40%) scale(0.96) !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 60px rgba(0,0,0,0.22) !important;
    transition: transform .32s cubic-bezier(.32,.72,0,1), opacity .32s, visibility .32s !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .vs-checkout-panel.open {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Panel Xem lại giỏ hàng */
  .vs-cm-panel {
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    width: 520px !important;
    max-width: 92vw !important;
    max-height: 82vh !important;
    transform: translate(-50%, -40%) scale(0.96) !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 60px rgba(0,0,0,0.22) !important;
    transition: transform .32s cubic-bezier(.32,.72,0,1), opacity .32s, visibility .32s !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .vs-cm-panel.open {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Handle kéo ẩn đi trên desktop — không cần */
  .vs-checkout-panel .vs-co-handle,
  .vs-cm-panel .vs-cm-handle {
    display: none !important;
  }
}


@media (min-width: 768px) and (max-width: 1024px) {
  #vsVideoFeed.vs-desktop-active { width: calc(100vw - 72px) !important; max-width: calc(100vw - 72px) !important; }
  #vs-video-col { width: 280px !important; min-width: 280px !important; }
  #vs-video-col .vs-video-item { width: 280px !important; min-width: 280px !important; max-width: 280px !important; }
  #vs-product-col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #vs-sidebar { width: 72px !important; }
  .vs-sb-name, .vs-sb-followers, .vs-sb-follow-btn,
  .vs-sb-section-title, .vs-sb-cat-item,
  .vs-sb-item > span:last-child,
  .vs-sb-cart-badge,
  .vs-sb-checkout-wrap { display: none !important; }
  .vs-sb-shop { padding: 14px 8px !important; }
  .vs-sb-avatar { width: 44px !important; height: 44px !important; font-size: 18px !important; margin-bottom: 0 !important; }
  .vs-sb-item { justify-content: center !important; padding: 11px !important; }

  #vsVideoFeed,
  #vsProductList,
  #vsPromoTab { margin-left: 72px !important; }

  .vs-product-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ═══════════════════════════════════════════════════════════
   MÔ TẢ ĐẦY ĐỦ SẢN PHẨM
═══════════════════════════════════════════════════════════ */
.vs-full-desc-content {
    max-height: none;
    overflow: hidden;
    padding: 0 14px 10px;
    font-size: 13px;
    color: rgba(0,0,0,0.75);
    line-height: 1.7;
    position: relative;
    transition: max-height 0.35s ease;
}
.vs-full-desc-content::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0;
    background: none;
    pointer-events: none;
    transition: opacity 0.3s;
}
.vs-full-desc-content.vs-full-desc-expanded {
    max-height: 2000px;
}
.vs-full-desc-content.vs-full-desc-expanded::after {
    opacity: 0;
}
/* WooCommerce content styles trong popup */
.vs-full-desc-content p { margin: 0 0 8px; }
.vs-full-desc-content ul, .vs-full-desc-content ol {
    padding-left: 18px; margin: 0 0 8px;
}
.vs-full-desc-content li { margin-bottom: 4px; }
.vs-full-desc-content img {
    width: 100%; height: auto;
    border-radius: 8px; margin: 6px 0;
    display: block;
}
.vs-full-desc-content h1,.vs-full-desc-content h2,
.vs-full-desc-content h3,.vs-full-desc-content h4 {
    font-size: 14px; font-weight: 700;
    color: #111; margin: 10px 0 5px;
}
.vs-full-desc-content table {
    width: 100%; border-collapse: collapse;
    font-size: 12px; margin: 8px 0;
}
.vs-full-desc-content td, .vs-full-desc-content th {
    border: 1px solid #eee; padding: 6px 8px;
}

.vs-full-desc-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #fe2c55;
    cursor: pointer;
    border-top: 1px solid #f5f5f5;
    user-select: none;
}
.vs-full-desc-toggle svg { transition: transform 0.3s; flex-shrink: 0; stroke: #fe2c55; }

/* ═══════════════════════════════════════════════════════════
   SẢN PHẨM CÙNG NHÓM TRONG DETAIL PANEL
═══════════════════════════════════════════════════════════ */
.vs-detail-related-scroll {
    display: flex;
    gap: 10px;
    padding: 0 14px 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.vs-detail-related-scroll::-webkit-scrollbar { display: none; }

.vs-detail-related-item {
    flex-shrink: 0;
    width: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
    cursor: pointer;
    transition: transform 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.vs-detail-related-item:active { transform: scale(0.97); }

.vs-dri-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #eee;
}
.vs-dri-img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.vs-dri-sale {
    position: absolute;
    top: 5px; left: 5px;
    background: #fe2c55;
    color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 2px 5px;
    border-radius: 5px;
}
.vs-dri-body {
    padding: 7px 8px 9px;
}
.vs-dri-name {
    font-size: 11px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vs-dri-price {
    font-size: 12px;
    font-weight: 800;
    color: #fe2c55;
    margin-bottom: 2px;
}
.vs-dri-old {
    font-size: 10px;
    color: #aaa;
    text-decoration: line-through;
    margin-bottom: 6px;
}
.vs-dri-btn {
    width: 100%;
    padding: 5px 4px;
    background: #fe2c55;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* ══ CHECKOUT + CART MANAGER ══════════════════════════ */
.vs-checkout-overlay,.vs-cm-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.52);z-index:1100;backdrop-filter:blur(3px);}
.vs-checkout-overlay.open,.vs-cm-overlay.open{display:block;}
.vs-checkout-panel{position:fixed;bottom:0;left:0;right:0;background:#fff;border-radius:22px 22px 0 0;z-index:1101;transform:translateY(100%);transition:transform .38s cubic-bezier(.32,.72,0,1);max-height:92%;display:flex;flex-direction:column;}
.vs-checkout-panel.open{transform:translateY(0);}
.vs-cm-panel{position:fixed;bottom:0;left:0;right:0;background:#fff;border-radius:22px 22px 0 0;z-index:1200;transform:translateY(100%);transition:transform .38s cubic-bezier(.32,.72,0,1);max-height:88%;display:flex;flex-direction:column;}
.vs-cm-panel.open{transform:translateY(0);}
.vs-co-handle{display:flex;justify-content:center;padding:11px 0 0;flex-shrink:0;}
.vs-co-handle div{width:34px;height:4px;background:#ddd;border-radius:2px;}
.vs-co-header{display:flex;align-items:center;justify-content:space-between;padding:10px 18px 12px;border-bottom:1px solid #f0f0f0;flex-shrink:0;}
.vs-co-title{font-size:16px;font-weight:800;color:#111;display:flex;align-items:center;gap:7px;}
.vs-co-close{width:30px;height:30px;background:#f5f5f5;border:none;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#777;}
.vs-co-body{padding:14px 18px 20px;overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:12px;}
.vs-co-notice{background:#fff8e6;border:1px solid #ffe082;border-radius:11px;padding:10px 13px;font-size:12px;color:#7a5c00;line-height:1.55;}
.vs-co-field{display:flex;flex-direction:column;gap:5px;}
.vs-co-field label{font-size:12.5px;font-weight:700;color:#333;}
.vs-co-req{color:#fe2c55;}
.vs-co-field input,.vs-co-field textarea{border:1.5px solid #e8e8e8;border-radius:11px;padding:11px 14px;font-size:14px;color:#111;outline:none;transition:border-color .2s,box-shadow .2s;font-family:inherit;resize:none;background:#fafafa;width:100%;}
.vs-co-field input:focus,.vs-co-field textarea:focus{border-color:#fe2c55;background:#fff;box-shadow:0 0 0 3px rgba(254,44,85,.08);}
.vs-co-field input::placeholder,.vs-co-field textarea::placeholder{color:#ccc;}
/* Preview giỏ */
.vs-co-preview{background:#f9f9f9;border-radius:12px;border:1px solid #efefef;overflow:hidden;}
.vs-co-preview-header{display:flex;align-items:center;justify-content:space-between;padding:10px 13px 8px;}
.vs-co-preview-title{font-size:12px;font-weight:700;color:#555;}
.vs-co-edit-btn{display:flex;align-items:center;gap:4px;background:#fff0f3;color:#fe2c55;border:1px solid #ffd0da;border-radius:16px;padding:4px 10px;font-size:11px;font-weight:700;cursor:pointer;}
.vs-co-edit-btn:active{background:#ffe0e8;}
.vs-co-pi{display:flex;align-items:center;gap:8px;padding:7px 13px;border-top:1px solid #f0f0f0;}
.vs-co-dot{display:none;}
.vs-co-pthumb{width:40px;height:40px;border-radius:6px;object-fit:cover;flex-shrink:0;border:1px solid #f0f0f0;background:#f5f5f5;}
.vs-co-pthumb-placeholder{background:#f0f0f0;}
.vs-co-pname{flex:1;font-size:11.5px;color:#333;font-weight:500;}
.vs-co-pqty{font-size:11px;color:#aaa;margin:0 4px;}
.vs-co-pprice{font-size:11.5px;font-weight:700;color:#fe2c55;white-space:nowrap;}
.vs-co-preview-total{display:flex;justify-content:space-between;align-items:center;padding:9px 13px;border-top:1px solid #e8e8e8;background:#f0f0f0;}
.vs-co-preview-total span{font-size:12px;font-weight:700;color:#444;}
.vs-co-preview-total strong{font-size:15px;font-weight:800;color:#fe2c55;}
/* 2 nút */
.vs-co-btn-row{display:flex;gap:9px;}
.vs-co-view-cart{flex:0 0 auto;display:flex;align-items:center;gap:6px;background:#fff;color:#333;border:1.5px solid #ddd;border-radius:13px;padding:13px 14px;font-size:12.5px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s;}
.vs-co-view-cart:active{background:#f5f5f5;}
.vs-co-view-cart svg{stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.vs-co-submit{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;background:linear-gradient(135deg,#fe2c55,#ff5500);color:#fff;border:none;border-radius:13px;padding:13px 10px;font-size:14px;font-weight:800;cursor:pointer;box-shadow:0 5px 18px rgba(254,44,85,.35);transition:opacity .15s,transform .1s;letter-spacing:.2px;}
.vs-co-submit:active{opacity:.85;transform:scale(.98);}
.vs-co-submit:disabled{opacity:.6;cursor:not-allowed;}
.vs-checkout-msg{border-radius:11px;padding:12px 14px;font-size:13px;font-weight:600;text-align:center;}
.vs-checkout-msg--success{background:#e8f5e9;border:1px solid #a5d6a7;color:#2e7d32;}
.vs-checkout-msg--error{background:#fce4ec;border:1px solid #ef9a9a;color:#c62828;}
/* Nav Thanh toán */
#vsNavCheckout.active svg{stroke:#fe2c55;}
#vsNavCheckout.active span{color:#fe2c55;}
/* Cart Manager items */
.vs-cm-body{flex:1;overflow-y:auto;padding:4px 0 0;}
.vs-cm-item{display:flex;align-items:center;gap:11px;padding:13px 18px;border-bottom:1px solid #f5f5f5;transition:opacity .25s,transform .25s;}
.vs-cm-img{width:60px;height:60px;border-radius:10px;object-fit:cover;flex-shrink:0;background:#eee;}
.vs-cm-info{flex:1;min-width:0;}
.vs-cm-name{font-size:12.5px;color:#111;font-weight:600;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.vs-cm-unit{font-size:11px;color:#aaa;margin-top:2px;}
.vs-cm-sub{font-size:13px;color:#fe2c55;font-weight:700;margin-top:3px;}
.vs-cm-right{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex-shrink:0;}
.vs-cm-del{display:flex;align-items:center;gap:4px;background:#fff0f3;border:1px solid #ffd0da;border-radius:8px;padding:4px 9px;font-size:11px;font-weight:700;color:#fe2c55;cursor:pointer;}
.vs-cm-del:active{background:#ffe0e8;}
.vs-cm-qty-row{display:flex;align-items:center;}
.vs-cm-qb{width:30px;height:30px;border:1.5px solid #e8e8e8;background:#fff;font-size:17px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#333;transition:background .12s;}
.vs-cm-qb:active{background:#f5f5f5;}
.vs-cm-qb.minus{border-radius:8px 0 0 8px;border-right:none;}
.vs-cm-qb.plus{border-radius:0 8px 8px 0;border-left:none;}
.vs-cm-qnum{width:34px;height:30px;border:1.5px solid #e8e8e8;border-left:none;border-right:none;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:#111;background:#fafafa;}
.vs-cm-empty{text-align:center;padding:48px 20px;}
.vs-cm-empty svg{display:block;margin:0 auto 12px;}
.vs-cm-empty p{font-size:14px;color:#bbb;font-weight:500;}
.vs-cm-footer{padding:13px 18px 24px;border-top:1px solid #eee;flex-shrink:0;display:flex;flex-direction:column;gap:11px;}
.vs-cm-total-row{display:flex;align-items:center;justify-content:space-between;}
.vs-cm-total-label{font-size:13px;color:#777;font-weight:600;}
.vs-cm-total-val{font-size:20px;font-weight:800;color:#fe2c55;text-align:right;}
.vs-cm-total-cnt{font-size:11px;color:#aaa;text-align:right;margin-top:1px;}
/* YT iframe card */
.vs-pc-yt-iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none;opacity:0;transition:opacity .4s;z-index:3;pointer-events:none;}
.vs-pc-yt-thumb{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;z-index:2;transition:opacity .3s;}
.vs-pc-vid-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.2);display:flex;align-items:center;justify-content:center;z-index:4;cursor:pointer;transition:opacity .25s;pointer-events:none;}
.vs-pc-vid-overlay:active{background:rgba(0,0,0,.4);}
.vs-pc-play-circle{width:48px;height:48px;background:rgba(0,0,0,.5);border-radius:50%;border:2.5px solid rgba(255,255,255,.85);display:flex;align-items:center;justify-content:center;backdrop-filter:blur(4px);}
.vs-pc-vid-overlay:active .vs-pc-play-circle{transform:scale(.88);}

/* ── Keyframes cho nút Đặt hàng ngay sidebar desktop ── */
@keyframes vsSbCOPulse {
  0%, 100% { box-shadow: 0 3px 16px rgba(254,44,85,0.4); }
  50%       { box-shadow: 0 3px 26px rgba(254,44,85,0.72), 0 0 0 4px rgba(254,44,85,0.13); }
}
@keyframes vsSbCOShimmer {
  0%        { left: -75%; }
  55%, 100% { left: 125%; }
}
@keyframes vsSbCOArrow {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(5px); }
}
