/* ==============================================================================
 * ROVA CAFE 全站設計系統｜Shadcn UI & Editorial Luxury
 * 零號雲工坊｜Number Zero Cloud Workshop
 * ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Noto+Serif+TC:wght@400;600;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  /* Shadcn UI 核心規範色票體系 (ROVA CAFE 精品深焙咖啡暖調) */
  --background: #FAF8F5;          /* 暖米白 Warm Alabaster */
  --foreground: #2D231C;          /* 深焙極濃咖啡 Deep Roast Espresso */
  --card: #FFFFFF;                /* 純白卡片襯底 */
  --card-foreground: #2D231C;
  --popover: #FFFFFF;
  --popover-foreground: #2D231C;
  
  /* 按鈕與主色 Primary */
  --primary: #2D231C;              /* 經典深焙極濃咖啡 (Shadcn High-Contrast) */
  --primary-hover: #1A1410;        /* 懸停加深 */
  --primary-foreground: #FFFFFF;
  
  /* 次要色 Secondary */
  --secondary: #F3EFEA;            /* 淺焙米灰 */
  --secondary-hover: #E7E1D8;
  --secondary-foreground: #2D231C;
  
  /* 弱化色 Muted */
  --muted: #F3EFEA;
  --muted-foreground: #78716C;     /* 溫和說明文字 */
  
  /* 強調色 Accent */
  --accent: #EFE9E0;
  --accent-foreground: #2D231C;
  
  /* 破壞性/警示 Destructive */
  --destructive: #DC2626;          /* 標準深紅 */
  --destructive-hover: #B91C1C;
  --destructive-foreground: #FFFFFF;
  
  /* 邊框與輸入框 Border & Input */
  --border: #E5DFD7;               /* 精緻微邊框 */
  --input: #E5DFD7;
  --ring: #2D231C;                 /* 焦點光暈 */
  --radius: 0.5rem;                /* 8px 標準 Shadcn 圓角 */

  /* 字體系統 Typography */
  --font-serif: "Playfair Display", "Noto Serif TC", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* 陰影體系 Elevation */
  --shadow-xs: 0 1px 2px 0 rgba(45, 35, 28, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(45, 35, 28, 0.08), 0 1px 2px -1px rgba(45, 35, 28, 0.08);
  --shadow-md: 0 4px 12px -2px rgba(45, 35, 28, 0.08), 0 2px 6px -1px rgba(45, 35, 28, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(45, 35, 28, 0.12), 0 4px 12px -2px rgba(45, 35, 28, 0.06);
}

/* 全域重置與基礎樣式 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.w-3 { width: 0.75rem !important; }
.h-3 { height: 0.75rem !important; }
.w-3\.5 { width: 0.875rem !important; }
.h-3\.5 { height: 0.875rem !important; }
.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.w-5 { width: 1.25rem !important; }
.h-5 { height: 1.25rem !important; }
.w-6 { width: 1.5rem !important; }
.h-6 { height: 1.5rem !important; }

h1, h2, h3, .font-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==============================================================================
 * 1. Shadcn UI 按鈕標準組件 (Buttons - 高對比清晰度重構)
 * ============================================================================== */
.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 0.875rem;          /* 14px */
  font-weight: 600;             /* 加粗清晰，避免細字虛化 */
  line-height: 1;
  min-height: 2.5rem;           /* 40px 標準高度 */
  height: 2.5rem;
  padding: 0 1.25rem;           /* 20px 水平內距，外觀更飽滿 */
  border-radius: var(--radius); /* 8px 圓角 */
  border: 1.5px solid transparent;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* 按鈕變體 Variants */
.btn-primary, .btn-default {
  background: linear-gradient(180deg, #3A2F27 0%, #241A13 100%);
  color: #FAF8F5 !important;
  border-color: #1F1610;
  box-shadow: 0 4px 12px -2px rgba(45, 35, 28, 0.28), 0 1px 3px rgba(45, 35, 28, 0.12);
}

.btn-primary:hover, .btn-default:hover {
  background: linear-gradient(180deg, #4A3C32 0%, #2E221A 100%);
  border-color: #2D231C;
  color: #FFFFFF !important;
  box-shadow: 0 6px 18px -2px rgba(45, 35, 28, 0.38), 0 2px 6px rgba(45, 35, 28, 0.16);
  transform: translateY(-1.5px);
}

.btn-secondary {
  background-color: #EFE7DC !important;
  color: #221812 !important;
  border: 1.5px solid #7D6652 !important;
  box-shadow: 0 1px 3px rgba(45, 35, 28, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  font-weight: 700 !important;
}

.btn-secondary:hover {
  background-color: #382B21 !important;
  border-color: #221812 !important;
  color: #FAF8F5 !important;
  box-shadow: 0 4px 12px rgba(45, 35, 28, 0.18) !important;
  transform: translateY(-1.5px);
}

.btn-outline {
  background-color: #F6F1EB !important;
  border: 1.5px solid #8C7462 !important;
  color: #2D231C !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(45, 35, 28, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.btn-outline:hover {
  background-color: #2D231C !important;
  border-color: #1F1915 !important;
  color: #FAF8F5 !important;
  box-shadow: 0 4px 14px rgba(45, 35, 28, 0.2) !important;
  transform: translateY(-1.5px);
}

.btn-ghost {
  background-color: transparent;
  color: #2D231C !important;
  border-color: transparent;
  font-weight: 600;
}

.btn-ghost:hover {
  background-color: #F0EAE1;
  color: #1A1410 !important;
}

.btn-destructive {
  background: linear-gradient(180deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF !important;
  border-color: #991B1B;
  box-shadow: 0 4px 12px -2px rgba(220, 38, 38, 0.35);
  font-weight: 600;
}

.btn-destructive:hover {
  background: linear-gradient(180deg, #EF4444 0%, #C81E1E 100%);
  border-color: #B91C1C;
  box-shadow: 0 6px 16px -2px rgba(220, 38, 38, 0.45);
  transform: translateY(-1.5px);
}

.btn-line {
  background: linear-gradient(180deg, #06C755 0%, #05A848 100%);
  color: #FFFFFF !important;
  border-color: #048C3C;
  font-weight: 600;
  box-shadow: 0 4px 12px -2px rgba(6, 199, 85, 0.32);
}

.btn-line:hover {
  background: linear-gradient(180deg, #0AD65E 0%, #06C755 100%);
  border-color: #05A848;
  color: #FFFFFF !important;
  box-shadow: 0 6px 18px -2px rgba(6, 199, 85, 0.45);
  transform: translateY(-1.5px);
}

.btn-link {
  background-color: transparent;
  color: var(--primary) !important;
  border-color: transparent;
  padding: 0;
  min-height: auto;
  height: auto;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-link:hover {
  color: var(--primary-hover) !important;
}

/* 按鈕尺寸 Sizes */
.btn-lg {
  min-height: 2.875rem;          /* 46px 飽滿大尺寸 */
  height: 2.875rem;
  padding: 0 1.75rem;
  font-size: 0.9375rem;          /* 15px */
  border-radius: 0.625rem;       /* 10px 微圓角 */
}

.btn-sm {
  min-height: 2.25rem;           /* 36px 舒適尺寸 */
  height: 2.25rem;
  padding: 0 0.875rem;
  font-size: 0.8125rem;          /* 13px */
  border-radius: 0.375rem;
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

.btn-icon-sm {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}

.btn-block, .w-full {
  width: 100%;
}

/* ==============================================================================
 * 2. Shadcn UI 輸入框組件 (Input / Textarea)
 * ============================================================================== */
.input, .form-input, .admin-input, 
input[type="text"], input[type="email"], input[type="tel"], 
input[type="password"], input[type="number"], input[type="date"], 
input[type="time"], input[type="month"], input[type="search"] {
  display: flex;
  width: 100%;
  min-height: 2.5rem;           /* 40px 標準高度，與按鈕完全一致 */
  height: 2.5rem;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;          /* 14px */
  line-height: 1.5;
  color: var(--foreground);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius); /* 8px 圓角 */
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  outline: none;
}

.input:focus, .form-input:focus, .admin-input:focus, 
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, 
input[type="password"]:focus, input[type="number"]:focus, input[type="date"]:focus, 
input[type="time"]:focus, input[type="month"]:focus, input[type="search"]:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring), 0 0 0 3px rgba(45, 35, 28, 0.12);
  background-color: #FFFFFF;
}

.input::placeholder, .form-input::placeholder, .admin-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.75;
}

.input:disabled, .form-input:disabled, .admin-input:disabled {
  background-color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* 緊湊型輸入框 (Dense/Sm) */
.input-sm, .form-input-sm, .admin-input-sm {
  min-height: 2.125rem;
  height: 2.125rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}

textarea, .form-textarea, .admin-textarea {
  display: flex;
  width: 100%;
  min-height: 5rem;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--foreground);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  resize: vertical;
}

textarea:focus, .form-textarea:focus, .admin-textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring), 0 0 0 3px rgba(45, 35, 28, 0.12);
}

/* ==============================================================================
 * 3. Shadcn UI 下拉選單組件 (Select - 統一規格與自訂極簡 Chevron 箭頭)
 * ============================================================================== */
select, .select, .form-select, .admin-select {
  display: flex;
  width: 100%;
  min-height: 2.5rem;           /* 40px 標準高度，與按鈕/輸入框完全一致 */
  height: 2.5rem;
  box-sizing: border-box;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;          /* 14px */
  line-height: 1.5;
  color: var(--foreground);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2378716C' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

select:focus, .select:focus, .form-select:focus, .admin-select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring), 0 0 0 3px rgba(45, 35, 28, 0.12);
}

.select-sm, .form-select-sm, .admin-select-sm {
  min-height: 2.125rem;
  height: 2.125rem;
  padding: 0.25rem 2rem 0.25rem 0.625rem;
  font-size: 0.8125rem;
  background-size: 0.875rem 0.875rem;
  background-position: right 0.5rem center;
}

/* ==============================================================================
 * 4. Shadcn UI 核取方塊與單選 (Checkbox & Radio)
 * ============================================================================== */
input[type="checkbox"], input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background-color: var(--card);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem;
}

input[type="radio"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.5rem;
}

input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}

/* ==============================================================================
 * 5. Shadcn UI 狀態徽章 (Badges)
 * ============================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-default, .badge-primary { 
  background-color: var(--primary); 
  color: #FFFFFF; 
}
.badge-secondary, .badge-neutral { 
  background-color: var(--secondary); 
  color: var(--secondary-foreground); 
  border-color: var(--border); 
}
.badge-outline { 
  background-color: transparent; 
  border-color: var(--border); 
  color: var(--foreground); 
}
.badge-success, .badge-confirmed { 
  background-color: rgba(16, 185, 129, 0.1); 
  color: #059669; 
  border-color: rgba(16, 185, 129, 0.25); 
}
.badge-warning, .badge-pending { 
  background-color: rgba(245, 158, 11, 0.1); 
  color: #D97706; 
  border-color: rgba(245, 158, 11, 0.25); 
}
.badge-destructive, .badge-cancelled { 
  background-color: rgba(220, 38, 38, 0.1); 
  color: #DC2626; 
  border-color: rgba(220, 38, 38, 0.25); 
}
.badge-info, .badge-waitlist { 
  background-color: rgba(37, 99, 235, 0.1); 
  color: #2563EB; 
  border-color: rgba(37, 99, 235, 0.25); 
}

/* ==============================================================================
 * 6. Shadcn UI 卡片與容器 (Cards)
 * ============================================================================== */
.card, .admin-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xs);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover, .admin-card:hover {
  box-shadow: var(--shadow-sm);
}

.card-header {
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}

/* ==============================================================================
 * 7. Shadcn UI 彈窗 (Dialog / Modal)
 * ============================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(20, 16, 14, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-box {
  background: #FFFFFF;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  width: 100%;
  max-width: min(52rem, 100%);
  padding: 1.75rem 2rem;
  animation: modalIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.modal-box-lg { max-width: min(60rem, 100%); }
.modal-box-xl { max-width: min(68rem, 100%); }
.modal-box-md { max-width: min(46rem, 100%); }
.modal-box-sm { max-width: min(34rem, 100%); }

.modal-box pre,
.modal-box code {
  max-width: 100%;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==============================================================================
 * 8. 導覽列與前台專用元件
 * ============================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
  transition: all 0.2s ease;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand-logo {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-nav-wrapper {
  display: flex;
  align-items: center;
  margin-left: auto;
}

/* 手機版精品漢堡按鈕 (預設桌面端隱藏) */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 105;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover {
  background: rgba(45, 35, 28, 0.06);
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

/* 漢堡按鈕展開轉換為關閉 X 動畫 */
.mobile-menu-btn.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* 導覽列暗色磨砂遮罩 (手機端選單展開時啟用) */
.navbar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(45, 35, 28, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.navbar-backdrop.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* 前台導覽列手機端響應式斷點 (<= 768px) */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100vw;
    background-color: #FAF8F5;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 32px -4px rgba(45, 35, 28, 0.18);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.25rem 1.75rem;
    gap: 0.625rem;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 99;
  }

  .nav-links.is-open {
    display: flex;
    animation: rovaNavSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links .nav-link {
    display: block;
    padding: 0.8125rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--foreground);
    border-radius: 8px;
    background-color: transparent;
    transition: all 0.15s ease;
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link:active {
    background-color: #F1EAE0;
    color: var(--primary);
  }

  .nav-links .btn {
    width: 100%;
    justify-content: center;
    padding: 0.8125rem 1rem;
    font-size: 0.9375rem;
    border-radius: 8px;
  }
}

@keyframes rovaNavSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer {
  margin-top: auto;
  background-color: #1F1915;
  color: #DBCBB9;
  border-top: 1px solid #362D26;
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-title {
  font-family: var(--font-serif);
  color: #FAF8F5;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-text, .footer-link {
  font-size: 0.875rem;
  color: #B8A898;
  line-height: 1.7;
}

.footer-link:hover {
  color: #FAF8F5;
}

.footer-bottom {
  border-top: 1px solid #362D26;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #8C7B6D;
}

/* 預約流程指示器 Stepper */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.step-item.active {
  color: var(--primary);
  font-weight: 600;
}

.step-circle {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background-color: var(--card);
  font-size: 0.75rem;
  font-weight: 700;
}

.step-item.active .step-circle {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* 時段選擇器網格 Slot Picker */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.slot-btn {
  height: 2.625rem;
  padding: 0 0.5rem;
  border: 1.5px solid #D5C6B6;
  background-color: #FFFFFF;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: #2D231C;
  box-shadow: 0 1px 2px rgba(45, 35, 28, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.slot-btn:hover:not(:disabled) {
  border-color: #2D231C;
  background-color: #F8F5F1;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(45, 35, 28, 0.1);
}

.slot-btn.selected {
  background: linear-gradient(180deg, #3A2F27 0%, #241A13 100%);
  color: #FAF8F5;
  border-color: #1F1610;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(45, 35, 28, 0.28);
}

.slot-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background-color: #F3EFEA;
  border-color: #E2DAD0;
  color: #9C8F82;
}

/* 實用工具類別 */
.hidden { display: none !important; }
.block { display: block !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ==============================================================================
 * 高奢美學自訂 Popover 日期選擇器 (Rova Custom Popover DatePicker)
 * ============================================================================== */
.rova-datepicker-wrapper {
  position: relative !important;
  display: inline-flex !important;
  width: 100% !important;
  align-items: center !important;
}

.rova-date-input {
  padding-right: 2.5rem !important;
  cursor: pointer !important;
  background-color: #FFFFFF !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 600 !important;
  color: #2D231C !important;
}

.rova-date-input:focus, .rova-datepicker-wrapper.is-open .rova-date-input {
  border-color: #2D231C !important;
  box-shadow: 0 0 0 1px #2D231C, 0 0 0 3px rgba(45, 35, 28, 0.14) !important;
}

.rova-datepicker-icon-btn {
  position: absolute !important;
  right: 0.75rem !important;
  color: #8C7462 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  transition: color 0.15s ease !important;
}

.rova-datepicker-wrapper:hover .rova-datepicker-icon-btn {
  color: #2D231C !important;
}

.rova-datepicker-popover {
  position: absolute !important;
  z-index: 99999 !important;
  width: 296px !important;
  background: #FFFFFF !important;
  border-radius: 0.75rem !important;
  border: 1.5px solid #DBCBB9 !important;
  box-shadow: 0 16px 36px -4px rgba(45, 35, 28, 0.22), 0 6px 16px -2px rgba(45, 35, 28, 0.1) !important;
  padding: 0.875rem !important;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif !important;
  user-select: none !important;
  animation: dpPopIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes dpPopIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.rova-dp-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 0.75rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid #F1EAE0 !important;
}

.rova-dp-title {
  display: flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  color: #2D231C !important;
  letter-spacing: 0.02em !important;
}

.rova-dp-nav-btn {
  width: 1.75rem !important;
  height: 1.75rem !important;
  border-radius: 0.375rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #5C4F44 !important;
  border: 1px solid #E5DFD7 !important;
  background: #FAF8F5 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.rova-dp-nav-btn:hover {
  background: #F1EAE0 !important;
  color: #1F1915 !important;
  border-color: #9D8876 !important;
}

.rova-dp-nav-btn svg {
  width: 0.875rem !important;
  height: 0.875rem !important;
}

.rova-dp-weekdays {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  text-align: center !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #8C7462 !important;
  margin-bottom: 0.375rem !important;
}

.rova-dp-weekday {
  padding: 0.25rem 0 !important;
}

.rova-dp-days-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 0.25rem !important;
}

.rova-dp-day {
  width: 2rem !important;
  height: 2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.375rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #2D231C !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.rova-dp-day:hover:not(.disabled):not(.rova-dp-other-month) {
  background-color: #F1EAE0 !important;
  color: #1A1410 !important;
}

.rova-dp-day.today:not(.selected) {
  border: 1.5px solid #8C7462 !important;
  font-weight: 700 !important;
}

.rova-dp-day.selected {
  background: #2D231C !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(45, 35, 28, 0.3) !important;
}

.rova-dp-day.disabled {
  color: #D3C7BC !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.4 !important;
}

.rova-dp-day.rova-dp-other-month {
  color: #D3C7BC !important;
  opacity: 0.35 !important;
  pointer-events: none !important;
}

.rova-dp-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-top: 1px solid #F1EAE0 !important;
  margin-top: 0.625rem !important;
  padding-top: 0.5rem !important;
}

.rova-dp-action-btn {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #8C7462 !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 0.25rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  background: transparent !important;
  border: none !important;
}

.rova-dp-action-btn:hover {
  color: #2D231C !important;
  background: #F1EAE0 !important;
}

.rova-dp-action-btn.text-muted {
  color: #A8988A !important;
}

/* ==========================================================================
   預約席位方案單選卡片 (高奢質感 & 手機端全寬自適應佈局)
   ========================================================================== */
.booking-items-grid {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.booking-item-card {
  position: relative;
  background: #FFFFFF;
  border: 1.5px solid #E6DCCD;
  border-radius: 14px;
  padding: 1.125rem 1.25rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 6px rgba(45, 35, 28, 0.03);
}

.booking-item-card:hover {
  border-color: #B89E7C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 35, 28, 0.07);
}

.booking-item-card.item-selected {
  border-color: #8A6D3B;
  background: linear-gradient(135deg, rgba(254, 251, 246, 0.98) 0%, rgba(248, 242, 233, 0.95) 100%);
  box-shadow: 0 6px 18px rgba(138, 109, 59, 0.12), 0 0 0 1px rgba(138, 109, 59, 0.25);
  transform: translateY(-1px);
}

.booking-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.booking-item-title-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.booking-item-radio-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.booking-item-radio {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.booking-item-radio-custom {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #C4B097;
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.booking-item-card.item-selected .booking-item-radio-custom {
  border-color: #8A6D3B;
  background: #8A6D3B;
  box-shadow: 0 0 0 3px rgba(138, 109, 59, 0.2);
}

.booking-item-card.item-selected .booking-item-radio-custom::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFFFFF;
  display: block;
}

.booking-item-name-block {
  flex: 1;
  min-width: 0;
}

.booking-item-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.booking-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2D231C;
  line-height: 1.4;
  margin: 0;
  cursor: pointer;
  word-break: break-word;
}

.booking-item-default-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #8A6D3B;
  background: #FCF8E3;
  border: 1px solid #FAEBCC;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  line-height: 1.3;
  flex-shrink: 0;
}

.booking-item-price-tag {
  flex-shrink: 0;
  text-align: right;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  line-height: 1.3;
  transition: all 0.2s ease;
}

.booking-item-price-tag.price-free {
  background: #F4EFE6;
  color: #5C4328;
  border: 1px solid #DECFC0;
  font-size: 0.8125rem;
  font-weight: 700;
}

.booking-item-price-tag.price-paid {
  background: rgba(107, 52, 16, 0.08);
  color: #6B3410;
  border: 1px solid rgba(107, 52, 16, 0.2);
  font-size: 0.9375rem;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* 方案詳細介紹：100% 全寬呈現，徹底解放手機端閱讀空間 */
.booking-item-desc-card {
  width: 100%;
  background: rgba(245, 240, 232, 0.65);
  border: 1px solid rgba(222, 210, 194, 0.7);
  border-left: 3.5px solid #8A6D3B;
  border-radius: 6px 10px 10px 6px;
  padding: 0.6875rem 0.875rem;
  margin-top: 0.25rem;
  box-sizing: border-box;
}

.booking-item-desc-text {
  font-size: 0.84rem;
  line-height: 1.65;
  color: #4D3D32;
  margin: 0;
  word-break: break-word;
  letter-spacing: 0.015em;
}

.booking-item-desc-icon {
  margin-right: 0.3rem;
  opacity: 0.85;
}

/* 底部操作與份數選擇 */
.booking-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #E0D4C5;
  margin-top: 0.625rem;
  animation: fadeInFooter 0.2s ease-in-out;
}

@keyframes fadeInFooter {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.booking-item-footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.booking-item-qty-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2D231C;
}

.booking-item-calc-hint {
  font-size: 0.7188rem;
  color: #8C7561;
}

.booking-item-qty-counter {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #D5C5B3;
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.booking-item-qty-counter .btn-qty-minus,
.booking-item-qty-counter .btn-qty-plus {
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: #2D231C;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.booking-item-qty-counter .btn-qty-minus:hover,
.booking-item-qty-counter .btn-qty-plus:hover {
  background-color: #F1EAE0;
  color: #6B3410;
}

.booking-item-qty-counter .btn-qty-minus:active,
.booking-item-qty-counter .btn-qty-plus:active {
  background-color: #E5DFD7;
}

.booking-item-qty-counter .qty-display {
  min-width: 2rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #2D231C;
  border-left: 1px solid #F0E8DE;
  border-right: 1px solid #F0E8DE;
  line-height: 2rem;
}

/* 手機版窄螢幕專屬優化 (寬度小於 640px) */
@media (max-width: 640px) {
  .booking-item-card {
    padding: 0.95rem 1rem;
    border-radius: 12px;
  }

  .booking-item-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .booking-item-price-tag {
    align-self: flex-start;
    margin-left: 2rem; /* 與標題文字對齊，避開左側 Radio */
    font-size: 0.8125rem;
    padding: 0.25rem 0.55rem;
  }

  .booking-item-title {
    font-size: 0.95rem;
  }

  .booking-item-desc-card {
    padding: 0.625rem 0.75rem;
  }

  .booking-item-desc-text {
    font-size: 0.8125rem;
    line-height: 1.58;
  }

  .booking-item-footer {
    padding-top: 0.625rem;
  }
}

