/* ===== RESET & ROOT ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --accent: #D4621A;
  --accent-light: #F5EDE6;
  --accent-hover: #B8511A;

  --bg: #FAF7F4;
  --bg2: #FFFFFF;
  --bg3: #F3EEE9;

  --text: #1C1917;
  --text2: #6B5F57;
  --text3: #A89B92;

  --border: #E8E0D8;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 4px rgba(100,60,20,0.08);
  --shadow-md: 0 4px 16px rgba(100,60,20,0.1);
  --shadow-lg: 0 12px 40px rgba(100,60,20,0.14);

  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== ANIMATED BACKGROUND ===== */
.animated-bg {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1; pointer-events: none; overflow: hidden;
}
.gradient-orb {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.25;
  animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 { width: 700px; height: 700px; background: radial-gradient(circle, #FBBF83, #F5A55B); top: -300px; left: -300px; }
.orb-2 { width: 600px; height: 600px; background: radial-gradient(circle, #D4A5C9, #B07FD8); bottom: -200px; right: -200px; animation-delay: 8s; }
.orb-3 { width: 500px; height: 500px; background: radial-gradient(circle, #84C8C0, #5AB5AB); top: 45%; left: 42%; animation-delay: 16s; }

@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(50px,-40px) scale(1.08); }
  66% { transform: translate(-40px,50px) scale(0.93); }
}

/* ===== BUTTONS ===== */
.btn-accent {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; background: var(--accent);
  color: white; border: none; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: var(--transition); text-decoration: none;
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,98,26,0.3); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text2); border-radius: var(--radius-md);
  font-weight: 500; cursor: pointer; transition: var(--transition);
  text-decoration: none; box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); transform: translateX(-4px); box-shadow: var(--shadow-md); }

/* ===== INDEX PAGE ===== */
.hero-header {
  text-align: center;
  padding: 80px 20px 40px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px; border-radius: 100px;
  background: var(--accent-light); border: 1px solid rgba(212,98,26,0.2);
  color: var(--accent); font-size: 0.82rem; font-weight: 700;
  margin-bottom: 24px; letter-spacing: 0.06em; text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 16px;
  letter-spacing: -0.03em; color: var(--text);
}
.gradient-text {
  background: linear-gradient(135deg, #D4621A 0%, #E8923A 50%, #C44E10 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { font-size: 1.1rem; color: var(--text2); max-width: 480px; margin: 0 auto; }

.main-container { max-width: 1200px; margin: 0 auto; padding: 0 20px 80px; }

.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px; margin-top: 8px;
}

.restaurant-card {
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: var(--transition);
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.restaurant-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(212,98,26,0.25); }

.card-image {
  position: relative; width: 100%; height: 220px; overflow: hidden;
  background: var(--bg3);
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card-image img.logo-fit { object-fit: contain; padding: 20px; background: var(--bg3); }
.restaurant-card:hover .card-image img { transform: scale(1.06); }
.placeholder-image {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 3rem;
}
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(28,25,23,0.3) 100%);
}

.card-content { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.card-description { color: var(--text2); font-size: 0.9rem; line-height: 1.55; flex: 1; margin-bottom: 16px; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--border);
  color: var(--accent); font-weight: 600; font-size: 0.9rem;
}
.card-footer svg { transition: transform 0.3s; }
.restaurant-card:hover .card-footer svg { transform: translateX(5px); }

/* ===== RESTAURANT PAGE ===== */
.restaurant-header {
  padding: 36px 20px 48px;
}
.restaurant-header-inner { max-width: 1200px; margin: 0 auto; }

.back-button { margin-bottom: 28px; }

.restaurant-hero {
  display: flex; align-items: center; gap: 28px;
  padding: 36px 40px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 720px; margin: 0 auto;
}
.restaurant-logo-wrap {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.restaurant-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.restaurant-name { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 8px; color: var(--text); }
.restaurant-desc { color: var(--text2); font-size: 0.92rem; line-height: 1.65; }

.restaurant-container { max-width: 1200px; margin: 0 auto; padding: 0 20px 80px; }

/* Search */
.search-section { margin-bottom: 40px; }
.search-wrapper { position: relative; max-width: 600px; margin: 0 auto; }
.search-icon {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%); color: var(--text3); pointer-events: none;
}
.search-input {
  width: 100%; padding: 15px 50px;
  font-size: 1rem; font-family: inherit;
  background: var(--bg2); color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,98,26,0.12);
}
.clear-search {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: var(--bg3); border: none; padding: 7px;
  border-radius: 50%; cursor: pointer; color: var(--text3);
  display: flex; align-items: center; transition: var(--transition);
}
.clear-search:hover { color: var(--text); background: var(--border); }

/* Search Results */
.search-results { margin-bottom: 40px; animation: fadeUp 0.3s ease; }
.search-results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.search-results-header h3 { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.results-count { color: var(--text3); font-size: 0.9rem; }
.results-list { display: flex; flex-direction: column; gap: 12px; }

.search-result-item {
  display: flex; gap: 16px; padding: 16px;
  background: var(--bg2); border-radius: var(--radius-md);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.search-result-item:hover { border-color: rgba(212,98,26,0.3); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.search-result-item img { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.result-placeholder { width: 90px; height: 90px; background: var(--bg3); border-radius: var(--radius-sm); flex-shrink: 0; }
.result-info { flex: 1; min-width: 0; }
.result-info h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.result-info h4 mark { background: rgba(212,98,26,0.15); color: var(--accent); border-radius: 4px; padding: 1px 4px; }
.result-name-en { color: var(--text2); font-size: 0.85rem; margin-bottom: 6px; }
.result-desc { color: var(--text2); font-size: 0.88rem; line-height: 1.5; margin-bottom: 8px; }
.result-price {
  display: inline-block; padding: 4px 12px;
  background: var(--accent-light); color: var(--accent);
  border: 1px solid rgba(212,98,26,0.25);
  border-radius: 100px; font-weight: 700; font-size: 0.88rem;
}

.search-loading, .search-error, .no-results {
  text-align: center; padding: 40px 20px; color: var(--text2);
}

/* Subgroups */
.subgroups-section { animation: fadeUp 0.3s ease; }
.section-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; color: var(--text); }

.subgroups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.subgroup-card {
  background: var(--bg2); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--transition); position: relative;
}
.subgroup-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(212,98,26,0.25); }
.subgroup-image { position: relative; width: 100%; height: 180px; overflow: hidden; }
.subgroup-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.subgroup-card:hover .subgroup-image img { transform: scale(1.08); }
.subgroup-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(28,25,23,0.55) 100%);
}
.subgroup-placeholder {
  width: 100%; height: 180px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); color: var(--text3); font-size: 2.5rem;
}
.subgroup-content { padding: 18px 18px 48px; }
.subgroup-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 3px; color: var(--text); }
.subgroup-subtitle { color: var(--text2); font-size: 0.85rem; }
.subgroup-arrow {
  position: absolute; bottom: 16px; right: 16px;
  color: var(--accent); transition: transform 0.3s;
  background: var(--accent-light); border-radius: 50%; padding: 7px;
  display: flex; border: 1px solid rgba(212,98,26,0.2);
}
.subgroup-card:hover .subgroup-arrow { transform: translateX(4px); }

/* ===== ITEMS PAGE ===== */
.items-header { max-width: 1200px; margin: 0 auto; padding: 36px 20px 0; }
.items-header-content { text-align: center; margin-top: 24px; margin-bottom: 4px; }
.items-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 8px; color: var(--text); }
.items-subtitle { color: var(--text2); font-size: 1rem; }

.items-container { max-width: 1200px; margin: 0 auto; padding: 32px 20px 80px; }
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.menu-item-card {
  background: var(--bg2); border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--transition); display: flex; flex-direction: column;
}
.menu-item-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(212,98,26,0.2); }

.menu-item-image {
  position: relative; width: 100%; height: 240px;
  overflow: hidden; cursor: pointer;
}
.menu-item-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.menu-item-image:hover img { transform: scale(1.06); }
.image-overlay {
  position: absolute; inset: 0;
  background: rgba(28,25,23,0.38);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s; color: white;
}
.menu-item-image:hover .image-overlay { opacity: 1; }

.menu-item-content { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.menu-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.menu-item-names { flex: 1; min-width: 0; }
.menu-item-name { font-size: 1.1rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.menu-item-name-en { color: var(--text2); font-size: 0.82rem; margin-top: 3px; }
.menu-item-price {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(212,98,26,0.22);
  padding: 4px 11px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  line-height: 1.5;
}
.menu-item-description { color: var(--text2); font-size: 0.9rem; line-height: 1.6; }
.menu-item-description p { margin-bottom: 5px; }
.description-en { color: var(--text3); font-size: 0.85rem; }

.toggle-details-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px;
  background: transparent; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); color: var(--accent);
  font-weight: 600; font-size: 0.88rem; cursor: pointer;
  transition: var(--transition); margin-top: 4px;
}
.toggle-details-btn:hover { background: var(--accent-light); border-color: rgba(212,98,26,0.3); }

.menu-item-details {
  padding: 14px; background: var(--bg3);
  border-radius: var(--radius-md); margin-top: 6px;
  border: 1px solid var(--border);
}
.detail-item { margin-bottom: 10px; }
.detail-item:last-child { margin-bottom: 0; }
.detail-item strong { display: block; color: var(--text); margin-bottom: 3px; font-weight: 600; font-size: 0.88rem; }
.detail-item p { color: var(--text2); font-size: 0.88rem; line-height: 1.5; }

.video-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: var(--accent-light); color: var(--accent);
  border: 1px solid rgba(212,98,26,0.25);
  border-radius: var(--radius-md); font-weight: 600;
  font-size: 0.88rem; cursor: pointer; transition: var(--transition); margin-top: 6px;
}
.video-btn:hover { background: var(--accent); color: white; transform: translateY(-2px); }

/* ===== MODALS ===== */
.modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(28,25,23,0.88);
  align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease; padding: 20px;
}
.modal-content {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain; border-radius: var(--radius-md);
  animation: zoomIn 0.25s ease; box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}
.close {
  position: fixed; top: 20px; right: 24px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.9); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 20px; cursor: pointer;
  transition: var(--transition); z-index: 10000;
  box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.close:hover { background: var(--accent); color: white; transform: rotate(90deg); }
#caption { text-align: center; color: rgba(255,255,255,0.75); padding: 12px; font-size: 0.9rem; }
#modal-video { max-width: 90vw; max-height: 82vh; border-radius: var(--radius-md); }

/* ===== DASHBOARD ===== */
.dashboard-page { background: var(--bg); min-height: 100vh; }

/* ===== LOGIN PAGE ===== */
.login-page {
  background: var(--bg); min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-wrap { width: 100%; max-width: 420px; }
.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo h1 { font-size: 2rem; font-weight: 800; color: var(--text); }
.login-logo span { font-size: 0.9rem; color: var(--text2); }
.login-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  box-shadow: var(--shadow-lg);
}
.login-card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.login-card p { color: var(--text2); font-size: 0.9rem; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.84rem; font-weight: 600; margin-bottom: 7px; color: var(--text2); }
.form-group input {
  width: 100%; padding: 13px 15px;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  font-size: 1rem; font-family: inherit; transition: var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,98,26,0.12); }
.login-submit {
  width: 100%; padding: 14px;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: var(--transition); margin-top: 6px;
}
.login-submit:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,98,26,0.3); }
.login-error {
  background: #FEF2F2; border: 1px solid #FECACA;
  color: #B91C1C; padding: 12px 16px;
  border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.88rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { transform: scale(0.87); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-header { padding: 56px 16px 32px; }
  .restaurants-grid, .subgroups-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .items-grid { grid-template-columns: 1fr; }
  .restaurant-hero { flex-direction: column; text-align: center; padding: 24px; gap: 20px; }
  .search-result-item { flex-direction: column; }
  .search-result-item img, .result-placeholder { width: 100%; height: 180px; }
}
@media (max-width: 480px) {
  .restaurants-grid, .subgroups-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.2rem; }
  .main-container, .restaurant-container, .items-container { padding-left: 12px; padding-right: 12px; }
  .card-image { height: 180px; }
  .menu-item-image { height: 200px; }
  .login-card { padding: 28px 18px; }
  .restaurant-hero { padding: 20px; }
}
