:root {
  --bg: #f5f0e8;
  --bg2: #ede8de;
  --card: #fdfaf5;
  --primary: #7b2d2d;
  --primary-light: #a33d3d;
  --gold: #b8963e;
  --gold-light: #d4af6a;
  --text: #1e1610;
  --muted: #7a6e62;
  --border: #d9cfc0;
  --border-dark: #b8a898;
  --accent: #f0e8d8;
  --radius: 14px;
  --shadow: 0 2px 16px rgba(30,22,16,0.09);
  --shadow-lg: 0 8px 32px rgba(30,22,16,0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(180,160,130,0.08) 39px, rgba(180,160,130,0.08) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(180,160,130,0.08) 39px, rgba(180,160,130,0.08) 40px);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 120px;
}

/* ── 헤더 ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px 16px;
  background: var(--text);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--gold);
}

.header-left { display: flex; flex-direction: column; gap: 6px; }

/* ── 로고 ── */
.logo-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

.logo-deco {
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.25em;
  margin-bottom: 2px;
}

.store-name {
  font-family: 'Nanum Myeongjo', 'Playfair Display', serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1;
}

.logo-sub {
  font-family: 'Playfair Display', serif;
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  color: var(--gold-light);
  margin-top: 3px;
}

.table-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}

.status-badge.closed { color: #f87171; background: rgba(248,113,113,0.15); }
.status-badge.open   { color: #86efac; background: rgba(134,239,172,0.15); }

/* ── 헤더 오른쪽 ── */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* ── 직원 호출 버튼 ── */
.staff-call-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-family: inherit;
}

.staff-call-btn:hover { background: rgba(184,150,62,0.12); color: var(--gold); }

/* ── 언어 버튼 ── */
.lang-btns { display: flex; gap: 6px; }

.lang-btn {
  width: 40px; height: 40px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: all 0.15s;
  letter-spacing: 0.03em;
}

.lang-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(184,150,62,0.12);
}

.lang-btn:hover:not(.active) { border-color: rgba(255,255,255,0.4); color: rgba(255,255,255,0.8); }

/* ── 구분선 배너 ── */
.hero-banner {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-banner-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-dark), transparent);
}

.hero-banner-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  white-space: nowrap;
}

/* ── 카테고리 탭 ── */
.category-nav {
  display: flex;
  gap: 0;
  padding: 0 32px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.cat-btn {
  padding: 14px 24px;
  border-radius: 0;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  letter-spacing: 0.04em;
  font-family: 'Nanum Myeongjo', serif;
}

.cat-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(123,45,45,0.04);
}

.cat-btn:hover:not(.active) { color: var(--text); background: rgba(0,0,0,0.03); }

/* ── 메뉴 그리드 ── */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 32px;
}

@media (max-width: 700px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); padding: 16px; gap: 14px; }
  .header { padding: 16px 16px 12px; }
  .category-nav { padding: 0 16px; }
  .hero-banner { padding: 10px 16px; }
}

/* ── 메뉴 카드 ── */
.menu-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}

.menu-card:active { transform: scale(0.97); }

.menu-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  background: var(--accent);
}

.menu-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
  filter: sepia(8%) brightness(0.97);
}

.menu-card:hover .menu-card-img-wrap img { transform: scale(1.07); }

/* 이미지 하단 그라디언트 */
.menu-card-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(20,10,5,0.3), transparent);
  pointer-events: none;
}

.menu-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.menu-card-name {
  font-family: 'Nanum Myeongjo', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.menu-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-card-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.menu-card-time {
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* 수량 뱃지 */
.card-qty-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--primary);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(123,45,45,0.4);
  z-index: 2;
}

/* ── 장바구니 FAB ── */
.cart-fab {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 14px 30px;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(123,45,45,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 200;
  letter-spacing: 0.03em;
  font-family: 'Nanum Myeongjo', serif;
}

.cart-fab:hover { transform: translateX(-50%) translateY(-2px); box-shadow: 0 8px 28px rgba(123,45,45,0.55); }

.cart-fab-icon { font-size: 1.1rem; }
.cart-fab-count {
  background: var(--gold);
  color: white;
  font-size: 0.78rem; font-weight: 800;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── 모달 ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,8,3,0.6);
  z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
}

.modal-backdrop.center { align-items: center; }

.modal {
  background: var(--card);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 560px;
  padding: 24px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: 'Nanum Myeongjo', serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: var(--accent); border: 1px solid var(--border); border-radius: 4px;
  width: 32px; height: 32px;
  font-size: 0.85rem; cursor: pointer; color: var(--muted);
}

/* 장바구니 항목 */
.cart-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 54px; height: 54px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  filter: sepia(8%);
}

.cart-item-info { flex: 1; }
.cart-item-name {
  font-family: 'Nanum Myeongjo', serif;
  font-size: 0.95rem; font-weight: 700;
}
.cart-item-price {
  font-family: 'Playfair Display', serif;
  font-size: 0.88rem; color: var(--primary); font-weight: 700; margin-top: 3px;
}

.cart-item-qty {
  display: flex; align-items: center; gap: 8px;
}

.qty-btn {
  width: 30px; height: 30px;
  border-radius: 4px; border: 1px solid var(--border);
  background: var(--accent); font-size: 1.1rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text);
}

.qty-btn:hover { background: var(--bg2); border-color: var(--border-dark); }
.qty-val { font-size: 1rem; font-weight: 700; min-width: 20px; text-align: center;
  font-family: 'Playfair Display', serif; }

.cart-footer { margin-top: 18px; }

.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; padding: 14px 0;
  border-top: 2px solid var(--border-dark);
  font-family: 'Nanum Myeongjo', serif;
  font-weight: 700;
}

.cart-total-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 700; color: var(--primary);
}

.btn-order {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: white;
  border: none; border-radius: 6px;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Nanum Myeongjo', serif;
  letter-spacing: 0.05em;
}

.btn-order:hover { background: var(--primary-light); }

/* 주문완료 / 직원호출 완료 모달 */
.done-modal {
  border-radius: var(--radius);
  text-align: center;
  max-width: 340px;
  margin: auto;
  padding: 40px 28px;
  border-top: 3px solid var(--gold);
}

.done-icon { font-size: 3rem; margin-bottom: 16px; }
.done-modal h2 {
  font-family: 'Nanum Myeongjo', serif;
  font-size: 1.3rem; font-weight: 800; margin-bottom: 8px;
}
.done-modal p { color: var(--muted); margin-bottom: 24px; font-size: 0.9rem; line-height: 1.6; }

.done-number {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: var(--accent); border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 20px; margin-bottom: 24px;
  font-size: 0.85rem; color: var(--muted);
}

.done-number strong {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 800; color: var(--primary);
}

/* ── 직원 호출 모달 ── */
.staff-modal {
  border-radius: var(--radius) var(--radius) 0 0;
  max-width: 560px;
  width: 100%;
}

.staff-desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.staff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.staff-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--accent);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.staff-item:hover {
  background: #fdf3e3;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(184,150,62,0.2);
}

.staff-item:active { transform: scale(0.96); }
.staff-item-icon { font-size: 2rem; line-height: 1; }
.staff-item-label {
  font-family: 'Nanum Myeongjo', serif;
  font-size: 1rem; font-weight: 700; color: var(--text);
}

/* ── 영업종료 팝업 ── */
.closed-modal strong {
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}

/* 관리자 버튼 */
.admin-btn {
  position: fixed; bottom: 10px; right: 10px;
  background: rgba(30,22,16,0.08); color: var(--muted);
  border: none; border-radius: 4px; padding: 6px 12px;
  font-size: 0.72rem; cursor: pointer; z-index: 100;
  font-family: inherit;
}

.admin-btn:hover { background: rgba(30,22,16,0.15); color: var(--text); }

.hidden { display: none !important; }
