.ds-store{--ds-ink:#161823;--ds-muted:#626577;--ds-line:#e9eaf0;color:var(--ds-ink);display:grid;gap:28px;min-width:0;width:100%}.ds-store *,.ds-dialog *{box-sizing:border-box}.ds-section{min-width:0}.ds-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.ds-heading h2{font-size:19px!important;font-weight:800;margin:0}.ds-heading>span{color:var(--ds-muted);font-size:14px}.ds-categories{display:flex;gap:14px;overflow-x:auto;overscroll-behavior-x:contain;padding:4px 2px 12px;scrollbar-width:thin}.ds-category{flex:0 0 96px;display:flex;flex-direction:column;align-items:center;gap:10px;border:0;background:transparent;font:inherit;font-size:14px;line-height:1.4;cursor:pointer;padding:4px;color:var(--ds-ink)}.ds-category-art{display:grid;place-items:center;width:68px;height:68px;border-radius:50%;background:#f3f4f6;border:2px solid transparent;overflow:hidden;font-size:28px;color:#65687a}.ds-category-art img{width:100%;height:100%;object-fit:cover}.ds-category.is-active .ds-category-art{border-color:#ee4d2d;background:#fff2ec;color:#bb351c}.ds-category.is-active{font-weight:700;color:#b6311d}.ds-disclosure{margin:-12px 0 0;font-size:14px;line-height:1.6;color:var(--ds-muted);padding:12px 16px;background:#f7f8fa;border-radius:12px}.ds-rail{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 64px)/5);gap:16px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:0 0 12px;scrollbar-width:thin;align-items:start;min-width:0}.ds-card{min-width:0;scroll-snap-align:start;overflow:hidden;border:1px solid var(--ds-line);border-radius:12px;background:white;cursor:pointer}.ds-media{position:relative;aspect-ratio:1;background:#f5f5f7;overflow:hidden}.ds-rail-portrait .ds-media{aspect-ratio:3/4}.ds-image-button{display:block;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:pointer}.ds-media img,.ds-media video{display:block;width:100%;height:100%;object-fit:cover}.ds-media video{background:#15151c}.ds-badge{position:absolute;top:8px;left:8px;max-width:calc(100% - 16px);padding:4px 7px;border-radius:5px;background:#fff1e9;color:#9f311a;font-size:12px;font-weight:700;pointer-events:none;overflow-wrap:anywhere}.ds-card-body{padding:12px;display:grid;gap:8px;cursor:pointer}.ds-card h3{font-size:14px!important;font-weight:500;line-height:1.55;margin:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:44px}.ds-seller{font-size:12px;color:var(--ds-muted);margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ds-prices{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline;min-height:25px}.ds-prices strong{font-size:17px;line-height:1.3;color:#bc2845}.ds-prices del{font-size:12px;color:var(--ds-muted)}.ds-buy{display:flex;align-items:center;justify-content:space-between;gap:5px;width:100%;min-height:44px;padding:8px;border:1px solid #f8c8ba;border-radius:8px;background:#fff5f0;color:#a93419;font:inherit;font-size:13px;font-weight:700;cursor:pointer}.ds-buy:hover{background:#ffe8dd}.ds-arrows{display:flex;gap:6px}.ds-arrows button,.ds-dialog-head button{width:44px;height:44px;display:grid;place-items:center;border:1px solid #e5e6eb;border-radius:50%;background:white;color:#303241;font-size:25px;cursor:pointer}.ds-muted,.ds-empty{font-size:14px;line-height:1.6;color:var(--ds-muted)}.ds-empty{padding:24px;background:#fafafa;border:1px dashed #dcdfe8;border-radius:12px}.ds-empty[hidden],.ds-card[hidden]{display:none!important}.ds-store button:focus-visible,.ds-rail:focus-visible,.ds-dialog button:focus-visible{outline:3px solid #2783de;outline-offset:2px}.ds-dialog{width:min(660px,calc(100% - 24px));max-height:85dvh;border:0;border-radius:18px;padding:20px;overflow:auto;color:#20212b;background:#fff;box-shadow:0 20px 80px #0005}.ds-dialog::backdrop{background:#10132299}.ds-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.ds-dialog-head h2{margin:0;font:700 18px/1.4 system-ui}.ds-dialog #quickResult{scroll-margin-top:0}.ds-dialog .cb-top{padding-right:30px}.ds-dialog .cb-money{max-width:100%;padding-right:12px}.ds-dialog .cb-money .vl{font-size:22px}@media(max-width:1100px){.ds-rail{grid-auto-columns:calc((100% - 48px)/4)}}@media(max-width:800px){.ds-rail{grid-auto-columns:calc((100% - 32px)/3)}.ds-heading>span{display:none}}@media(prefers-reduced-motion:reduce){.ds-rail{scroll-behavior:auto}}

/* ===== Video-first storefront (TikTok style) ===== */
.ds-video-rail{gap:18px;grid-auto-columns:calc((100% - 72px)/5)}
.ds-video-card{border:0;border-radius:0;background:transparent;overflow:visible}
.ds-video-media{position:relative;width:100%;aspect-ratio:9/16;overflow:hidden;border-radius:12px;background:#15151c;isolation:isolate}
.ds-video-media video{display:block;width:100%;height:100%;object-fit:cover;background:#15151c}
/* lớp bấm phủ toàn video + icon play ở giữa */
.ds-vt-toggle{position:absolute;inset:0;z-index:1;width:100%;height:100%;padding:0;border:0;background:transparent;display:grid;place-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ds-vt-state{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:#0006;backdrop-filter:blur(4px);transition:opacity .2s,transform .2s;pointer-events:none}
.ds-video-media.is-playing .ds-vt-state{opacity:0;transform:scale(.8)}
/* nút tiếng: tròn nhỏ gọn, góc trên phải */
.ds-vt-sound{position:absolute;z-index:3;top:8px;right:8px;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:#0007;backdrop-filter:blur(4px);display:grid;place-items:center;cursor:pointer;opacity:0;transition:opacity .2s}
.ds-vt-sound::after{content:"";position:absolute;inset:-8px}
.ds-vt-sound svg{width:16px;height:16px;fill:#fff}
.ds-video-media.is-playing .ds-vt-sound,.ds-video-media:hover .ds-vt-sound,.ds-vt-sound:focus-visible{opacity:1}
/* người bán */
.ds-video-seller{position:absolute;z-index:2;bottom:0;left:0;right:0;display:flex;align-items:center;gap:6px;padding:30px 8px 12px;background:linear-gradient(transparent,#0009);color:#fff;font:600 12px/1.4 system-ui;pointer-events:none}
.ds-video-seller>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px #000}
.ds-seller-avatar{width:20px;height:20px;flex:0 0 20px;display:grid;place-items:center;background:#fff;color:#444;border-radius:50%;overflow:hidden}.ds-seller-avatar img{width:100%;height:100%;object-fit:cover}
/* thanh tiến trình mỏng */
.ds-vt-progress{position:absolute;z-index:3;left:0;right:0;bottom:0;height:3px;background:#fff4;opacity:0;transition:opacity .2s}
.ds-vt-progress i{display:block;height:100%;width:0;background:#fff}
.ds-video-media.is-playing .ds-vt-progress{opacity:1}
/* thông tin sản phẩm */
.ds-video-info{display:grid;gap:5px;padding:8px 0 0;min-width:0;cursor:pointer}
.ds-video-product{display:flex;align-items:start;gap:8px;width:100%;text-align:left;padding:0;border:0;background:transparent;color:var(--ds-ink);font:inherit;cursor:pointer}
.ds-video-title{flex:1;min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;line-height:1.4;font-weight:400}
.ds-video-thumb{width:44px;height:44px;flex:0 0 44px;object-fit:cover;border:1px solid #e9eaf0;border-radius:6px}
.ds-video-link{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:44px;padding:6px 0;border:0;background:transparent;color:#b6311d;font:600 12px/1.4 system-ui;cursor:pointer;text-align:left}
.ds-video-error{position:absolute;z-index:4;inset:60px 12px 55px;margin:0;display:flex;align-items:center;justify-content:center;text-align:center;color:white;background:#15151ce6;padding:12px;border-radius:8px;font-size:13px;line-height:1.5}
.ds-video-error[hidden]{display:none!important}
.ds-video-section{padding:20px;border-radius:12px;background:#fff}
@media(min-width:1101px){.ds-video-section .ds-heading h2{font-size:21px!important}}
@media(max-width:1100px){.ds-video-rail{grid-auto-columns:calc((100% - 54px)/4)}}
@media(max-width:800px){.ds-video-rail{grid-auto-columns:calc((100% - 36px)/3)}}

/* ===== Thẻ sản phẩm kiểu "Mặt hàng phổ biến" ===== */
.ds-card-pop{border:0;border-radius:0;background:transparent;overflow:visible}
.ds-card-pop .ds-media{aspect-ratio:1;border-radius:12px}
.ds-card-pop .ds-card-body{padding:10px 0 0;gap:5px}
.ds-card-pop h3{font-size:14px!important;font-weight:400;line-height:1.45;min-height:0;-webkit-line-clamp:2}

/* Free shipping (ảnh + video) */
.ds-ship{position:absolute;left:0;bottom:8px;z-index:2;padding:3px 8px 3px 6px;background:#0e6f6a;color:#fff;font:600 12px/1.4 system-ui;border-radius:0 4px 4px 0;pointer-events:none}
.ds-video-media .ds-ship{bottom:auto;top:8px}

/* tag trước tiêu đề */
.ds-tagpill{display:inline-block;padding:1px 5px;margin-right:3px;border-radius:3px;background:#ffe9ef;color:#d50945;font-size:11px;font-weight:700;line-height:1.35;vertical-align:1px}
.ds-tagpill.is-sale{background:#fe2c55;color:#fff}
.ds-tagpill.is-green{background:#099a68;color:#fff}

/* sao + đã bán */
.ds-pop-stats{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;margin:0;font-size:13px;line-height:1.4;color:#5c5f6a;white-space:nowrap;overflow:hidden}
.ds-rating-wrap{display:inline-flex;align-items:center;gap:3px;color:#393b44}
.ds-pop-stats b{font-weight:500}
.ds-single-star{display:none;color:#5c5f6a;font-size:13px;line-height:1}
.ds-stat-sep{display:inline-block;width:1px;height:11px;background:#dcdde3;flex:0 0 1px}
.ds-sold-count{color:#6b7080;overflow:hidden;text-overflow:ellipsis}
.ds-pop-stars{position:relative;display:inline-block;color:#dcdde3;letter-spacing:-1px;white-space:nowrap}
.ds-pop-stars .fill{position:absolute;left:0;top:0;overflow:hidden;color:#ffb400}

/* Deal / Flash sale + icon */
.ds-deal{display:flex;align-items:center;gap:3px;margin:0;color:#fe2c55;font-size:12.5px;font-weight:600;line-height:1.3}
.ds-ico{width:13px;height:13px;flex:0 0 13px;fill:currentColor}

/* hàng giá */
.ds-pop-prices{display:flex;align-items:baseline;flex-wrap:nowrap;gap:6px;line-height:1.3;white-space:nowrap;overflow:hidden}
.ds-pop-off{color:#fe2c55;font-size:18px;font-weight:600}
.ds-pop-prices strong{color:#111;font-size:19px;font-weight:700;letter-spacing:-.3px}
.ds-cur-pre{display:none;font-size:13px;font-weight:700;margin-right:1px;text-decoration:underline}
.ds-cur-post{font-size:11px;font-weight:600;vertical-align:baseline;margin-left:1px}
.ds-pop-prices del{color:#8a8d9b;font-size:13px}
.ds-pop-prices del .ds-cur-pre{font-size:11px;font-weight:400}
.ds-pop-prices del .ds-cur-post{font-size:9px}

/* Giá trị tham khảo bên cạnh nút tạo link — trên desktop */
.ds-actions{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;border-top:1px solid #f0f1f4;padding-top:4px}
.ds-actions .ds-video-link{flex:1 1 58%;width:auto;min-width:0;justify-content:flex-start;gap:3px;line-height:1.3;font-size:12px}
.ds-estimate{flex:0 1 48%;min-width:0;text-align:right;color:#687082;font:500 11px/1.3 system-ui,sans-serif}
.ds-estimate span,.ds-estimate strong{display:block;overflow-wrap:anywhere}
.ds-estimate strong{margin-top:2px;color:#bf3a21;font-size:13px;font-weight:750}
.ds-estimate-note{margin:0;color:#626577;font:400 13px/1.5 system-ui,sans-serif}

/* ==========================================================================
   GIAO DIỆN ĐIỆN THOẠI (CHUẨN TIKTOK SHOP NHƯ ẢNH 3 & ẢNH 4)
   ========================================================================== */
@media(max-width:640px){
  .ds-store{gap:20px}
  .ds-heading{margin-bottom:10px;gap:8px}
  .ds-heading h2{font-size:18px!important;font-weight:700;color:#111}
  /* Ẩn 2 nút mũi tên tròn to trên điện thoại để sạch giống Ảnh 3 & 4 */
  .ds-heading .ds-arrows{display:none!important}

  /* Phần Video "Tiết kiệm dành cho bạn" — giống hệt Ảnh 4 */
  .ds-video-section{padding:0;background:transparent;border-radius:0}
  .ds-video-rail{
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:calc((100% - 10px)/2);
    gap:10px;
    padding:0 0 4px;
    scrollbar-width:none;
  }
  .ds-video-rail::-webkit-scrollbar{display:none}
  .ds-video-media{border-radius:10px;aspect-ratio:9/15.2}
  /* Nút Play màu trắng nổi bật ở giữa, bỏ nền tròn đen mờ */
  .ds-vt-state{width:auto;height:auto;background:transparent;backdrop-filter:none;filter:drop-shadow(0 2px 8px rgba(0,0,0,.35))}
  .ds-vt-state svg{width:46px;height:46px}
  /* Ẩn nhãn Free shipping, tên shop đè lên video và nút loa khi chưa phát để sạch như Ảnh 4 */
  .ds-ship,.ds-video-seller{display:none!important}
  .ds-vt-sound{opacity:0}
  .ds-video-media.is-playing .ds-vt-sound{opacity:1}

  .ds-video-info{padding:8px 2px 0;gap:4px}
  .ds-video-product{min-height:0;align-items:flex-start;gap:6px}
  .ds-video-title{
    font-size:13.5px!important;
    line-height:1.36;
    color:#161823;
    -webkit-line-clamp:2;
    font-weight:400;
  }
  .ds-video-thumb{
    width:36px;
    height:36px;
    flex:0 0 36px;
    border-radius:5px;
    border:1px solid #eceef2;
  }

  /* Lưới sản phẩm 2 cột chuẩn TikTok Shop — giống hệt Ảnh 3 */
  .ds-product-rail{
    display:grid;
    grid-auto-flow:row;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-columns: unset;
    gap:16px 10px;
    overflow:visible;
    padding:0;
  }
  .ds-card-pop .ds-media,
  .ds-rail-portrait .ds-media{
    aspect-ratio:1/1;
    border-radius:8px;
  }
  .ds-card-pop .ds-card-body{
    padding:7px 2px 0;
    gap:4px;
  }
  .ds-card-pop h3{
    font-size:13.5px!important;
    line-height:1.36!important;
    color:#161823;
    font-weight:400;
    min-height:0!important;
    -webkit-line-clamp:2;
  }

  /* Dòng 4.8 ★ | 127607 đã bán gọn trên 1 hàng duy nhất */
  .ds-pop-stars{display:none!important}
  .ds-single-star{display:inline!important}
  .ds-pop-stats{font-size:12.5px;gap:5px;color:#6b7080}
  .ds-rating-wrap{color:#4a4d57;gap:2px}

  /* Dòng 🔥 Deal */
  .ds-deal{font-size:12px;gap:3px;color:#fe2c55}

  /* Dòng giá: ₫60.000  ₫102.000 trên 1 hàng duy nhất, bỏ % giảm giá rườm rà */
  .ds-pop-off{display:none!important}
  .ds-cur-pre{display:inline!important}
  .ds-cur-post{display:none!important}
  .ds-pop-prices{gap:5px;margin-top:1px}
  .ds-pop-prices strong{font-size:17px;font-weight:700;color:#111;letter-spacing:-.2px}
  .ds-pop-prices del{font-size:12px;color:#8a8d9b}

  /* Ẩn hoàn toàn dòng "Lấy link hoàn tiền ↗ | Hoàn dự kiến Chưa có" và ghi chú thừa trên điện thoại */
  .ds-actions,.ds-estimate-note{display:none!important}
}
