/* ============================================================
   style.css – FoodieMenu Custom Styles
   Aesthetic: Warm Bistro – cream, terracotta, deep forest green
   Font pairing: Playfair Display (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --cream:       #fdf8f0;
  --cream-dark:  #f5ead8;
  --terra:       #c07b2a;
  --terra-dark:  #9a5f1a;
  --terra-light: #f0d5a8;
  --forest:      #2d5a3d;
  --forest-dark: #1e3d2a;
  --forest-light:#4a7c5d;
  --charcoal:    #2c2c2c;
  --warm-gray:   #6b6355;
  --light-gray:  #e8e0d4;
  --white:       #ffffff;
  --danger:      #c0392b;
  --success-clr: #27ae60;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --shadow-sm:  0 2px 8px rgba(44,44,44,.08);
  --shadow-md:  0 4px 20px rgba(44,44,44,.12);
  --shadow-lg:  0 8px 40px rgba(44,44,44,.16);
  --radius:     14px;
  --radius-sm:  8px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--charcoal);
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream-dark); }
::-webkit-scrollbar-thumb { background: var(--terra-light); border-radius: 99px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.fm-navbar {
  background: var(--forest) !important;
  box-shadow: var(--shadow-md);
  padding: 0 !important;
}

.fm-navbar .navbar-brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cream) !important;
  padding: 14px 0;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fm-navbar .navbar-brand .brand-dot {
  width: 10px; height: 10px;
  background: var(--terra);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity:1; }
  50%      { transform: scale(1.4); opacity:.7; }
}

.fm-navbar .nav-link {
  color: rgba(255,255,255,.8) !important;
  font-weight: 500;
  font-size: .9rem;
  padding: 8px 14px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.fm-navbar .nav-link:hover,
.fm-navbar .nav-link.active {
  color: var(--cream) !important;
  background: rgba(255,255,255,.12);
}

.fm-navbar .navbar-toggler {
  border: 1.5px solid rgba(255,255,255,.3);
  padding: 5px 9px;
}
.fm-navbar .navbar-toggler-icon {
  filter: invert(1);
}

/* ============================================================
   HERO SECTION (index.html)
   ============================================================ */
.fm-hero {
  background:
    linear-gradient(160deg, rgba(45,90,61,.92) 0%, rgba(45,90,61,.75) 50%, rgba(192,123,42,.6) 100%),
    url('https://images.unsplash.com/photo-1414235077428-338989a2e8c0?w=1600&auto=format&fit=crop') center/cover no-repeat;
  min-height: 480px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.fm-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 60px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.fm-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--cream);
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.fm-hero p {
  color: rgba(255,255,255,.85);
  font-size: 1.05rem;
  max-width: 520px;
}

.fm-hero .hero-badge {
  background: var(--terra);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: .8rem;
  padding: 4px 14px;
  border-radius: 99px;
  display: inline-block;
  margin-bottom: 14px;
  letter-spacing: .5px;
}

/* Search bar */
.fm-search-bar {
  background: var(--white);
  border-radius: 99px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 520px;
}

.fm-search-bar input {
  border: none;
  background: transparent;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--charcoal);
  width: calc(100% - 54px);
  outline: none;
}

.fm-search-bar button {
  background: var(--terra);
  border: none;
  color: white;
  width: 54px;
  height: 100%;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.fm-search-bar button:hover { background: var(--terra-dark); }

/* ============================================================
   CATEGORY FILTER PILLS
   ============================================================ */
.fm-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.fm-cat-btn {
  background: var(--white);
  border: 1.5px solid var(--light-gray);
  color: var(--warm-gray);
  padding: 7px 18px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fm-cat-btn:hover,
.fm-cat-btn.active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Price range filter */
.fm-price-filter {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--light-gray);
}

.fm-price-filter label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
  display: block;
}

.fm-price-filter .price-range-display {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--terra);
  font-weight: 600;
  margin-top: 6px;
}

input[type=range].fm-range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--light-gray);
  border-radius: 99px;
  outline: none;
}
input[type=range].fm-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--terra);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(192,123,42,.2);
  transition: var(--transition);
}
input[type=range].fm-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ============================================================
   DISH CARDS (Public)
   ============================================================ */
.dish-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

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

.dish-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--cream-dark);
}

.dish-card .card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.dish-card:hover .card-img-wrap img {
  transform: scale(1.06);
}

.dish-card .card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45,90,61,0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.dish-card:hover .card-overlay {
  background: rgba(45,90,61,.45);
  opacity: 1;
}

.dish-card .card-overlay button {
  background: var(--cream);
  color: var(--forest);
  border: none;
  padding: 10px 20px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transform: translateY(10px);
  transition: var(--transition);
}

.dish-card:hover .card-overlay button {
  transform: translateY(0);
}

.dish-card .card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dish-card .dish-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 5px;
  line-height: 1.3;
}

.dish-card .dish-desc {
  font-size: .82rem;
  color: var(--warm-gray);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-card .dish-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--terra);
}

/* Badge hết món */
.badge-soldout {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--danger);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .5px;
  z-index: 2;
  animation: badgePop .3s ease;
}

@keyframes badgePop {
  0%   { transform: scale(0) rotate(-10deg); }
  70%  { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

.badge-cat {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(45,90,61,.85);
  backdrop-filter: blur(4px);
  color: var(--cream);
  font-size: .68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  z-index: 2;
}

/* Soldout overlay */
.dish-card.soldout .card-img-wrap img {
  filter: grayscale(.7) brightness(.9);
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton-card {
  border: 1.5px solid var(--light-gray) !important;
  box-shadow: none !important;
}

.skeleton-img {
  height: 200px;
  background: linear-gradient(90deg, var(--light-gray) 25%, var(--cream-dark) 50%, var(--light-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--light-gray) 25%, var(--cream-dark) 50%, var(--light-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  margin-bottom: 6px;
}

.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-25 { width: 25%; }
.skeleton-line.w-100 { width: 100%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   MODAL (chi tiết món)
   ============================================================ */
.fm-modal .modal-content {
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.fm-modal .modal-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.fm-modal .modal-header {
  background: var(--forest);
  border: none;
  padding: 16px 24px;
}

.fm-modal .modal-title {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1.3rem;
}

.fm-modal .btn-close { filter: invert(1) opacity(.8); }

.fm-modal .dish-price-lg {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--terra);
}

.fm-modal .modal-body { background: var(--cream); }
.fm-modal .modal-footer { background: var(--cream); border-top: 1.5px solid var(--light-gray); }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--charcoal);
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 3px;
  background: var(--terra);
  border-radius: 99px;
}

/* ============================================================
   ADMIN STYLES
   ============================================================ */
.admin-body {
  background: #f2f5f9;
}

.admin-sidebar {
  background: var(--forest-dark);
  min-height: 100vh;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-sidebar .sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-sidebar .sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: var(--terra);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.sidebar-nav { padding: 16px 12px; list-style: none; margin: 0; }
.sidebar-nav li { margin-bottom: 4px; }
.sidebar-nav .nav-link {
  color: rgba(255,255,255,.65) !important;
  border-radius: var(--radius-sm);
  padding: 10px 14px !important;
  font-size: .88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: rgba(255,255,255,.12);
  color: white !important;
}
.sidebar-nav .nav-link .nav-icon { font-size: 1rem; width: 20px; text-align: center; }

/* Admin main content */
.admin-main { padding: 28px 24px; }

.admin-page-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.admin-breadcrumb { font-size: .82rem; color: var(--warm-gray); }

/* Stats cards */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}
.stat-card:hover { border-color: var(--terra-light); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.stat-card .stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .stat-label { font-size: .82rem; color: var(--warm-gray); font-weight: 500; }
.stat-card .stat-bg {
  position: absolute;
  right: -10px; bottom: -10px;
  font-size: 5rem;
  opacity: .06;
}

.stat-card.green .stat-icon { background: #e8f5e9; color: var(--forest); }
.stat-card.terra .stat-icon { background: #fdf0dc; color: var(--terra); }
.stat-card.red   .stat-icon { background: #fde8e8; color: var(--danger); }
.stat-card.blue  .stat-icon { background: #e8f0fe; color: #1967d2; }

/* Admin Table */
.admin-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1.5px solid var(--light-gray);
}

.admin-table-wrap .table-toolbar {
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--light-gray);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fafbfc;
}

.admin-table-wrap .table-toolbar h5 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0;
  flex: 1;
}

table.fm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

table.fm-table thead tr {
  background: #f7f9fc;
  border-bottom: 2px solid var(--light-gray);
}
table.fm-table th {
  padding: 11px 14px;
  font-weight: 600;
  color: var(--warm-gray);
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .5px;
  white-space: nowrap;
}
table.fm-table tbody tr {
  border-bottom: 1px solid var(--light-gray);
  transition: background var(--transition);
}
table.fm-table tbody tr:last-child { border-bottom: none; }
table.fm-table tbody tr:hover { background: #fdf9f4; }
table.fm-table td {
  padding: 12px 14px;
  vertical-align: middle;
  color: var(--charcoal);
}

table.fm-table .dish-thumb {
  width: 52px; height: 40px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
table.fm-table .dish-thumb-placeholder {
  width: 52px; height: 40px;
  border-radius: 7px;
  background: var(--light-gray);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* Status toggle */
.status-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.fm-switch {
  position: relative;
  display: inline-block;
  width: 38px; height: 22px;
}
.fm-switch input { display: none; }
.fm-switch .slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 99px;
  transition: var(--transition);
}
.fm-switch .slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.fm-switch input:checked + .slider { background: var(--success-clr); }
.fm-switch input:checked + .slider::before { transform: translateX(16px); }

/* Form card (admin) */
.fm-form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--light-gray);
  overflow: hidden;
}

.fm-form-card .form-header {
  background: var(--forest);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.fm-form-card .form-header h5 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1.05rem;
  margin: 0;
}

.fm-form-card .form-body { padding: 22px; }

/* Bootstrap form customization */
.form-control, .form-select {
  border-color: var(--light-gray) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body) !important;
  font-size: .9rem !important;
  color: var(--charcoal) !important;
  background: var(--cream) !important;
  transition: var(--transition) !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--terra) !important;
  box-shadow: 0 0 0 3px rgba(192,123,42,.15) !important;
  background: var(--white) !important;
}

.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--danger) !important;
  background: #fff8f8 !important;
}

.invalid-feedback { font-size: .8rem !important; color: var(--danger) !important; font-weight: 500; }

.form-label { font-weight: 600; font-size: .83rem; color: var(--warm-gray); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }

/* Buttons */
.btn-terra {
  background: var(--terra) !important;
  border-color: var(--terra) !important;
  color: white !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition) !important;
}
.btn-terra:hover {
  background: var(--terra-dark) !important;
  border-color: var(--terra-dark) !important;
  transform: translateY(-1px);
}

.btn-forest {
  background: var(--forest) !important;
  border-color: var(--forest) !important;
  color: white !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition) !important;
}
.btn-forest:hover { background: var(--forest-dark) !important; border-color: var(--forest-dark) !important; }

/* Pagination */
.fm-pagination .page-link {
  color: var(--forest);
  border-color: var(--light-gray);
  border-radius: var(--radius-sm) !important;
  margin: 0 2px;
  font-size: .85rem;
  padding: 6px 12px;
  transition: var(--transition);
}
.fm-pagination .page-item.active .page-link {
  background: var(--terra);
  border-color: var(--terra);
  color: white;
}
.fm-pagination .page-link:hover {
  background: var(--terra-light);
  color: var(--terra-dark);
  border-color: var(--terra-light);
}

/* Toast */
.fm-toast-container {
  position: fixed;
  top: 80px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fm-toast {
  background: var(--white);
  border-left: 4px solid var(--terra);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  font-size: .88rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 360px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toastSlide .3s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  overflow: hidden;
}

.fm-toast::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: currentColor;
  opacity: .15;
}

@keyframes toastSlide {
  from { opacity:0; transform: translateX(30px) scale(.9); }
  to   { opacity:1; transform: translateX(0) scale(1); }
}

.fm-toast.success { border-color: var(--success-clr); }
.fm-toast.error   { border-color: var(--danger); }
.fm-toast.info    { border-color: #1967d2; }

.fm-toast .toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.fm-toast .toast-close {
  margin-left: auto;
  cursor: pointer;
  opacity: .4;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0 0 8px;
}
.fm-toast .toast-close:hover { opacity: .8; }

/* Confirm modal */
.fm-confirm-modal .modal-content {
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.fm-confirm-modal .modal-header {
  background: var(--danger);
  border: none;
  padding: 16px 22px;
}

.fm-confirm-modal .modal-title { color: white; font-family: var(--font-display); }
.fm-confirm-modal .btn-close { filter: invert(1); }

/* Categories panel */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cream-dark);
  border: 1.5px solid var(--light-gray);
  color: var(--charcoal);
  padding: 5px 12px;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 500;
}

.cat-pill .cat-del {
  cursor: pointer;
  color: var(--warm-gray);
  font-size: .9rem;
  line-height: 1;
  transition: var(--transition);
}

.cat-pill .cat-del:hover { color: var(--danger); transform: scale(1.2); }

/* Image preview */
.img-preview-box {
  width: 100%; height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--cream-dark);
  border: 1.5px dashed var(--light-gray);
  display: flex; align-items: center; justify-content: center;
  color: var(--warm-gray);
  font-size: .85rem;
}

.img-preview-box img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Footer */
.fm-footer {
  background: var(--forest-dark);
  color: rgba(255,255,255,.6);
  font-size: .82rem;
  padding: 20px 0;
  margin-top: 60px;
}

.fm-footer .footer-brand {
  font-family: var(--font-display);
  color: var(--cream);
  font-weight: 700;
}

/* ── Empty state ── */
.fm-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--warm-gray);
}
.fm-empty .empty-icon { font-size: 3.5rem; margin-bottom: 14px; opacity: .5; }
.fm-empty h5 { font-family: var(--font-display); margin-bottom: 8px; color: var(--charcoal); }

/* ── Responsive ── */
@media (max-width: 576px) {
  .fm-hero { min-height: 360px; }
  .fm-hero h1 { font-size: 1.9rem; }
  .section-title { font-size: 1.5rem; }
  .admin-main { padding: 16px 12px; }
  table.fm-table { font-size: .8rem; }
  table.fm-table th, table.fm-table td { padding: 9px 10px; }
}

@media (min-width: 768px) {
  .fm-hero { min-height: 440px; }
}

@media (min-width: 992px) {
  .fm-hero { min-height: 480px; }
}

/* ============================================================
   v2 ADDITIONS – Cart, Combo, Checkout, Order
   ============================================================ */

/* ── Cart Button in Navbar ── */
.cart-btn {
  position: relative;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.25);
  color: white;
  padding: 7px 16px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.cart-btn:hover { background: rgba(255,255,255,.22); }

.cart-badge {
  background: var(--terra);
  color: white;
  font-size: .7rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  animation: badgePop .3s ease;
}

.badge-shake {
  animation: badgeShake .4s ease !important;
}
@keyframes badgeShake {
  0%,100% { transform: scale(1); }
  25%  { transform: scale(1.3) rotate(-8deg); }
  75%  { transform: scale(1.3) rotate(8deg); }
}

/* ── Cart Sidebar ── */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1040;
  backdrop-filter: blur(2px);
}

.cart-sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--cream);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-sidebar-header {
  background: var(--forest);
  color: white;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
}
.cart-sidebar-header button {
  background: rgba(255,255,255,.15);
  border: none;
  color: white;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}
.cart-sidebar-header button:hover { background: rgba(255,255,255,.3); }

.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: var(--warm-gray);
  text-align: center;
  gap: 8px;
}

/* Cart item */
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--light-gray);
  transition: var(--transition);
}
.cart-item:hover { border-color: var(--terra-light); }

.cart-item-img {
  width: 52px; height: 42px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-weight: 600;
  font-size: .85rem;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-size: .8rem;
  color: var(--terra);
  font-weight: 700;
  font-family: var(--font-display);
}
.cart-item-type {
  font-size: .68rem;
  background: var(--amber-lt);
  color: #b45309;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-dark);
  border-radius: 8px;
  padding: 3px 6px;
}
.cart-item-qty button {
  background: none;
  border: none;
  color: var(--forest);
  width: 22px; height: 22px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}
.cart-item-qty button:hover { background: var(--terra-light); color: var(--terra-dark); }
.cart-item-qty span { min-width: 20px; text-align: center; font-weight: 700; font-size: .9rem; }

.cart-item-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: .5;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.cart-item-del:hover { opacity: 1; color: var(--danger); }

.cart-sidebar-footer {
  border-top: 2px solid var(--light-gray);
  padding: 16px;
  background: white;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cart-total-label { font-size: .9rem; color: var(--warm-gray); font-weight: 600; }
.cart-total-val {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--terra);
}

.btn-checkout {
  width: 100%;
  padding: 13px;
  background: var(--forest);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-checkout:hover { background: var(--forest-dark); transform: translateY(-1px); }

/* ── Add to cart button on card ── */
.btn-add-cart {
  background: var(--terra-light);
  color: var(--terra-dark);
  border: 1.5px solid var(--terra-light);
  border-radius: 8px;
  padding: 7px;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-add-cart:hover {
  background: var(--terra);
  color: white;
  border-color: var(--terra);
}

/* Overlay buttons on card */
.card-overlay { flex-direction: column; gap: 8px; }
.overlay-btn-detail, .overlay-btn-order {
  background: rgba(255,255,255,.92);
  border: none;
  padding: 8px 16px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  transform: translateY(10px);
  transition: var(--transition);
  white-space: nowrap;
}
.overlay-btn-detail { color: var(--forest); }
.overlay-btn-order  { color: var(--terra); }
.dish-card:hover .overlay-btn-detail,
.dish-card:hover .overlay-btn-order { transform: translateY(0); }
.overlay-btn-detail:hover { background: var(--forest); color: white; }
.overlay-btn-order:hover  { background: var(--terra); color: white; }
.overlay-soldout-txt {
  background: rgba(0,0,0,.5);
  color: white;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 600;
}

/* ── COMBO CARDS ── */
.combo-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--light-gray);
  transition: var(--transition);
  height: 100%;
}
.combo-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--terra-light);
  transform: translateY(-4px);
}

.combo-img-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--cream-dark);
}
.combo-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.combo-card:hover .combo-img-wrap img { transform: scale(1.06); }

.combo-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--forest);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  z-index: 2;
}
.combo-save-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--danger);
  color: white;
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  z-index: 2;
}

.combo-body { padding: 16px; }

.combo-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.combo-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.combo-item-tag {
  background: var(--cream-dark);
  color: var(--warm-gray);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--light-gray);
}

.combo-desc {
  font-size: .82rem;
  color: var(--warm-gray);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.combo-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.combo-original {
  font-size: .85rem;
  color: var(--warm-gray);
  text-decoration: line-through;
}
.combo-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--terra);
}

.btn-order-combo {
  width: 100%;
  padding: 10px;
  background: var(--terra);
  color: white;
  border: none;
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-order-combo:hover {
  background: var(--terra-dark);
  transform: translateY(-1px);
}

/* ── Checkout Modal ── */
.order-summary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--light-gray);
  font-size: .88rem;
}
.order-item-name  { flex: 1; font-weight: 500; }
.order-item-qty   { color: var(--warm-gray); min-width: 28px; text-align: center; }
.order-item-subtotal { font-weight: 700; color: var(--terra); min-width: 90px; text-align: right; font-family: var(--font-display); }
.order-total-row  { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; font-size: .95rem; }

/* Success animation */
.success-animation {
  font-size: 4rem;
  animation: successPop .5s cubic-bezier(.34,1.56,.64,1);
  margin-bottom: 16px;
}
@keyframes successPop {
  0%  { transform: scale(0) rotate(-30deg); opacity: 0; }
  100%{ transform: scale(1) rotate(0); opacity: 1; }
}

/* ── img/ directory hint in admin ── */
.img-path-hint {
  font-size: .75rem;
  color: var(--warm-gray);
  margin-top: 4px;
}

/* ── Responsive tweaks ── */
@media(max-width:576px){
  .cart-sidebar { width: 100vw; }
  .combo-img-wrap { height: 140px; }
}

/* ── Stat flash animation when value changes ── */
.stat-flash {
  animation: statFlash .5s ease;
}
@keyframes statFlash {
  0%   { transform: scale(1.3); color: var(--terra); }
  100% { transform: scale(1);   color: inherit; }
}
