/* Bản DESKTOP TỐI GIẢN, VIDEO LÀ TRUNG TÂM (/desktop/ ⇒ desktop.html, <body class="dt">). MỘT khối @media (min-width: 1024px), mọi
   selector bắt đầu bằng body.dt ⇒ dưới 1024px không có quy tắc nào ở đây: /desktop/ y hệt trang điện thoại.
   Trang = một màn: thanh trên 72 · thân · chân trang 44, một nền rêu (vignette rất nhẹ), điểm nhấn là kẻ vàng 1px + chữ serif lớn.
   Thân 3 cột (container 1360): chữ + CTA | KHUNG VIDEO (cao = thân − 32, rộng = cao × 0,7) + mũi tên ngoài khung | "Mẫu tiếp theo" dọc.
   .app = display: contents ⇒ .stage, mũi tên (desktop.js), #strip vào thẳng lưới 3 cột; .dock do desktop.js chuyển vào #dt-cta.
   Khung video chỉ mất khung sự kiện in sẵn ~20% trên của reel (lớp phủ .ov của app.js thay chỗ đó). */
@media (min-width: 1024px) {
  body.dt {
    --dt-deep: #0B1A16;
    --dt-gold: #D9B97A;
    --dt-cta: #C9A45D;
    --dt-ink: #E8E4DA;
    --dt-mute: #B9B3A5;
    --dt-dim: #8F897C;
    --dt-hair: rgba(217, 185, 122, .12);
    --dt-max: 1360px;
    --dt-gut: clamp(24px, 3vw, 40px);
    --dt-head: 72px;
    --dt-foot: 44px;
    --dt-pady: 16px;
    --dt-gap: 56px;
    /* 2 cột bên cần tối thiểu 260 + 220, 2 khe 56, mũi tên 20 + 48 ⇒ phần còn lại của container là trần bề ngang khung video */
    --dt-side: 660px;
    --dt-row: 97px;
    --dt-page: max(var(--app-h), 620px);
    --dt-cw: min(var(--dt-max), 100vw - 2 * var(--dt-gut));
    --dt-h: min(var(--dt-page) - var(--dt-head) - var(--dt-foot) - 2 * var(--dt-pady), (var(--dt-cw) - var(--dt-side)) / .7);
    --dt-w: calc(var(--dt-h) * .7);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--dt-head) minmax(0, 1fr) var(--dt-foot);
    height: var(--dt-page);
    overflow-x: hidden;
    overflow-y: auto;
    background: #10241F radial-gradient(ellipse 110% 95% at 50% 45%, #10241F 58%, #0C1D19 100%);
  }
  /* danh mục (modal) đang mở: trang phía sau đứng yên */
  body.dt:has(.cat.is-open) { overflow: hidden; }

  /* ---------- khối tĩnh: hiện ra (trong HTML mang hidden cho màn < 1024) ---------- */
  body.dt .dt-head[hidden],
  body.dt .dt-foot[hidden],
  body.dt .dt-copy[hidden] { display: block !important; }
  body.dt .dt-land,
  body.dt .dt-copy { color: var(--dt-ink); font: 400 16px/1.5 var(--sans); }
  body.dt :where(.dt-land, .dt-copy) :where(h1, p) { margin: 0; }
  body.dt .dt-wrap { width: 100%; max-width: calc(var(--dt-max) + 2 * var(--dt-gut)); margin: 0 auto; padding: 0 var(--dt-gut); }

  /* ---------- Thanh trên 72: logo · số điện thoại (chữ) · link "Xem tất cả mẫu" ---------- */
  body.dt .dt-head { grid-row: 1; border-bottom: 1px solid var(--dt-hair); }
  body.dt .dt-head-in { display: flex; align-items: center; justify-content: space-between; height: 100%; }
  body.dt .dt-logo { display: block; width: auto; height: 26px; }
  body.dt .dt-head-end { display: flex; align-items: center; gap: 36px; }
  body.dt .dt-phone { color: var(--dt-gold); font-size: 15px; font-weight: 500; letter-spacing: .06em; white-space: nowrap; }
  body.dt .dt-link {
    color: var(--dt-ink);
    font-size: 14px; white-space: nowrap;
    text-decoration: underline 1px rgba(217, 185, 122, .5);
    text-underline-offset: 6px;
  }

  /* ---------- Thân: 3 cột, căn giữa dọc ---------- */
  body.dt .dt-hero {
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto minmax(220px, .8fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--dt-gap);
    width: 100%;
    max-width: calc(var(--dt-max) + 2 * var(--dt-gut));
    min-height: 0;
    margin: 0 auto;
    padding: var(--dt-pady) var(--dt-gut);
  }
  body.dt .app { display: contents; }
  body.dt .topbar,
  body.dt .cat-veil,
  body.dt .swipe-hint { display: none; }

  /* ---------- TRÁI: 4 thứ, xếp dọc, thoáng ---------- */
  body.dt .dt-copy { grid-column: 1; grid-row: 1; min-width: 0; container: dtcopy / inline-size; }
  body.dt .dt-eyebrow { display: flex; align-items: center; gap: 14px; color: var(--dt-gold); font-size: 12px; font-weight: 600; letter-spacing: .24em; line-height: 16px; }
  body.dt .dt-eyebrow::before { content: ""; flex: none; width: 32px; height: 1px; background: currentColor; }
  /* 44–48; cột hẹp (màn 1920: khung video rất to) thì nhỏ lại để giữ 3 dòng */
  body.dt .dt-title { margin-top: 22px; color: var(--dt-ink); font: 600 clamp(38px, 13.2cqi, 48px)/1.12 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
  body.dt .dt-lead { max-width: 360px; margin-top: 20px; color: var(--dt-mute); font-size: 16px; line-height: 1.6; }
  body.dt .dt-cta { margin-top: 40px; }

  /* CTA = chính .dock của app.js (#act-msg · #act-call · #act-detail — đo lường giữ nguyên), xếp dọc */
  body.dt .dock {
    display: flex; flex-direction: column; align-items: flex-start;
    height: auto;
    padding: 0;
    background: none;
    border: 0;
  }
  body.dt .dock .cta {
    order: 1; flex: none; gap: 10px;
    width: 100%; max-width: 320px; height: 56px; padding: 0 24px;
    border-radius: 12px;
    background: var(--dt-cta);
    box-shadow: none;
    color: #14100A;
    font-size: 16px; font-weight: 600;
  }
  body.dt .dock .cta svg { width: 21px; height: 21px; }
  body.dt .dock .dk {
    flex: none; flex-direction: row; gap: 10px;
    width: auto; height: auto; padding: 2px 0;
    border: 0; border-radius: 0;
    background: none;
    color: var(--dt-ink);
    font-weight: 500; line-height: 1.3;
  }
  body.dt #act-call { order: 2; margin-top: 20px; font-size: 15px; }
  body.dt #act-call svg { width: 18px; height: 18px; color: var(--dt-gold); }
  /* "Gọi" đọc đủ số: chữ lấy từ aria-label sẵn có (không sửa DOM; tên truy cập vẫn là aria-label) */
  body.dt #act-call span { display: none; }
  body.dt #act-call::after { content: attr(aria-label); white-space: nowrap; }
  body.dt .dock #act-detail { order: 3; margin-top: 12px; color: var(--dt-mute); font-size: 13px; }
  body.dt #act-detail svg,
  body.dt #act-detail span { display: none; }
  body.dt #act-detail::after { content: "Chi tiết mẫu đang xem"; text-decoration: underline 1px rgba(185, 179, 165, .45); text-underline-offset: 5px; white-space: nowrap; }
  /* desktop.js chưa kịp chuyển .dock: ẩn chỗ cũ 2,5 giây (không nháy), quá hạn (JS lỗi) thì hiện dưới cột trái để nút đo lường không mất */
  body.dt .app > .dock {
    grid-column: 1; grid-row: 2;
    visibility: hidden;
    animation: dt-late 0s 2.5s forwards;
  }
  @keyframes dt-late { to { visibility: visible; } }

  /* ---------- GIỮA: khung video (trọng tâm) + mũi tên ngoài khung, cách mép phải 20 ---------- */
  body.dt .stage {
    grid-column: 2; grid-row: 1;
    justify-self: start;
    width: var(--dt-w);
    height: auto;
    aspect-ratio: .7;
    margin-right: 68px;
    border-radius: 24px;
    box-shadow: 0 0 0 1px rgba(217, 185, 122, .35), 0 30px 80px rgba(0, 0, 0, .45);
  }
  body.dt .dt-arrows { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; display: flex; flex-direction: column; gap: 12px; }
  body.dt .dt-arrow {
    display: grid; place-items: center;
    width: 48px; height: 48px;
    padding: 0;
    border: 1px solid rgba(217, 185, 122, .5);
    border-radius: 50%;
    background: none;
    cursor: pointer;
  }
  body.dt .dt-arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--dt-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  body.dt .dt-arrow[aria-disabled="true"] { opacity: .3; cursor: default; }

  /* ---------- PHẢI: "Mẫu tiếp theo" — danh sách dọc tối giản (mục đang xem do desktop.js dựng, chấm vàng) + K thẻ .pc kế tiếp ---------- */
  body.dt .strip {
    grid-column: 3; grid-row: 1;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: none;
  }
  body.dt .strip-head { display: flex; align-items: baseline; justify-content: space-between; height: auto; margin: 0 0 14px; padding: 0; }
  body.dt .strip-head h2 { color: var(--dt-gold); font: 600 11.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
  body.dt .strip-all {
    height: auto; padding: 0;
    color: var(--dt-mute);
    font-size: 12.5px; font-weight: 400;
    text-decoration: underline 1px rgba(185, 179, 165, .45);
    text-underline-offset: 5px;
  }
  body.dt .strip-all svg { display: none; }
  body.dt .strip-all::after { inset: -8px -6px; }
  body.dt .strip-list {
    display: flex; flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--dt-hair);
  }
  /* chỉ K thẻ ngay sau mã đang xem (desktop.js gắn .dt-vis, đoạn liền mạch theo thứ tự feed) — danh sách dọc: loopStrip
     (app.js 850–857) không bao giờ thấy tràn ngang ⇒ không nhân bản, không tự trượt */
  body.dt .strip-list > .pc { display: none; }
  body.dt .strip-list > .pc.dt-vis:not([aria-hidden="true"]),
  body.dt .dt-now {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    height: auto;
    padding: 12px 0 12px 18px;
    border-top: 1px solid var(--dt-hair);
  }
  body.dt .dt-now::before { content: ""; position: absolute; left: 2px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--dt-gold); }
  body.dt .dt-now[hidden] { display: none; }
  body.dt .pc::after { display: none; }
  body.dt .pc-img { grid-column: 1; width: 72px; height: 72px; border-radius: 12px; background-size: 56% auto; }
  body.dt .pc-img .vid,
  body.dt .pc-off,
  body.dt .pc-old { display: none; }
  body.dt .pc-txt { grid-column: 2; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  body.dt .pc-code { order: 0; color: var(--dt-mute); font-size: 12px; font-weight: 500; line-height: 16px; letter-spacing: .14em; text-transform: uppercase; }
  body.dt .pc-price { order: 1; color: var(--dt-gold); font-size: 15px; font-weight: 600; line-height: 20px; letter-spacing: 0; }

  /* ---------- Chân trang 44, một hàng ---------- */
  body.dt .dt-foot { grid-row: 3; border-top: 1px solid var(--dt-hair); color: var(--dt-dim); font-size: 12px; line-height: 18px; }
  body.dt .dt-foot-in { display: flex; align-items: center; gap: 28px; height: 100%; }
  body.dt .dt-foot-info { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.dt .dt-foot-links { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
  body.dt .dt-foot-links a,
  body.dt .dt-social a { color: var(--dt-mute); }
  body.dt .dt-social { display: flex; align-items: center; gap: 14px; }
  body.dt .dt-social a { display: grid; place-items: center; width: 18px; height: 18px; }
  body.dt .dt-social svg { width: 14px; height: 14px; fill: currentColor; }
  body.dt .dt-social .dt-ig { fill: none; stroke: currentColor; stroke-width: 1.9; }
  body.dt .dt-social .dt-ig circle:last-child { fill: currentColor; }

  /* ---------- Danh mục: modal giữa màn cùng phong cách (nền #0B1A16 96%, thẻ không viền: ảnh + mã + giá) ---------- */
  body.dt .cat {
    position: fixed; inset: 0; z-index: 60;
    display: grid; place-items: center;
    padding: 24px;
  }
  body.dt .cat-scrim { background: rgba(4, 10, 8, .7); }
  body.dt .cat-sheet {
    position: relative; inset: auto;
    width: min(960px, 100%);
    max-height: 84vh;
    background: rgba(11, 26, 22, .96);
    border: 1px solid rgba(217, 185, 122, .2);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translateY(12px);
    transition: transform .2s ease, opacity .2s ease;
  }
  body.dt .cat.is-open .cat-sheet { opacity: 1; transform: none; }
  body.dt .cat-head { padding: 26px 22px 0 28px; }
  body.dt .cat-head h2 { font-size: 28px; }
  body.dt .cat-sub { margin-top: 6px; color: var(--dt-mute); font-size: 13px; }
  body.dt .cat-x { width: 40px; height: 40px; border-color: rgba(217, 185, 122, .4); background: none; }
  /* modal giữa màn: nút đóng là dấu ×, thay mũi tên "thu lên" của bảng thả xuống */
  body.dt .cat-x svg { display: none; }
  body.dt .cat-x::before {
    content: "";
    width: 18px; height: 18px;
    background: var(--dt-gold);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.3 7.1 16.9 5.7 12 10.6 7.1 5.7 5.7 7.1l4.9 4.9-4.9 4.9 1.4 1.4 4.9-4.9 4.9 4.9 1.4-1.4-4.9-4.9z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.3 7.1 16.9 5.7 12 10.6 7.1 5.7 5.7 7.1l4.9 4.9-4.9 4.9 1.4 1.4 4.9-4.9 4.9 4.9 1.4-1.4-4.9-4.9z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  /* chip của danh mục: chữ, loại đang chọn vàng + gạch chân mảnh */
  body.dt .cat-chips { gap: 22px; padding: 16px 28px 18px; }
  body.dt .chip { height: 28px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--dt-mute); font-size: 14px; line-height: 28px; }
  body.dt .chip[aria-selected="true"] { background: none; color: var(--dt-gold); font-weight: 500; text-decoration: underline 1px; text-underline-offset: 7px; }
  body.dt .cat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 22px;
    padding: 4px 28px 28px;
    scrollbar-color: rgba(217, 185, 122, .3) transparent;
  }
  body.dt .card,
  body.dt .card.is-cur,
  body.dt .card.is-picked { border: 0; border-radius: 0; background: none; box-shadow: none; }
  body.dt .card-img { height: auto; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
  body.dt .card-img .vid,
  body.dt .card-name,
  body.dt .card-price s,
  body.dt .card-flat,
  body.dt .card.is-cur .card-img::after { display: none; }
  body.dt .card-body { padding: 10px 2px 0; }
  body.dt .card-code { font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--dt-mute); }
  /* mã đang phát: chấm vàng nhỏ (thay nhãn "ĐANG XEM") */
  body.dt .card.is-cur .card-code::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--dt-gold); }
  body.dt .card-price { margin-top: 2px; }
  body.dt .card-price b { color: var(--dt-gold); font: 600 15px/1.3 var(--sans); }

  /* Mảnh SEO gốc (#tat-ca, #ve-an-thu, #hoi-dap) + dòng link tới chúng trong danh mục: bản desktop không dùng ⇒ ẩn hẳn, kể cả khi :target */
  body.dt .seo-panel,
  body.dt .seo-links { display: none !important; }

  /* ---------- Chuột + bàn phím: viền focus vàng, hover nhẹ 150 ms ---------- */
  body.dt a:focus-visible,
  body.dt button:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
  body.dt .dt-link, body.dt .dt-arrow, body.dt .cta, body.dt .dk, body.dt .strip-all, body.dt .pc-img, body.dt .pc-code,
  body.dt .dt-foot-links a, body.dt .dt-social a, body.dt .card-img, body.dt .chip, body.dt .cat-x, body.dt .sound {
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, filter .15s ease, text-decoration-color .15s ease;
  }
  @media (hover: hover) {
    body.dt .dt-link:hover { text-decoration-color: var(--dt-gold); }
    body.dt .dt-arrow:not([aria-disabled="true"]):hover { background: rgba(217, 185, 122, .12); }
    body.dt .cta:hover { filter: brightness(1.06); }
    body.dt .dock .dk:hover { color: var(--dt-gold); }
    body.dt .strip-all:hover { color: var(--dt-gold); text-decoration-color: var(--dt-gold); }
    body.dt .pc:hover .pc-img { box-shadow: 0 0 0 1px rgba(217, 185, 122, .7); }
    body.dt .pc:hover .pc-code { color: var(--dt-gold); }
    body.dt .dt-foot-links a:hover,
    body.dt .dt-social a:hover { color: var(--dt-gold); }
    body.dt .card:hover .card-img { box-shadow: 0 0 0 1px rgba(217, 185, 122, .7); }
    body.dt .chip:not([aria-selected="true"]):hover { color: var(--dt-ink); }
    body.dt .cat-x:hover { background: rgba(217, 185, 122, .12); }
    body.dt .sound:hover { border-color: var(--gold-hi); background: rgba(0, 0, 0, .7); }
  }
  @media (prefers-reduced-motion: reduce) {
    body.dt .dt-link, body.dt .dt-arrow, body.dt .cta, body.dt .dk, body.dt .strip-all, body.dt .pc-img, body.dt .pc-code,
    body.dt .dt-foot-links a, body.dt .dt-social a, body.dt .card-img, body.dt .chip, body.dt .cat-x, body.dt .sound, body.dt .cat-sheet { transition: none; }
  }
  /* ≥ 1680 (khung video ~650–740 rộng): container 1440 để cột chữ còn ≥ 330 ⇒ h1 44–48 vẫn 3 dòng */
  @media (min-width: 1680px) {
    body.dt { --dt-max: 1440px; }
  }
  /* 1024–1279: khe 32, cột bên tối thiểu 220 / 180, ảnh danh sách 56; chân trang 2 dòng */
  @media (max-width: 1279px) {
    body.dt {
      --dt-gap: 32px;
      --dt-side: 532px;
      --dt-row: 77px;
      --dt-foot: 58px;
    }
    body.dt .dt-hero { grid-template-columns: minmax(220px, 1fr) auto minmax(180px, .8fr); }
    body.dt .strip-list > .pc.dt-vis:not([aria-hidden="true"]),
    body.dt .dt-now { grid-template-columns: 56px minmax(0, 1fr); column-gap: 10px; padding: 10px 0 10px 14px; }
    body.dt .pc-img { width: 56px; height: 56px; border-radius: 10px; }
    body.dt .pc-price { font-size: 14px; }
    body.dt .dt-foot-info { white-space: normal; }
  }
}
