/* Trang web riêng của quán /s/<quán>: ảnh quán lớn, tên quán thật to, thông tin liên hệ, thực đơn và đặt trước */
.small { font-size: 13px; }
.center { text-align: center; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

/* thanh trên cùng */
.bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 10px 20px; background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.bar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.bar-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-logo { width: 34px; height: 34px; flex: none; border-radius: 23%; object-fit: cover; }
.bar-links { display: flex; gap: 4px; margin-left: auto; }
.bar-links a { padding: 8px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.bar-links a:hover { background: var(--tone); }
.bar-call { min-height: 40px; padding: 0 14px; gap: 8px; }
.bar-call .ic { width: 18px; height: 18px; }

/* phần đầu: ảnh quán + tên quán */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px;
}
.hero-photo {
  position: relative; order: 2; aspect-ratio: 5 / 4; border-radius: 28px; background: var(--brand-soft) center / cover no-repeat;
}
.hero-photo.no-cover { display: grid; place-items: center; background: var(--brand); }
.hero-photo.no-cover .logo { position: static; width: 46%; height: auto; aspect-ratio: 1; border: 0; }
.logo {
  position: absolute; left: 22px; bottom: -26px; width: 92px; height: 92px; border-radius: 23%; object-fit: cover;
  background: #fff; border: 5px solid var(--bg); box-shadow: none;
}
.hero-text { order: 1; min-width: 0; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 16px 0 0; font-size: 16px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #147a41; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.status.closed { color: var(--danger); }
.hero h1 { text-wrap: balance; margin: 0; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.06; letter-spacing: -.035em; overflow-wrap: anywhere; text-shadow: none; }
.intro { margin: 18px 0 0; max-width: 34em; font-size: 17.5px; line-height: 1.55; white-space: pre-line; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cta .btn { padding: 0 22px; }
.cta .btn .ic { width: 19px; height: 19px; }

/* địa chỉ, điện thoại, giờ mở cửa: một tấm nền đá, chữ lớn */
.facts {
  list-style: none; display: grid; grid-template-columns: 1.4fr .9fr .9fr 1.6fr; gap: 20px 28px;
  max-width: 1140px; margin: 8px auto 0; padding: 26px 28px 28px; border-radius: 24px; background: var(--tone);
}
.facts li { min-width: 0; }
.facts .label { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.facts a, .facts li span { display: block; color: var(--text); font-size: 18px; font-weight: 600; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; white-space: pre-line; }
.facts a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
#promoBanners { margin-top: 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* đơn đặt trước của khách trên máy này */
.my-orders { margin-top: 36px; }
.my-orders > h2 { font-size: 24px; margin-bottom: 12px; }
.my-order { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; margin-bottom: 8px; border-radius: 16px; background: var(--tone); border: 0; }
.my-order-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cancel-reason { color: var(--danger); }

/* thực đơn */
.menu-sec { margin-top: 56px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -.03em; line-height: 1; }
.preorder-hint { margin: 0; color: var(--muted); font-size: 15px; }
.preorder-hint b { color: var(--text); }
.cats { top: 60px; margin: 0 -20px; padding: 10px 20px; border-bottom: 0; background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.cat-title { scroll-margin-top: 130px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; margin-top: 12px; }
.grid .dish { flex-direction: column; gap: 12px; padding: 0; border: 0; }
.grid .dish:not(.selectable) { cursor: default; }
.grid .dish-img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 20px; }
.grid .dish-img .ic { width: 40px; height: 40px; }
.grid .dish-qty-badge { top: 10px; left: 10px; min-width: 30px; height: 30px; border-radius: 10px; font-size: 15px; }
.grid .dish-name { font-size: 17px; }
.grid .dish-price { font-size: 19px; }

/* dải cuối: tới quán thì quét mã trên bàn */
.scan-band {
  display: flex; align-items: center; gap: 22px; margin-top: 64px; padding: 28px; border-radius: 24px; background: var(--text); color: #fff;
}
.scan-mark { display: grid; place-items: center; flex: none; width: 76px; height: 76px; border-radius: 23%; background: var(--brand-btn); color: var(--on-brand); }
.scan-mark .ic { width: 38px; height: 38px; }
.scan-band h2 { font-size: 26px; }
.scan-band p { margin: 6px 0 0; color: rgba(255, 255, 255, .72); line-height: 1.5; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; max-width: 1180px; margin: 0 auto;
  padding: 32px 20px 40px; color: var(--muted); font-size: 13.5px; text-align: center;
}
.foot b { color: var(--text); }
.foot a { color: var(--muted); }
body.has-cart .foot { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

.done-box { text-align: center; max-width: 380px; }
.done-box h3 { padding-right: 0 !important; font-size: 24px; margin-bottom: 8px; }
.done-box .btn { margin-top: 18px; }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 64px; }
  .bar { padding: 8px 16px; gap: 10px; }
  .bar-links { display: none; }
  .bar-call { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 0; padding: 4px 12px 28px; }
  .hero-photo { order: 1; aspect-ratio: 4 / 3; border-radius: 22px; }
  .logo { left: 14px; bottom: -30px; width: 80px; height: 80px; border-width: 4px; }
  .hero-text { order: 2; padding: 0 4px; }
  .hero h1 { margin-top: 46px; font-size: clamp(34px, 10vw, 44px); }
  .hero-photo.no-cover + .hero-text h1 { margin-top: 20px; }
  .hero-meta { margin-top: 10px; font-size: 15px; }
  .intro { font-size: 16px; margin-top: 12px; }
  .cta { margin-top: 20px; }
  .cta .btn { flex: 1 1 140px; }
  .facts { margin: 0 12px; grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: 20px; border-radius: 22px; }
  .facts #addressRow, .facts #fbRow { grid-column: 1 / -1; }
  .facts a, .facts li span { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .menu-sec { margin-top: 64px; }
  .cats { top: 56px; margin: 0 -16px; padding: 10px 16px; }
  /* điện thoại: món xếp thành hàng như thực đơn tại bàn */
  .grid { display: block; margin-top: 0; }
  .grid .dish { flex-direction: row; gap: 14px; padding: 10px 0; }
  .grid .dish-img { width: 96px; height: 96px; aspect-ratio: auto; border-radius: 23%; }
  .grid .dish-qty-badge { top: 6px; left: 6px; min-width: 26px; height: 26px; font-size: 13.5px; border-radius: 9px; }
  .grid .dish-name { font-size: 16px; }
  .grid .dish-price { font-size: 17px; }
  .scan-band { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; margin-top: 44px; }
  .scan-band h2 { font-size: 23px; }
}

/* khung xem trước trong trang cài đặt: không hiện thanh cuộn của máy tính */
html.preview { scrollbar-width: none; }
html.preview::-webkit-scrollbar { display: none; }
/* màn hình rất hẹp (khung xem trước 320px, điện thoại nhỏ): nút gọi quán chỉ còn icon */
@media (max-width: 360px) {
  .bar-call { width: 40px; padding: 0; justify-content: center; }
  .bar-call span:last-child { display: none; }
  .hero h1 { font-size: 32px; }
}

/* xem trước trong khung điện thoại (trang quản lý): hiệu ứng mờ của thanh trên tràn ra hai góc bo của khung, nên dùng nền trắng đặc */
html.preview .bar { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
