/* ============ Hero trang chủ: phòng setup render Blender + nhãn giá + bảng Đổi món / Hình nền (room3d/js/hero.js) ============ */
.hero.has-room {
  --r3d-ink: #2b241d; --r3d-mute: #7d7062; --r3d-accent: #c4532a; --r3d-shopee: #ee4d2d;
  --r3d-glass: rgba(255, 251, 245, .7); --r3d-glass-strong: rgba(255, 251, 246, .92); --r3d-line: rgba(255, 255, 255, .6);
  --r3d-lead: rgba(43, 36, 29, .8); --r3d-lead-u: rgba(255, 250, 242, .85);
  --r3d-panel: 372px; --r3d-gap: 22px; --r3d-top: 84px; --r3d-bottom: 18px;
  /* khung phòng: lấp hết bề ngang cạnh bảng, cao vừa màn hình; ảnh dọc (770 x 919) được cắt bớt trên/dưới quanh bàn
     (tối đa rộng 1.5 x cao: vẫn giữ kệ + đồng hồ phía trên và tựa ghế) */
  --r3d-hmax: min(calc(100svh - var(--r3d-top) - var(--r3d-bottom)), 1060px);
  --r3d-w: min(calc(100vw - var(--r3d-panel) - var(--r3d-gap) - 48px), calc(var(--r3d-hmax) * 1.5));
  --r3d-h: min(var(--r3d-hmax), calc(var(--r3d-w) * 919 / 770));
  height: auto; min-height: 100svh; display: block; padding: 0; background: #17110c; font-family: "Be Vietnam Pro", Inter, system-ui, sans-serif;
}
:root[data-theme="dark"] .hero.has-room {
  --r3d-ink: #f6eee4; --r3d-mute: #c2b3a2; --r3d-accent: #ff9b6a;
  --r3d-glass: rgba(34, 25, 19, .66); --r3d-glass-strong: rgba(33, 25, 19, .93); --r3d-line: rgba(255, 236, 214, .16);
  --r3d-lead: rgba(255, 246, 236, .88); --r3d-lead-u: rgba(20, 14, 10, .55);
}
.hero.has-room .sr-only, .r3d .sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* clip (không phải hidden): khung không cuộn ngang được bằng code — bấm loa từng đẩy cả phòng + bảng sang trái (chủ shop 04/12) */
.r3d { position: relative; min-height: 100svh; overflow: hidden; overflow: clip; }
/* nền quanh phòng: chính ảnh phòng, mờ và tối — liền mạch */
.r3d-ambient { position: absolute; inset: -80px; background: url("../../room3d/img/hero/base-1x.webp") center 45% / cover no-repeat;
  filter: blur(54px) saturate(1.15) brightness(.4); transform: scale(1.1); pointer-events: none; }
.r3d-ambient::after { content: ""; position: absolute; inset: 0; background: radial-gradient(110% 90% at 40% 50%, transparent 0 35%, rgba(14, 9, 6, .6) 100%); }
.r3d-wrap { position: relative; display: flex; justify-content: center; align-items: stretch; gap: var(--r3d-gap); padding: var(--r3d-top) 24px var(--r3d-bottom); }

/* ---- khung phòng ---- */
.r3d-stage { position: relative; flex: none; min-width: 0; width: var(--r3d-w); height: var(--r3d-h); border-radius: 22px; overflow: hidden; isolation: isolate;
  contain: layout paint; user-select: none; -webkit-user-select: none; background: #2a1f17;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 240, 220, .08); }
.r3d-stage.is-pointing { cursor: pointer; }
.r3d-frame { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.r3d-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; pointer-events: none; }
.r3d-patches { position: absolute; inset: 0; pointer-events: none; }
.r3d-scene { position: absolute; inset: 0; pointer-events: none; }
.r3d-scene.is-next { opacity: 0; transition: opacity .85s ease; }
.r3d-scene.is-next.on { opacity: 1; }
.r3d-patch { position: absolute; display: block; max-width: none; opacity: 0; transition: opacity .26s ease; }
.r3d-patch.on { opacity: 1; }
.r3d-screens { position: absolute; inset: 0; pointer-events: none; }
.r3d-strip { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: auto; cursor: pointer; }
.r3d-clock { position: absolute; pointer-events: none; mix-blend-mode: screen; }
.r3d-hl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .2s; }
.r3d-hl.on { opacity: 1; }
.r3d-hl path { fill: rgba(255, 246, 232, .07); stroke: rgba(255, 248, 236, .85); stroke-width: 1.2; stroke-linejoin: round; stroke-dasharray: 4 3; }

/* ---- đường dẫn + nhãn giá (nhỏ gọn) ---- */
.r3d-leads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.r3d-leads g { opacity: 0; transition: opacity .3s ease; }
.r3d-leads g.on { opacity: 1; }
.r3d-lead-u { fill: none; stroke: var(--r3d-lead-u); stroke-width: 2.6; stroke-linecap: round; }
.r3d-lead { fill: none; stroke: var(--r3d-lead); stroke-width: 1; stroke-linecap: round; }
.r3d-core { fill: #fffdf8; stroke: rgba(43, 36, 29, .75); stroke-width: 1.1; }
.r3d-halo { fill: rgba(255, 250, 240, .55); transform-box: fill-box; transform-origin: center; animation: r3dPulse 2.6s ease-out infinite; }
@keyframes r3dPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }
.r3d-tags { position: absolute; inset: 0; pointer-events: none; }
.r3d-tag { position: absolute; left: 0; top: 0; display: flex; align-items: stretch; pointer-events: none; opacity: 0; color: var(--r3d-ink);
  transition: opacity .28s ease; will-change: transform; }
.r3d-tag.on { opacity: 1; pointer-events: auto; }
.r3d-tag-buy { display: block; padding: 3px 8px 4px; border-radius: 8px; background: var(--r3d-glass); color: inherit; text-decoration: none;
  backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3); border: 1px solid var(--r3d-line);
  box-shadow: 0 6px 18px -12px rgba(40, 24, 10, .6); white-space: nowrap; transition: background .2s; }
.r3d-tag:has(.r3d-tag-swap) .r3d-tag-buy { border-radius: 8px 0 0 8px; border-right: 0; }
.r3d-tag-buy:hover, .r3d-tag.is-active .r3d-tag-buy { background: var(--r3d-glass-strong); }
.r3d-tag-swap { display: grid; place-items: center; width: 21px; padding: 0; border: 1px solid var(--r3d-line); border-left: 1px solid rgba(120, 100, 80, .18);
  border-radius: 0 8px 8px 0; background: var(--r3d-glass); color: var(--r3d-ink); cursor: pointer;
  backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3); transition: background .2s; }
.r3d-tag-swap:hover { background: var(--r3d-glass-strong); }
.r3d-tag-swap svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.r3d-tag .r3d-eb { font-size: 7.5px; letter-spacing: .15em; }
/* nhãn giá gọn (chủ shop 03/12: nhỏ hơn): tên + giá + % giảm; giá gạch và chữ "từ" xem trong bảng bên phải */
.r3d-tag .r3d-nm { font-size: 10.5px; line-height: 1.2; }
.r3d-tag .r3d-now { font-size: 10.5px; }
.r3d-tag .r3d-price s, .r3d-tag .r3d-from { display: none; }
.r3d-tag .r3d-price em { font-size: 8px; line-height: 11px; padding: 0 3.5px; }
.r3d-tag .r3d-price { gap: 4px; margin-top: 0; }
/* nhãn hình nền: chữ thứ hai màu Zalo, chấm neo màu Zalo */
.r3d-tag-wp .r3d-now { color: #0068ff; }
:root[data-theme="dark"] .hero.has-room .r3d-tag-wp .r3d-now { color: #5aa2ff; }
.r3d-leads g[data-slot="wallpaper"] .r3d-core { fill: #0068ff; stroke: #fff; }
.r3d-eb { display: block; font-size: 9px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--r3d-mute); line-height: 1.3; }
.r3d-nm { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.r3d-price { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.r3d-now { font-size: 13px; font-weight: 700; color: var(--r3d-accent); letter-spacing: -.01em; }
.r3d-now sup { font-size: .62em; font-weight: 600; margin-left: 1px; vertical-align: .45em; }
.r3d-price s { font-size: 10.5px; color: var(--r3d-mute); text-decoration-thickness: 1px; }
.r3d-price em { font-style: normal; font-size: 9.5px; font-weight: 700; color: #fff; line-height: 14px; padding: 0 5px; border-radius: 999px; background: var(--r3d-shopee); }
.r3d-from { font-size: 10.5px; color: var(--r3d-mute); }
.r3d-see { font-size: 12px; font-weight: 600; color: var(--r3d-accent); }
.r3d-soon { display: block; font-size: 11px; color: var(--r3d-mute); margin-top: 2px; }
.r3d-tag-buy:focus-visible, .r3d-tag-swap:focus-visible, .r3d-btn:focus-visible, .r3d-opt:focus-visible, .r3d-sw:focus-visible, .r3d-buy:focus-visible,
.r3d-card:focus-visible { outline: 2px solid #ffb36b; outline-offset: 2px; }

/* ---- thanh nhỏ trên ảnh ---- */
.r3d-bar { position: absolute; left: 14px; bottom: 14px; z-index: 4; display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 999px; background: var(--r3d-glass); border: 1px solid var(--r3d-line); color: var(--r3d-ink);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 10px 26px -16px rgba(30, 18, 8, .6); }
/* nút lưu ảnh setup: góc trên phải của ảnh */
.r3d-btn.r3d-save { position: absolute; top: 14px; right: 14px; z-index: 4; height: 36px; padding: 0 14px 0 12px; background: var(--r3d-glass); color: var(--r3d-ink);
  border: 1px solid var(--r3d-line); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 10px 26px -16px rgba(30, 18, 8, .6); }
.r3d-btn.r3d-save:hover:not(:disabled) { background: var(--r3d-glass-strong); }
/* nút đổi kiểu phòng: góc trên trái, tên kiểu đang xem; vạch dưới chạy 10 giây trước khi tự đổi */
.r3d-btn.r3d-style { position: absolute; top: 14px; left: 14px; z-index: 4; height: 36px; padding: 0 14px 0 11px; overflow: hidden; background: var(--r3d-glass); color: var(--r3d-ink);
  border: 1px solid var(--r3d-line); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 10px 26px -16px rgba(30, 18, 8, .6); }
.r3d-btn.r3d-style:hover:not(:disabled) { background: var(--r3d-glass-strong); }
.r3d-btn.r3d-style[hidden] { display: none; }
.r3d-btn.r3d-style::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--r3d-accent);
  opacity: 0; transform: scaleX(0); transform-origin: 0 50%; }
.r3d-btn.r3d-style.is-auto::after { opacity: .7; animation: r3dAuto 10s linear forwards; }
@keyframes r3dAuto { to { transform: scaleX(1); } }
.r3d-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: inherit;
  font: 600 12px/1 "Be Vietnam Pro", Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap; transition: background .18s, opacity .18s, transform .12s; touch-action: manipulation; }
.r3d-btn:hover:not(:disabled) { background: rgba(120, 90, 60, .12); }
.r3d-btn:active:not(:disabled) { transform: scale(.96); }
.r3d-btn:disabled { opacity: .35; cursor: default; }
.r3d-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.r3d-btn[aria-pressed="true"] { background: var(--r3d-ink); color: var(--r3d-glass-strong); }
.r3d-icon { width: 32px; padding: 0; justify-content: center; }
.r3d-btn[hidden] { display: none; }
.r3d-status { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 7px 13px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--r3d-ink); background: var(--r3d-glass-strong); opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 6; }
.r3d-status.on { opacity: 1; }

/* ---- bảng bên phải ---- */
.r3d-panel { flex: none; min-width: 0; width: var(--r3d-panel); height: var(--r3d-h); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; overflow: clip;
  background: var(--r3d-glass-strong); color: var(--r3d-ink); border: 1px solid var(--r3d-line);
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); box-shadow: 0 40px 90px -44px rgba(0, 0, 0, .9); }
.r3d-pane { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.r3d-pane[hidden] { display: none; }
.r3d-pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; flex: none; }
.r3d-pane-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--r3d-ink); }
.r3d-pane-head p { display: flex; align-items: center; gap: 7px; margin: 3px 0 0; font-size: 12px; color: var(--r3d-mute); line-height: 1.35; }
.r3d-pane-head p b { color: var(--r3d-ink); font-weight: 600; }
.r3d-pane-acts { display: flex; gap: 2px; flex: none; }
.r3d-fold, .r3d-fold-n { display: none; }   /* chỉ dùng trên điện thoại */
.r3d-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 10px 96px; scrollbar-width: thin; scrollbar-color: rgba(120, 100, 80, .3) transparent; }

/* bảng món (chủ shop 03/12): lưới thẻ 2 cột, ảnh sản phẩm không nền; bấm thẻ -> ngăn lựa chọn mở ngay dưới hàng đó.
   grid dense: ngăn (rộng cả hàng) nằm sau thẻ đang mở, thẻ kế bên vẫn lấp chỗ trống cùng hàng */
.r3d-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-flow: row dense; gap: 4px; }
.r3d-card { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 7px 7px 7px 5px;
  border: 1px solid transparent; border-radius: 13px; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit;
  transition: background .15s, border-color .15s; }
.r3d-card:hover { background: rgba(255, 255, 255, .45); }
:root[data-theme="dark"] .hero.has-room .r3d-card:hover { background: rgba(255, 255, 255, .06); }
.r3d-card.is-open { border-color: color-mix(in srgb, var(--r3d-accent) 55%, transparent); background: color-mix(in srgb, var(--r3d-accent) 8%, transparent); }
.r3d-cthumb, .r3d-othumb { display: block; }
.r3d-cthumb img, .r3d-othumb img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 3px 4px rgba(40, 24, 10, .22)); }
.r3d-cthumb { width: 44px; height: 44px; }
.r3d-ctxt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.r3d-cat { font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--r3d-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r3d-card .r3d-nm { font-size: 12px; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.r3d-cprice { display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; line-height: 1.2; min-width: 0; }
.r3d-cprice b { font-size: 12px; font-weight: 700; color: var(--r3d-accent); white-space: nowrap; }
.r3d-cprice sup { font-size: .62em; vertical-align: .45em; margin-left: 1px; }
.r3d-cprice i { font-style: normal; font-size: 11px; color: var(--r3d-mute); }
.r3d-cprice em { font-style: normal; font-size: 9px; font-weight: 700; color: #fff; line-height: 13px; padding: 0 4px; border-radius: 999px; background: var(--r3d-shopee); }
/* số lựa chọn: góc dưới ảnh, không chiếm chỗ chữ */
.r3d-cn { position: absolute; left: 3px; bottom: 5px; display: inline-flex; align-items: center; gap: 1px; padding: 0 4px; height: 14px; border-radius: 999px;
  font-size: 9px; font-weight: 700; color: var(--r3d-mute); background: var(--r3d-glass-strong); box-shadow: 0 0 0 1px var(--r3d-line); }
.r3d-cn svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.r3d-drawer { grid-column: 1 / -1; padding: 8px 6px 10px; margin: 0 0 4px; border-radius: 14px; background: rgba(255, 255, 255, .42);
  box-shadow: inset 0 0 0 1px rgba(120, 100, 80, .14); animation: r3dIn .22s ease; }
:root[data-theme="dark"] .hero.has-room .r3d-drawer { background: rgba(255, 255, 255, .05); }
@keyframes r3dIn { from { opacity: 0; transform: translateY(-4px); } }
/* các lựa chọn: dải ngang, nhiều món thì cuộn ngang (không làm bảng dài ra) */
.r3d-opts { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 4px; scrollbar-width: thin; scrollbar-color: rgba(120, 100, 80, .3) transparent; }
.r3d-opt { flex: 0 0 104px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 7px 6px 8px;
  border: 1px solid rgba(120, 100, 80, .16); border-radius: 12px; background: rgba(255, 255, 255, .5); color: inherit; text-align: center; cursor: pointer; font: inherit;
  transition: background .15s, border-color .15s; }
:root[data-theme="dark"] .hero.has-room .r3d-opt { background: rgba(255, 255, 255, .04); }
.r3d-opt:hover:not(:disabled) { background: rgba(255, 255, 255, .85); }
:root[data-theme="dark"] .hero.has-room .r3d-opt:hover:not(:disabled) { background: rgba(255, 255, 255, .09); }
.r3d-opt:disabled { opacity: .5; cursor: default; }
.r3d-opt[aria-checked="true"] { border-color: var(--r3d-accent); box-shadow: inset 0 0 0 1px var(--r3d-accent); }
.r3d-othumb { width: 56px; height: 56px; }
.r3d-opt .r3d-nm { width: 100%; font-size: 11.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.r3d-oprice b { font-size: 11.5px; font-weight: 700; color: var(--r3d-accent); font-variant-numeric: tabular-nums; }
.r3d-vars { display: flex; align-items: center; gap: 2px; padding: 6px 2px 0; flex-wrap: wrap; }
.r3d-lab { font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--r3d-mute); margin-right: 4px; }
.r3d-sw { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.r3d-sw:disabled { opacity: .35; cursor: default; }
.r3d-sw::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.r3d-sw[aria-pressed="true"]::before { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), 0 0 0 2px var(--r3d-glass-strong), 0 0 0 3.5px var(--r3d-ink); }
.r3d-varname { font-size: 11.5px; color: var(--r3d-mute); margin-left: 4px; }
.r3d-buy { display: flex; align-items: center; gap: 8px; height: 38px; margin-top: 8px; padding: 0 12px; border-radius: 11px; background: var(--r3d-shopee); color: #fff;
  font-size: 12.5px; font-weight: 600; text-decoration: none; transition: filter .15s, transform .12s; }
.r3d-buy span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r3d-buy:hover { filter: brightness(1.06); }
.r3d-buy:active { transform: scale(.98); }
.r3d-buy b { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.r3d-buy svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.r3d-note { grid-column: 1 / -1; margin: 8px 6px 0; text-align: center; font-size: 10.5px; line-height: 1.45; color: var(--r3d-mute); }

/* thẻ Hình nền: lưới mẫu Hot của app.js */

/* ---- điện thoại / máy tính bảng: phòng ở trên (cắt nhẹ quanh bàn), bảng ngay bên dưới ---- */
@media (max-width: 900px) {
  .hero.has-room { --r3d-top: 76px; min-height: 0; }
  .r3d { min-height: 0; }
  .r3d-ambient { display: none; }
  .r3d-wrap { flex-direction: column; align-items: stretch; gap: 12px; padding: var(--r3d-top) 10px 18px; }
  .r3d-stage { width: 100%; height: auto; aspect-ratio: 770 / 860; border-radius: 18px; }
  .r3d-panel { width: 100%; height: auto; max-height: none; border-radius: 18px; }
  .r3d-scroll { overflow: visible; padding-bottom: 12px; }
  .r3d-bar { left: 10px; bottom: 10px; }
  .r3d-btn.r3d-save { top: 10px; right: 10px; height: 34px; padding: 0 11px 0 9px; }
  .r3d-btn.r3d-style { top: 10px; left: 10px; height: 34px; padding: 0 11px 0 9px; font-size: 11.5px; }
  .r3d-btn { height: 36px; }
  .r3d-icon { width: 36px; }
  /* bảng "Món trong phòng": mặc định thu gọn, bấm đầu bảng để mở danh sách */
  .r3d-pane-head { position: relative; align-items: center; }
  .r3d-pane-head h2 { display: flex; align-items: baseline; gap: 8px; }
  .r3d-fold-n { display: inline; font-size: 12px; font-weight: 600; color: var(--r3d-mute); }
  .r3d-fold { display: flex; align-items: center; justify-content: flex-end; position: absolute; inset: 0 84px 0 0; padding: 0 4px 0 0;
    border: 0; border-radius: 18px 0 0 0; background: transparent; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .r3d-fold:focus-visible { outline: 2px solid #ffb36b; outline-offset: -2px; }
  .r3d-fold .r3d-chev { transform: rotate(90deg); }
  .r3d-pane-acts { position: relative; z-index: 1; }
  .r3d-panel.is-folded .r3d-fold .r3d-chev { transform: rotate(0deg); }
  .r3d-panel.is-folded .r3d-pane-head { padding-bottom: 14px; }
  .r3d-panel.is-folded .r3d-pane-head p, .r3d-panel.is-folded .r3d-scroll { display: none; }
  /* nhãn giá trên điện thoại: thật nhỏ để không che sản phẩm (chủ shop 03/12, lần 2: nhỏ nữa) — tên + giá; % giảm xem trong bảng */
  .r3d-tag-buy { padding: 1px 4px 1.5px; border-radius: 4px; box-shadow: 0 2px 6px -5px rgba(40, 24, 10, .6);
    backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2); }
  .r3d-tag:has(.r3d-tag-swap) .r3d-tag-buy { border-radius: 4px 0 0 4px; }
  .r3d-tag-swap { position: relative; width: 11px; border-radius: 0 4px 4px 0; }
  .r3d-tag-swap::after { content: ""; position: absolute; inset: -9px -10px -9px -3px; }   /* vùng bấm rộng hơn nút */
  .r3d-tag-swap svg { width: 7px; height: 7px; stroke-width: 2.4; }
  .r3d-tag .r3d-nm { font-size: 6.5px; line-height: 1.1; letter-spacing: 0; max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
  .r3d-tag .r3d-now { font-size: 7px; line-height: 1.1; }
  .r3d-tag .r3d-now sup { font-size: .6em; }
  .r3d-tag .r3d-price { gap: 2px; margin-top: 0; line-height: 1.1; }
  .r3d-tag .r3d-eb, .r3d-tag .r3d-price s, .r3d-tag .r3d-from, .r3d-tag .r3d-price em { display: none; }
  /* đường dẫn: mảnh, màu trắng (viền tối rất nhẹ để vẫn thấy trên tường sáng) */
  .r3d-lead { stroke: rgba(255, 255, 255, .95); stroke-width: .7; }
  .r3d-lead-u { stroke: rgba(20, 14, 10, .2); stroke-width: 1.5; }
  .r3d-halo { r: 3px; }
  .r3d-core { r: 1.6px; stroke-width: .7; }
}
@media (prefers-reduced-motion: reduce) {
  .r3d-halo { animation: none; }
  .r3d-scene.is-next { transition: none; }
  .r3d-btn.r3d-style.is-auto::after { animation: none; }
  .r3d-patch, .r3d-tag, .r3d-leads g, .r3d-hl { transition: none; }
}

/* nguồn hình nền ẩn (video/ảnh của hero cũ): nằm trong khung nhìn để trình duyệt không tạm dừng video */
.r3d-src { position: absolute; left: 45%; top: 40%; width: 4px; height: 4px; overflow: hidden; opacity: .01; pointer-events: none; z-index: -1; }
.r3d-src .screen-quad { position: static; transform: none; width: 4px; height: 4px; }
.r3d-src video, .r3d-src img { width: 4px; height: 4px; }

/* ---- chuyển động trong phòng (room3d/js/fx.js, chủ shop 04/12): nằm dưới miếng vá món, chỉ transform/opacity ---- */
@property --fa { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.r3d-fx { position: absolute; inset: 0; pointer-events: none; }
.r3d-fx .fx { position: absolute; }
.r3d-fx img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; }
.r3d-fx.is-paused .fx, .r3d-fx.is-paused .fx * { animation-play-state: paused !important; }
/* cây, rèm: nghiêng qua lại quanh điểm treo */
.fx-sway img { animation: r3d-sway var(--p) ease-in-out var(--dl) infinite alternate; will-change: transform; }
@keyframes r3d-sway { from { transform: skewX(calc(var(--d) * -1deg)); } to { transform: skewX(calc(var(--d) * 1deg)); } }
/* lớp sáng: hoà screen lên ảnh, đổi độ mờ */
.fx-light img { mix-blend-mode: screen; opacity: var(--lo); animation: r3d-breathe var(--p) ease-in-out var(--dl) infinite; }
@keyframes r3d-breathe { 0%, 100% { opacity: var(--lo); } 50% { opacity: var(--hi); } }
.fx-neon img { animation-name: r3d-neon; animation-timing-function: linear; }
@keyframes r3d-neon { 0%, 61%, 63.5%, 66%, 100% { opacity: calc(var(--hi) * .55); } 62% { opacity: var(--lo); } 64.5% { opacity: calc(var(--hi) * .2); }
  65% { opacity: var(--hi); } 30% { opacity: calc(var(--hi) * .7); } }
.fx-candle img { animation-name: r3d-candle; animation-timing-function: linear; }
@keyframes r3d-candle { 0%, 100% { opacity: var(--hi); } 9% { opacity: calc(var(--hi) * .7); } 17% { opacity: calc(var(--hi) * .95); } 26% { opacity: calc(var(--hi) * .6); }
  35% { opacity: var(--hi); } 47% { opacity: calc(var(--hi) * .75); } 58% { opacity: calc(var(--hi) * .9); } 66% { opacity: calc(var(--hi) * .55); }
  78% { opacity: calc(var(--hi) * .85); } 89% { opacity: calc(var(--hi) * .68); } }
.fx-drift img { animation-name: r3d-drift; }
@keyframes r3d-drift { 0%, 100% { opacity: var(--lo); filter: hue-rotate(-10deg); } 50% { opacity: var(--hi); filter: hue-rotate(14deg); } }
/* quạt case: cánh quay trong khung elip của mặt quạt; vệt sáng chạy vòng LED (vòng sau trễ hơn: sáng chảy xuống cột quạt) */
.fx-blade { animation: r3d-spin var(--p) linear var(--dl) infinite; will-change: transform; }
@keyframes r3d-spin { from { transform: scaleY(var(--sy)) rotate(0deg) scaleY(var(--isy)); } to { transform: scaleY(var(--sy)) rotate(360deg) scaleY(var(--isy)); } }
.fx-ring { mix-blend-mode: screen; opacity: .85;
  -webkit-mask-image: conic-gradient(from var(--fa) at var(--cx) var(--cy), transparent 0deg, #000 70deg, rgba(0, 0, 0, .25) 160deg, transparent 230deg);
  mask-image: conic-gradient(from var(--fa) at var(--cx) var(--cy), transparent 0deg, #000 70deg, rgba(0, 0, 0, .25) 160deg, transparent 230deg);
  animation: r3d-flow var(--fl) linear var(--dl) infinite; }
@keyframes r3d-flow { to { --fa: 360deg; } }
/* bụi nắng: hạt sáng trôi chậm, mờ dần; hơi nước: vệt mờ bốc lên */
.fx-dust i { position: absolute; width: calc(var(--s) * 1%); aspect-ratio: 1; border-radius: 50%; background: var(--c, rgba(255, 240, 210, .9));
  box-shadow: 0 0 3px 1px rgba(255, 236, 200, .5); mix-blend-mode: screen; opacity: 0; animation: r3d-dust var(--p) ease-in-out var(--dl) infinite; }
@keyframes r3d-dust { 0% { opacity: 0; transform: translate(0, 0); } 25%, 70% { opacity: .85; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
.fx-steam i { position: absolute; width: calc(var(--s) * 1%); aspect-ratio: .6; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 250, 240, .55), transparent);
  filter: blur(2px); mix-blend-mode: screen; opacity: 0; animation: r3d-steam var(--p) ease-out var(--dl) infinite; }
@keyframes r3d-steam { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 30% { opacity: .5; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .r3d-fx { display: none; } }
