/* ===== K1 · Bàn xoay thực đơn =====
   Giao diện theo bản vẽ Claude Design 20/10/2026: bàn tròn hiện trọn, 4 đĩa quanh đĩa kính ở giữa,
   khẩu hiệu bên trái, Chép bên phải (PC). Cơ chế bàn quay / đĩa bay lấy từ mẫu "La Table" (đã xin phép).
   Tên class mà ban-xoay.js dùng (plate-position, dish-card, menu-outgoing, lifted, forming…) giữ nguyên. */

.trai-nghiem {
  position: relative;
  padding: clamp(28px, 3.6vw, 56px) 0 clamp(56px, 6vw, 96px);
  background: radial-gradient(ellipse 55% 42% at 50% 28%, #fff 0%, rgba(255, 255, 255, 0) 72%), var(--nen);
}
.hero-hang { display: flex; align-items: center; justify-content: center; }

/* Khẩu hiệu bên trái */
.khau-hieu { flex: 1 1 0; min-width: 0; padding-right: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.khau-hieu h1 { font-size: clamp(30px, 2.6vw, 40px); line-height: 1.12; font-weight: 800; letter-spacing: -0.025em; }
.khau-hieu-phu { display: flex; align-items: center; gap: 8px; font-size: 18px; color: var(--chu-phu); }
.khau-hieu-phu img { width: 24px; height: 24px; }
.khau-hieu-nut { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Bàn tròn */
.san-khau { position: relative; flex: none; width: min(460px, 86vw); aspect-ratio: 1; cursor: pointer; outline: none; touch-action: pan-y; }
html[data-input="keyboard"] .san-khau:focus-visible { outline: 3px solid var(--xanh-duong); outline-offset: 6px; border-radius: 50%; }
.bong-ban { position: absolute; inset: 7% 3% -5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 32, 20, 0.34), rgba(40, 32, 20, 0)); }
.ban-xoay {
  position: absolute; inset: 0; border-radius: 50%;
  transform: rotate(var(--rotation, 0deg));
  will-change: transform;
  transition: transform 1000ms cubic-bezier(0.65, 0, 0.25, 1);
}
.table-surface {
  position: absolute; inset: 0; border-radius: 50%;
  background: url("../img/ban-go.webp") center / cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 -10px 30px rgba(0, 0, 0, 0.25);
}
/* 4 chỗ đĩa: cỡ 36% bàn, đẩy ra 80% cỡ đĩa theo góc --angle (0° là đĩa phía trước) */
.plate-position {
  position: absolute; left: 32%; top: 32%; width: 36%; aspect-ratio: 1;
  transform: rotate(var(--angle)) translateY(80%);
}
.plate-position img {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.38));
  user-select: none; -webkit-user-drag: none;
  transition: scale 300ms var(--em-quart);
}
.plate-position img.lifted { visibility: hidden; }
@media (hover: hover) { .plate-position img:hover { scale: 1.05; } }
/* Đĩa kính tĩnh giữa bàn: chỉ trang trí, không nhận bấm (bấm xuyên xuống bàn) */
.dia-kinh {
  position: absolute; left: 40.5%; top: 40.5%; width: 19%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(2px);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55), 0 4px 14px rgba(0, 0, 0, 0.18);
}
.dia-kinh img { width: 38%; opacity: 0.85; filter: brightness(0) invert(1); }

/* Chép + bóng chữ (PC) */
.chep-pc { flex: 1 1 0; min-width: 0; align-self: flex-end; padding-left: 24px; display: flex; flex-direction: column; align-items: center; }
.chep-anh { display: block; height: 330px; width: auto; transform: scaleX(-1); }
.goi-y-xoay {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px;
  background: var(--trang); font-size: 15px; font-weight: 600; line-height: 1.35;
  box-shadow: 0 10px 30px rgba(19, 35, 63, 0.12);
}
.goi-y-xoay img { width: 28px; height: 28px; }
.bong-chu { position: relative; margin: 0 56px 14px 0; }
.bong-chu::after { content: ""; position: absolute; bottom: -8px; right: 38px; width: 16px; height: 16px; background: var(--trang); transform: rotate(45deg); }
.chep-dt { display: none; }

/* Chi tiết món đang ở trước bàn */
.chi-tiet { max-width: 640px; margin: clamp(24px, 3vw, 40px) auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.chi-tiet.changing > * { animation: hien-len 380ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.chi-tiet.changing > :nth-child(2) { animation-delay: 50ms; }
.chi-tiet.changing > :nth-child(3) { animation-delay: 100ms; }
.chi-tiet.changing > :nth-child(4) { animation-delay: 150ms; }
.chi-tiet.changing > :nth-child(5) { animation-delay: 200ms; }
.ten-mon { font-size: clamp(28px, 2.9vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.mo-ta { max-width: 520px; min-height: 3em; font-size: clamp(15px, 1.25vw, 17px); color: var(--chu-phu); }
.dong-gia { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 4px; }
.vach { width: 1px; height: 20px; background: var(--vien-nhan); }
.chay-100 { display: flex; align-items: center; gap: 6px; font-size: var(--co-nho); font-weight: 600; color: var(--xanh-la-dam); }
.chay-100 img { width: 20px; height: 20px; }
.nhan-mon { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nhan-mon span, .detail-nhan li { padding: 5px 12px; border-radius: 999px; background: var(--nen-nhan); color: var(--chu-nhan); font-size: 13px; font-weight: 600; }

/* Giá: giá bán xanh đậm, giá gạch xám */
.gia { display: inline-flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.gia b { font-size: 24px; font-weight: 800; color: var(--xanh-duong); }
.gia s { font-size: 15px; color: var(--gia-cu); }

/* Dải món chọn nhanh, 4 món một trang, trong thẻ trắng */
.dai-mon { max-width: 1040px; margin: clamp(32px, 4vw, 56px) auto 0; padding: clamp(16px, 2vw, 28px); border-radius: clamp(20px, 2vw, 28px); background: var(--trang); box-shadow: var(--bong-the); }
.dai-mon-dau { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: clamp(14px, 1.6vw, 20px); }
.dai-mon-dau h2 { flex: 1; min-width: 180px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; }
.dai-mon-dau b { font-weight: 800; color: var(--xanh-duong); }
.dem-trang { white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--chu-mo); font-variant-numeric: tabular-nums; }
.dai-mon-nut { display: flex; gap: 8px; }
.nut-mui-ten {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0;
  border: 1.5px solid var(--vien-nut); border-radius: 50%; background: var(--trang);
  transition: border-color 200ms var(--em-quart), background-color 200ms var(--em-quart), transform 150ms var(--em-quart);
}
.nut-mui-ten:hover { border-color: var(--chu); }
.nut-mui-ten:active { transform: scale(0.95); }
.nut-mui-ten-dam { border: 0; background: var(--chu); }
.nut-mui-ten-dam:hover { background: var(--xanh-duong); }
.nut-mui-ten-dam .icon { filter: brightness(0) invert(1); }
.nut-mui-ten[aria-disabled="true"] { opacity: 0.5; }

.hang-mon { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.hang-mon.is-paging { position: relative; overflow: hidden; pointer-events: none; }
.menu-outgoing { position: absolute; inset: 0; display: grid; pointer-events: none; }
.dish-card {
  display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 88px; padding: 12px;
  text-align: left; border: 2px solid var(--vien); border-radius: 18px; background: var(--trang);
  transition: border-color 200ms var(--em-quart), background-color 200ms var(--em-quart), transform 200ms var(--em-quart);
}
.dish-card img { flex: none; display: block; width: clamp(52px, 5vw, 64px); height: clamp(52px, 5vw, 64px); border-radius: 50%; }
.dish-card > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dish-card strong { font-size: var(--co-nho); font-weight: 600; line-height: 1.3; }
.card-price { font-size: var(--co-nho); font-weight: 800; color: var(--xanh-duong); font-variant-numeric: tabular-nums; }
.dish-card:hover { border-color: var(--xanh-giua); transform: translateY(-2px); }
.dish-card:active { transform: translateY(1px); }
.dish-card[aria-pressed="true"] { border-color: var(--xanh-duong); background: var(--nen-chon); }

/* Chấm trang: vùng bấm 44 px, vạch vẽ bằng ::after */
.cham-trang { display: flex; justify-content: center; margin-top: 12px; }
.cham-trang button { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; }
.cham-trang button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 4px; background: var(--vien-nhan); transform: translate(-50%, -50%); transition: width 300ms var(--em-quart), background-color 300ms var(--em-quart); }
.cham-trang button.active::after { width: 24px; background: var(--xanh-duong); }

/* ----- Khung chi tiết món ----- */
.dish-dialog {
  position: fixed; inset: 0; margin: 0; padding: clamp(24px, 5vw, 72px) 16px;
  width: 100%; height: 100dvh; max-width: none; max-height: none;
  border: 0; background: transparent; color: var(--chu); overflow: auto;
}
.dish-dialog[open] { display: flex; align-items: center; justify-content: center; }
.dish-dialog::backdrop { background: rgba(9, 28, 64, 0.45); animation: nen-vao 500ms ease both; }
.dish-dialog.returning::backdrop { animation: nen-ra 580ms ease 420ms both; }
.flying-plate { position: fixed; z-index: 2; pointer-events: none; will-change: transform; }
.flying-plate img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.3)); }
.plate-solid { position: absolute; left: 50%; top: 50%; width: 92%; height: 92%; transform: translate(-50%, -50%); border-radius: 50%; opacity: 0; background: var(--trang); }

.detail-panel {
  position: relative; width: min(680px, 100%); max-height: calc(100dvh - 48px); overflow: auto;
  display: flex; flex-direction: column; gap: 16px;
  padding: clamp(24px, 3vw, 40px); border-radius: 28px; outline: none;
  background: var(--trang); box-shadow: 0 30px 90px rgba(9, 28, 64, 0.3);
}
.detail-panel.forming { overflow: hidden; }
.detail-panel.forming > * { opacity: 0; }
.dialog-close {
  position: absolute; z-index: 2; top: 14px; right: 14px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: #f0f2ec; font-size: 26px; line-height: 1; color: var(--chu);
  transition: background-color 200ms var(--em-quart);
}
.dialog-close:hover { background: #e1e5db; }
.detail-dau { display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); padding-right: 44px; }
.detail-dau img { flex: none; width: clamp(80px, 9vw, 120px); height: clamp(80px, 9vw, 120px); border-radius: 50%; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.2)); }
.detail-dau > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.detail-kicker { font-size: 12px; }
.detail-panel h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.detail-price .gia b { font-size: 20px; }
.detail-price .gia s { font-size: var(--co-nho); }
.detail-copy { font-size: var(--co-than); color: var(--chu-phu); }
.detail-nhan { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.detail-nhan li.chay { display: flex; align-items: center; gap: 6px; background: #e3f6ec; color: #02703d; }
.detail-nhan li.chay img { width: 16px; height: 16px; }
.detail-dat { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--ke); }
.detail-dat-chu { font-size: var(--co-nho); font-weight: 600; color: var(--chu-phu); }
.detail-app { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 8px; }
.nut-app-nho {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px;
  border: 1.5px solid #e1e4dc; border-radius: 14px; color: var(--chu); text-decoration: none; font-size: var(--co-nho); font-weight: 600;
  transition: border-color 200ms var(--em-quart), color 200ms var(--em-quart);
}
.nut-app-nho:hover { border-color: var(--xanh-duong); color: var(--xanh-duong); }
.nut-app-nho img { flex: none; width: 30px; height: 30px; border-radius: 8px; }

@keyframes hien-len { from { opacity: 0; transform: translateY(8px); } }
@keyframes nen-vao { from { background: rgba(9, 28, 64, 0); } }
@keyframes nen-ra { to { background: rgba(9, 28, 64, 0); } }

/* ----- Điện thoại / máy tính bảng (< 900 px): khẩu hiệu trên bàn, Chép nhỏ dưới bàn ----- */
@media (max-width: 899px) {
  .hero-hang { flex-direction: column; }
  .khau-hieu { padding: 0; align-items: center; text-align: center; gap: 10px; margin-bottom: clamp(20px, 2.6vw, 36px); }
  .khau-hieu h1 { font-size: clamp(32px, 4vw, 56px); line-height: 1.1; }
  .khau-hieu h1 br, .khau-hieu-nut { display: none; }
  .khau-hieu-phu { font-size: 15px; }
  .khau-hieu-phu img { width: 22px; height: 22px; }
  .chep-pc { display: none; }
  .chep-dt { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; }
  .chep-dt > img { height: 72px; width: auto; transform: scaleX(-1); }
  .chep-dt .goi-y-xoay { padding: 10px 14px; border-radius: 16px; font-size: var(--co-nho); box-shadow: 0 6px 20px rgba(19, 35, 63, 0.1); }
  .chep-dt .goi-y-xoay img { width: 24px; height: 24px; }
}
