/* =============================================================
   FoodMaster Pro – Public Frontend Styles
   Professional Restaurant Ordering System UI
   ============================================================= */

/* ---------- CSS Variables / Theme System ------------------- */
:root {
  --fm-primary:        #e8392d;
  --fm-primary-dark:   #c0281e;
  --fm-primary-light:  #fdecea;
  --fm-primary-rgb:    232, 57, 45;
  --fm-secondary:      #1a1a2e;
  --fm-accent:         #f59e0b;
  --fm-success:        #10b981;
  --fm-danger:         #ef4444;
  --fm-warning:        #f59e0b;

  /* Surfaces */
  --fm-bg:             #f8f9fa;
  --fm-bg2:            #f0f2f5;
  --fm-card:           #ffffff;
  --fm-border:         #e5e7eb;
  --fm-border-light:   #f3f4f6;

  /* Text */
  --fm-text:           #111827;
  --fm-text-muted:     #6b7280;
  --fm-text-light:     #9ca3af;

  /* Shadows */
  --fm-shadow-xs:      0 1px 3px rgba(0,0,0,.06);
  --fm-shadow-sm:      0 2px 8px rgba(0,0,0,.08);
  --fm-shadow-md:      0 4px 20px rgba(0,0,0,.12);
  --fm-shadow-lg:      0 8px 32px rgba(0,0,0,.16);
  --fm-shadow-primary: 0 4px 16px rgba(var(--fm-primary-rgb),.35);

  /* Spacing & shape */
  --fm-radius-sm:      6px;
  --fm-radius:         12px;
  --fm-radius-lg:      18px;
  --fm-radius-xl:      24px;

  /* Font */
  --fm-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Animation */
  --fm-transition:     .2s cubic-bezier(.4,0,.2,1);
  --fm-transition-slow:.4s cubic-bezier(.4,0,.2,1);

  /* Layout */
  --fm-sidebar-width:  320px;
  --fm-cat-width:      220px;
}

/* Dark Theme */
.fm-theme-dark {
  --fm-bg:           #0f0f1a;
  --fm-bg2:          #1a1a2e;
  --fm-card:         #1e1e30;
  --fm-border:       #2d2d44;
  --fm-border-light: #252538;
  --fm-text:         #f1f5f9;
  --fm-text-muted:   #94a3b8;
  --fm-text-light:   #64748b;
  --fm-shadow-sm:    0 2px 8px rgba(0,0,0,.3);
  --fm-shadow-md:    0 4px 20px rgba(0,0,0,.4);
}

/* Warm / Bistro Theme */
.fm-theme-warm {
  --fm-primary:      #c05621;
  --fm-primary-dark: #9c4221;
  --fm-primary-light:#fff7ed;
  --fm-primary-rgb:  192, 86, 33;
  --fm-bg:           #fdf6ee;
  --fm-bg2:          #f7eede;
  --fm-card:         #fffdf9;
  --fm-border:       #e8d5c4;
  --fm-accent:       #d97706;
}

/* Fresh / Modern Theme */
.fm-theme-fresh {
  --fm-primary:      #059669;
  --fm-primary-dark: #047857;
  --fm-primary-light:#ecfdf5;
  --fm-primary-rgb:  5, 150, 105;
  --fm-accent:       #10b981;
}

/* Ocean Theme */
.fm-theme-ocean {
  --fm-primary:      #0ea5e9;
  --fm-primary-dark: #0284c7;
  --fm-primary-light:#f0f9ff;
  --fm-primary-rgb:  14, 165, 233;
  --fm-secondary:    #0c4a6e;
}

/* Purple / Luxury Theme */
.fm-theme-luxury {
  --fm-primary:      #7c3aed;
  --fm-primary-dark: #6d28d9;
  --fm-primary-light:#f5f3ff;
  --fm-primary-rgb:  124, 58, 237;
  --fm-accent:       #d97706;
}

/* ---------- Keyframes ---------------------------------------- */
@keyframes fm-fade-in {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fm-slide-in-right {
  from { opacity:0; transform:translateX(20px); }
  to   { opacity:1; transform:translateX(0); }
}
@keyframes fm-slide-in-left {
  from { opacity:0; transform:translateX(-20px); }
  to   { opacity:1; transform:translateX(0); }
}
@keyframes fm-scale-in {
  from { opacity:0; transform:scale(.9); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes fm-bounce-in {
  0%   { transform:scale(0); }
  50%  { transform:scale(1.2); }
  100% { transform:scale(1); }
}
@keyframes fm-pulse-badge {
  0%,100% { transform:scale(1); }
  50%      { transform:scale(1.15); }
}
@keyframes fm-shimmer {
  0%   { background-position:-200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes fm-spin {
  to { transform:rotate(360deg); }
}
@keyframes fm-toast-in {
  from { opacity:0; transform:translateX(120%); }
  to   { opacity:1; transform:translateX(0); }
}
@keyframes fm-toast-out {
  from { opacity:1; transform:translateX(0); }
  to   { opacity:0; transform:translateX(120%); }
}
@keyframes fm-wobble {
  0%,100% { transform:rotate(0); }
  25%      { transform:rotate(-8deg); }
  75%      { transform:rotate(8deg); }
}
@keyframes fm-ripple {
  to { transform:scale(4); opacity:0; }
}

/* ---------- Base Reset / Scoped Styles ----------------------- */
.fm-app * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.fm-app {
  font-family: var(--fm-font);
  color: var(--fm-text);
  background: var(--fm-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar ------------------------------------------- */
.fm-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--fm-card);
  border-bottom: 1px solid var(--fm-border);
  box-shadow: var(--fm-shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.fm-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
  max-width: 100%;
}
.fm-restaurant-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.fm-restaurant-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--fm-border);
}
.fm-restaurant-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--fm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-restaurant-tagline {
  font-size: 12px;
  color: var(--fm-text-muted);
}
.fm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.fm-open-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.fm-open-badge.fm-open {
  background: #d1fae5;
  color: #065f46;
}
.fm-open-badge.fm-closed {
  background: #fee2e2;
  color: #991b1b;
}
.fm-open-badge .fm-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: fm-pulse-badge 2s infinite;
}

/* ---------- Cart Button in Topbar --------------------------- */
.fm-cart-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fm-primary);
  color: #fff;
  border: none;
  border-radius: var(--fm-radius);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--fm-transition);
  box-shadow: var(--fm-shadow-primary);
  text-decoration: none;
  overflow: hidden;
}
.fm-cart-trigger:hover {
  background: var(--fm-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--fm-primary-rgb),.45);
  color: #fff;
  text-decoration: none;
}
.fm-cart-trigger svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.fm-cart-trigger-count {
  background: #fff;
  color: var(--fm-primary);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: transform var(--fm-transition);
}
.fm-cart-trigger-count.fm-bump {
  animation: fm-bounce-in .35s ease;
}
.fm-cart-trigger-amount {
  font-size: 13px;
  opacity: .9;
}

/* ---------- Theme Switcher ---------------------------------- */
.fm-theme-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--fm-bg2);
  border-radius: var(--fm-radius);
  padding: 4px;
  border: 1px solid var(--fm-border);
}
.fm-theme-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--fm-transition);
  position: relative;
}
.fm-theme-dot:hover { transform:scale(1.2); }
.fm-theme-dot.active {
  border-color: var(--fm-text);
  transform: scale(1.15);
}
.fm-theme-dot[data-theme="default"]  { background: #e8392d; }
.fm-theme-dot[data-theme="dark"]     { background: #1a1a2e; }
.fm-theme-dot[data-theme="warm"]     { background: #c05621; }
.fm-theme-dot[data-theme="fresh"]    { background: #059669; }
.fm-theme-dot[data-theme="ocean"]    { background: #0ea5e9; }
.fm-theme-dot[data-theme="luxury"]   { background: #7c3aed; }

/* ---------- Search Bar --------------------------------------- */
.fm-search-bar {
  padding: 14px 20px;
  background: var(--fm-card);
  border-bottom: 1px solid var(--fm-border);
}
.fm-search-input-wrap {
  position: relative;
  max-width: 500px;
}
.fm-search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--fm-text-muted);
  pointer-events: none;
}
.fm-search-input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border: 2px solid var(--fm-border);
  border-radius: var(--fm-radius);
  font-size: 14px;
  background: var(--fm-bg);
  color: var(--fm-text);
  font-family: var(--fm-font);
  transition: border-color var(--fm-transition), box-shadow var(--fm-transition);
}
.fm-search-input:focus {
  outline: none;
  border-color: var(--fm-primary);
  box-shadow: 0 0 0 3px rgba(var(--fm-primary-rgb),.15);
  background: var(--fm-card);
}
.fm-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fm-text-muted);
  display: none;
  padding: 4px;
  border-radius: 50%;
  transition: color var(--fm-transition);
}
.fm-search-clear:hover { color: var(--fm-primary); }
.fm-search-clear.visible { display: flex; }

/* ---------- Main Layout -------------------------------------- */
.fm-menu-layout {
  display: grid;
  grid-template-columns: var(--fm-cat-width) 1fr var(--fm-sidebar-width);
  gap: 0;
  min-height: 70vh;
  align-items: start;
}

/* ---------- Category Sidebar -------------------------------- */
.fm-category-nav {
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--fm-card);
  border-right: 1px solid var(--fm-border);
  padding: 16px 0;
  animation: fm-slide-in-left .4s ease;
}
.fm-category-nav::-webkit-scrollbar { width: 4px; }
.fm-category-nav::-webkit-scrollbar-track { background: transparent; }
.fm-category-nav::-webkit-scrollbar-thumb { background: var(--fm-border); border-radius: 4px; }
.fm-cat-nav-header {
  padding: 0 16px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fm-text-muted);
}
.fm-cat-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--fm-text-muted);
  text-align: left;
  transition: all var(--fm-transition);
  position: relative;
}
.fm-cat-nav-btn:hover {
  background: var(--fm-bg2);
  color: var(--fm-text);
  border-left-color: var(--fm-border);
}
.fm-cat-nav-btn.active {
  background: var(--fm-primary-light);
  color: var(--fm-primary);
  border-left-color: var(--fm-primary);
  font-weight: 700;
}
.fm-cat-nav-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.fm-cat-nav-count {
  margin-left: auto;
  background: var(--fm-bg2);
  color: var(--fm-text-muted);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
}
.fm-cat-nav-btn.active .fm-cat-nav-count {
  background: var(--fm-primary-light);
  color: var(--fm-primary);
}

/* ---------- Menu Content Area ------------------------------- */
.fm-menu-content {
  padding: 24px 20px;
  background: var(--fm-bg);
  min-height: 70vh;
}
.fm-category-section {
  margin-bottom: 48px;
  animation: fm-fade-in .4s ease;
}
.fm-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--fm-border-light);
}
.fm-cat-header-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  background: var(--fm-primary-light);
  border-radius: var(--fm-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fm-cat-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--fm-text);
  line-height: 1.2;
}
.fm-cat-description {
  font-size: 13px;
  color: var(--fm-text-muted);
  margin-top: 2px;
}
.fm-cat-badge {
  margin-left: auto;
  background: var(--fm-bg2);
  color: var(--fm-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ---------- Menu Items Grid --------------------------------- */
.fm-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.fm-items-grid.fm-list-view {
  grid-template-columns: 1fr;
}

/* ---------- Menu Item Card ---------------------------------- */
.fm-item-card {
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  border: 1px solid var(--fm-border);
  overflow: hidden;
  box-shadow: var(--fm-shadow-xs);
  transition: all var(--fm-transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}
.fm-item-card:hover {
  box-shadow: var(--fm-shadow-md);
  transform: translateY(-3px);
  border-color: var(--fm-primary);
}
.fm-item-card.fm-list-view {
  flex-direction: row;
  align-items: center;
}

/* Image */
.fm-item-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--fm-bg2);
  aspect-ratio: 4/3;
  flex-shrink: 0;
}
.fm-list-view .fm-item-img-wrap {
  width: 100px;
  height: 100px;
  aspect-ratio: 1;
  border-radius: 0;
}
.fm-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--fm-transition-slow);
}
.fm-item-card:hover .fm-item-img {
  transform: scale(1.06);
}
.fm-item-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--fm-text-muted);
}

/* Badges on image */
.fm-item-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fm-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.fm-badge-popular { background:#fff7ed; color:#c2410c; }
.fm-badge-new     { background:#f0fdf4; color:#166534; }
.fm-badge-spicy   { background:#fee2e2; color:#991b1b; }
.fm-badge-vegan   { background:#dcfce7; color:#166534; }
.fm-badge-gluten  { background:#fef3c7; color:#92400e; }

/* Wishlist button */
.fm-wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--fm-transition);
  box-shadow: var(--fm-shadow-sm);
}
.fm-wishlist-btn:hover { transform:scale(1.1); }
.fm-wishlist-btn.active { animation: fm-wobble .4s ease; }

/* Item Body */
.fm-item-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.fm-list-view .fm-item-body {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.fm-item-body-text { flex: 1; min-width: 0; }

.fm-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--fm-text);
  line-height: 1.3;
  margin-bottom: 4px;
}
.fm-item-description {
  font-size: 12px;
  color: var(--fm-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fm-item-allergens {
  font-size: 11px;
  color: var(--fm-warning);
  font-weight: 500;
}
.fm-item-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.fm-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  gap: 8px;
}
.fm-item-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--fm-primary);
}
.fm-item-price-original {
  font-size: 13px;
  color: var(--fm-text-muted);
  text-decoration: line-through;
  font-weight: 400;
}

/* Rating stars */
.fm-item-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--fm-warning);
}
.fm-item-rating span { color: var(--fm-text-muted); font-size: 11px; }

/* ---------- Add to Cart Button / Quick Add ----------------- */
.fm-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--fm-primary);
  color: #fff;
  border: none;
  border-radius: var(--fm-radius);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fm-transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  font-family: var(--fm-font);
  flex-shrink: 0;
}
.fm-add-btn:hover {
  background: var(--fm-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--fm-shadow-primary);
}
.fm-add-btn:active { transform: scale(.97); }
.fm-add-btn-customize {
  background: transparent;
  color: var(--fm-primary);
  border: 2px solid var(--fm-primary);
}
.fm-add-btn-customize:hover {
  background: var(--fm-primary);
  color: #fff;
}

/* Qty stepper on card (after adding) */
.fm-card-qty-stepper {
  display: none;
  align-items: center;
  gap: 6px;
}
.fm-card-qty-stepper.visible { display: flex; }
.fm-card-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--fm-primary);
  background: transparent;
  color: var(--fm-primary);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fm-transition);
}
.fm-card-qty-btn:hover { background: var(--fm-primary); color: #fff; }
.fm-card-qty-num {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--fm-text);
}

/* Ripple effect */
.fm-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  width: 6px;
  height: 6px;
  animation: fm-ripple .6s linear;
  pointer-events: none;
}

/* ---------- Cart Sidebar ------------------------------------ */
.fm-cart-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  background: var(--fm-card);
  border-left: 1px solid var(--fm-border);
  box-shadow: var(--fm-shadow-sm);
  animation: fm-slide-in-right .4s ease;
  overflow: hidden;
}
.fm-cart-sidebar-head {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--fm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fm-cart-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fm-cart-sidebar-title svg {
  width: 20px;
  height: 20px;
  color: var(--fm-primary);
}
.fm-cart-sidebar-count {
  background: var(--fm-primary);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.fm-cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.fm-cart-sidebar-body::-webkit-scrollbar { width: 4px; }
.fm-cart-sidebar-body::-webkit-scrollbar-thumb { background: var(--fm-border); border-radius: 4px; }

/* Empty cart state */
.fm-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  gap: 12px;
}
.fm-cart-empty-icon {
  font-size: 48px;
  opacity: .4;
}
.fm-cart-empty-title {
  font-weight: 700;
  color: var(--fm-text);
}
.fm-cart-empty-text {
  font-size: 13px;
  color: var(--fm-text-muted);
}

/* Cart Items */
.fm-cart-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--fm-radius);
  border: 1px solid var(--fm-border-light);
  margin-bottom: 8px;
  background: var(--fm-bg);
  animation: fm-fade-in .25s ease;
  transition: opacity var(--fm-transition), transform var(--fm-transition);
}
.fm-cart-item.fm-removing {
  opacity: 0;
  transform: translateX(-20px);
}
.fm-cart-item-img {
  width: 44px;
  height: 44px;
  border-radius: var(--fm-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.fm-cart-item-info { flex: 1; min-width: 0; }
.fm-cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-cart-item-extras {
  font-size: 11px;
  color: var(--fm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-cart-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.fm-cart-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--fm-border);
  background: var(--fm-card);
  color: var(--fm-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fm-transition);
}
.fm-cart-qty-btn:hover { border-color: var(--fm-primary); color: var(--fm-primary); }
.fm-cart-qty {
  font-size: 13px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.fm-cart-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--fm-primary);
  min-width: 50px;
  text-align: right;
}
.fm-cart-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fm-text-muted);
  padding: 3px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  transition: color var(--fm-transition);
}
.fm-cart-remove-btn:hover { color: var(--fm-danger); }

/* Cart Footer - Totals */
.fm-cart-sidebar-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--fm-border);
  background: var(--fm-card);
}
.fm-cart-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--fm-text-muted);
  margin-bottom: 6px;
}
.fm-cart-totals-row.fm-total-final {
  font-size: 16px;
  font-weight: 800;
  color: var(--fm-text);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px solid var(--fm-border);
}
.fm-free-delivery-bar {
  background: var(--fm-bg2);
  border-radius: var(--fm-radius-sm);
  height: 6px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.fm-free-delivery-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fm-success), var(--fm-primary));
  border-radius: var(--fm-radius-sm);
  transition: width .5s ease;
}
.fm-free-delivery-text {
  font-size: 11px;
  color: var(--fm-text-muted);
  text-align: center;
  margin-bottom: 10px;
}
.fm-checkout-btn {
  display: block;
  width: 100%;
  background: var(--fm-primary);
  color: #fff;
  border: none;
  border-radius: var(--fm-radius);
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all var(--fm-transition);
  font-family: var(--fm-font);
}
.fm-checkout-btn:hover {
  background: var(--fm-primary-dark);
  box-shadow: var(--fm-shadow-primary);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}
.fm-clear-cart-btn {
  display: block;
  width: 100%;
  background: none;
  color: var(--fm-text-muted);
  border: none;
  padding: 6px;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  margin-top: 6px;
  transition: color var(--fm-transition);
  font-family: var(--fm-font);
}
.fm-clear-cart-btn:hover { color: var(--fm-danger); }

/* Store Hours Widget in Sidebar */
.fm-hours-widget {
  padding: 14px 16px;
  border-top: 1px solid var(--fm-border);
}
.fm-hours-widget-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fm-text-muted);
  margin-bottom: 10px;
}
.fm-hours-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fm-text-muted);
  padding: 3px 0;
}
.fm-hours-row.today { color: var(--fm-text); font-weight: 600; }
.fm-hours-open { color: var(--fm-success); }
.fm-hours-closed-text { color: var(--fm-danger); }

/* ---------- Item Detail Modal ------------------------------- */
.fm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fm-transition);
}
.fm-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.fm-modal {
  background: var(--fm-card);
  border-radius: var(--fm-radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--fm-shadow-lg);
  transform: scale(.92) translateY(20px);
  transition: transform var(--fm-transition-slow);
}
.fm-modal-overlay.open .fm-modal {
  transform: scale(1) translateY(0);
}
.fm-modal::-webkit-scrollbar { width: 4px; }
.fm-modal::-webkit-scrollbar-thumb { background: var(--fm-border); }

.fm-modal-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--fm-radius-xl) var(--fm-radius-xl) 0 0;
  background: var(--fm-bg2);
}
.fm-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fm-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fm-transition);
}
.fm-modal-close:hover { background: rgba(0,0,0,.75); transform:scale(1.1); }

.fm-modal-body {
  padding: 20px;
}
.fm-modal-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--fm-text);
  margin-bottom: 8px;
}
.fm-modal-desc {
  font-size: 14px;
  color: var(--fm-text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.fm-modal-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--fm-primary);
  margin-bottom: 20px;
}
.fm-extras-section {
  border-top: 1px solid var(--fm-border);
  padding-top: 16px;
  margin-bottom: 16px;
}
.fm-extras-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fm-text-muted);
  margin-bottom: 10px;
}
.fm-extra-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--fm-radius);
  border: 2px solid var(--fm-border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--fm-transition);
}
.fm-extra-opt:hover { border-color: var(--fm-primary); background: var(--fm-primary-light); }
.fm-extra-opt.selected { border-color: var(--fm-primary); background: var(--fm-primary-light); }
.fm-extra-opt-left { display: flex; align-items: center; gap: 10px; }
.fm-extra-opt-name { font-size: 14px; font-weight: 500; }
.fm-extra-opt-price { font-size: 13px; font-weight: 700; color: var(--fm-primary); }
.fm-extra-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--fm-border);
  background: var(--fm-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fm-transition);
  flex-shrink: 0;
}
.fm-extra-opt.selected .fm-extra-checkbox {
  background: var(--fm-primary);
  border-color: var(--fm-primary);
  color: #fff;
}

.fm-modal-notes {
  border-top: 1px solid var(--fm-border);
  padding-top: 16px;
  margin-bottom: 16px;
}
.fm-notes-label { font-size: 13px; font-weight: 600; color: var(--fm-text); margin-bottom: 8px; }
.fm-notes-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--fm-border);
  border-radius: var(--fm-radius);
  font-family: var(--fm-font);
  font-size: 13px;
  color: var(--fm-text);
  background: var(--fm-bg);
  resize: none;
  transition: border-color var(--fm-transition);
}
.fm-notes-input:focus { outline: none; border-color: var(--fm-primary); }

.fm-modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--fm-border);
  padding-top: 16px;
}
.fm-modal-qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fm-bg2);
  border-radius: var(--fm-radius);
  padding: 4px;
}
.fm-modal-qty-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--fm-radius-sm);
  border: none;
  background: var(--fm-card);
  color: var(--fm-text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fm-transition);
}
.fm-modal-qty-btn:hover { background: var(--fm-primary); color: #fff; }
.fm-modal-qty-num { font-size: 16px; font-weight: 700; min-width: 28px; text-align: center; }
.fm-modal-add-btn {
  flex: 1;
  background: var(--fm-primary);
  color: #fff;
  border: none;
  border-radius: var(--fm-radius);
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--fm-transition);
  font-family: var(--fm-font);
}
.fm-modal-add-btn:hover {
  background: var(--fm-primary-dark);
  box-shadow: var(--fm-shadow-primary);
}

/* ---------- Toast Notification ------------------------------ */
.fm-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.fm-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fm-card);
  border-radius: var(--fm-radius);
  padding: 12px 16px;
  box-shadow: var(--fm-shadow-lg);
  border-left: 4px solid var(--fm-primary);
  min-width: 280px;
  max-width: 360px;
  pointer-events: all;
  animation: fm-toast-in .35s cubic-bezier(.34,1.56,.64,1);
}
.fm-toast.fm-toast-out { animation: fm-toast-out .3s ease forwards; }
.fm-toast-icon { font-size: 20px; flex-shrink: 0; }
.fm-toast-msg { font-size: 13px; font-weight: 500; flex: 1; color: var(--fm-text); }
.fm-toast-success { border-color: var(--fm-success); }
.fm-toast-error   { border-color: var(--fm-danger); }
.fm-toast-warning { border-color: var(--fm-warning); }

/* ---------- Skeleton Loader --------------------------------- */
.fm-skeleton {
  background: linear-gradient(90deg, var(--fm-bg2) 25%, var(--fm-border-light) 50%, var(--fm-bg2) 75%);
  background-size: 200% 100%;
  animation: fm-shimmer 1.5s infinite;
  border-radius: var(--fm-radius-sm);
}
.fm-skeleton-card {
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  border: 1px solid var(--fm-border);
  overflow: hidden;
}
.fm-skeleton-img { height: 180px; }
.fm-skeleton-line { height: 12px; margin: 8px 14px; }
.fm-skeleton-line.w-60 { width: 60%; }
.fm-skeleton-line.w-40 { width: 40%; }

/* ---------- Alert Banner ------------------------------------ */
.fm-alert {
  padding: 12px 16px;
  border-radius: var(--fm-radius);
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fm-alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--fm-warning); }
.fm-alert-info    { background: #e0f2fe; color: #075985; border-left: 4px solid #0ea5e9; }
.fm-alert-success { background: #dcfce7; color: #166534; border-left: 4px solid var(--fm-success); }

/* ---------- View Toggle ------------------------------------- */
.fm-view-toggle {
  display: flex;
  gap: 4px;
}
.fm-view-toggle-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--fm-border);
  background: var(--fm-card);
  border-radius: var(--fm-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fm-transition);
  color: var(--fm-text-muted);
}
.fm-view-toggle-btn.active,
.fm-view-toggle-btn:hover {
  border-color: var(--fm-primary);
  color: var(--fm-primary);
  background: var(--fm-primary-light);
}

/* ---------- Toolbar above menu ------------------------------ */
.fm-menu-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--fm-card);
  border-bottom: 1px solid var(--fm-border);
  gap: 12px;
  flex-wrap: wrap;
}
.fm-menu-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--fm-border);
  background: var(--fm-card);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--fm-text-muted);
  transition: all var(--fm-transition);
  font-family: var(--fm-font);
}
.fm-filter-btn:hover,
.fm-filter-btn.active {
  border-color: var(--fm-primary);
  color: var(--fm-primary);
  background: var(--fm-primary-light);
}
.fm-sort-select {
  padding: 6px 10px;
  border-radius: var(--fm-radius-sm);
  border: 1.5px solid var(--fm-border);
  font-size: 12px;
  background: var(--fm-card);
  color: var(--fm-text);
  font-family: var(--fm-font);
  cursor: pointer;
}

/* ---------- Cart Page Layout -------------------------------- */
.fm-cart-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}
.fm-cart-page-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fm-cart-page-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
.fm-cart-items-list {}
.fm-cart-page-row {
  display: flex;
  gap: 14px;
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  border: 1px solid var(--fm-border);
  padding: 14px;
  margin-bottom: 12px;
  align-items: center;
  animation: fm-fade-in .3s ease;
  transition: opacity .25s, transform .25s;
}
.fm-cart-page-row.removing { opacity:0; transform:translateX(-20px); }
.fm-cart-page-row-img {
  width: 80px;
  height: 80px;
  border-radius: var(--fm-radius);
  object-fit: cover;
  flex-shrink: 0;
}
.fm-cart-page-row-info { flex: 1; }
.fm-cart-page-row-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.fm-cart-page-row-extras { font-size: 12px; color: var(--fm-text-muted); }
.fm-cart-page-row-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fm-bg2);
  border-radius: var(--fm-radius);
  padding: 5px;
}
.fm-cart-page-qty-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--fm-radius-sm);
  border: none;
  background: var(--fm-card);
  color: var(--fm-text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fm-transition);
}
.fm-cart-page-qty-btn:hover { background: var(--fm-primary); color: #fff; }
.fm-cart-page-qty-num { font-weight: 700; min-width: 24px; text-align: center; }
.fm-cart-page-price { font-size: 16px; font-weight: 800; color: var(--fm-primary); min-width: 70px; text-align: right; }
.fm-cart-page-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fm-text-muted);
  font-size: 18px;
  transition: color var(--fm-transition);
  padding: 4px;
}
.fm-cart-page-remove:hover { color: var(--fm-danger); }

.fm-cart-summary-card {
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  border: 1px solid var(--fm-border);
  padding: 20px;
  position: sticky;
  top: 80px;
}
.fm-cart-summary-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.fm-summary-item { display: flex; justify-content: space-between; font-size: 13px; color: var(--fm-text-muted); margin-bottom: 10px; }
.fm-summary-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; color: var(--fm-text); padding-top: 12px; border-top: 2px solid var(--fm-border); margin-top: 4px; }
.fm-promo-input-wrap { display: flex; gap: 8px; margin: 14px 0; }
.fm-promo-input {
  flex: 1;
  padding: 9px 12px;
  border: 2px solid var(--fm-border);
  border-radius: var(--fm-radius);
  font-family: var(--fm-font);
  font-size: 13px;
  background: var(--fm-bg);
  color: var(--fm-text);
}
.fm-promo-input:focus { outline: none; border-color: var(--fm-primary); }
.fm-promo-btn {
  padding: 9px 14px;
  background: var(--fm-primary);
  color: #fff;
  border: none;
  border-radius: var(--fm-radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fm-transition);
  font-family: var(--fm-font);
}
.fm-promo-btn:hover { background: var(--fm-primary-dark); }
.fm-cart-empty-page {
  text-align: center;
  padding: 80px 20px;
  max-width: 400px;
  margin: 0 auto;
}
.fm-cart-empty-page-icon { font-size: 80px; opacity: .3; margin-bottom: 16px; }
.fm-cart-empty-page-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.fm-cart-empty-page-text { color: var(--fm-text-muted); margin-bottom: 20px; }

/* ---------- Checkout ---------------------------------------- */
.fm-checkout-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px;
}
.fm-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.fm-checkout-form-card {
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  border: 1px solid var(--fm-border);
  overflow: hidden;
}
.fm-checkout-section {
  padding: 20px;
  border-bottom: 1px solid var(--fm-border-light);
}
.fm-checkout-section:last-child { border-bottom: none; }
.fm-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fm-text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fm-section-title svg { width: 18px; height: 18px; color: var(--fm-primary); }
.fm-order-type-grid { display: flex; gap: 10px; }
.fm-order-type-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border-radius: var(--fm-radius);
  border: 2px solid var(--fm-border);
  cursor: pointer;
  transition: all var(--fm-transition);
  background: var(--fm-bg);
}
.fm-order-type-card:hover { border-color: var(--fm-primary); background: var(--fm-primary-light); }
.fm-order-type-card.active { border-color: var(--fm-primary); background: var(--fm-primary-light); }
.fm-order-type-icon { font-size: 28px; }
.fm-order-type-label { font-size: 12px; font-weight: 600; color: var(--fm-text-muted); }
.fm-order-type-card.active .fm-order-type-label { color: var(--fm-primary); }

.fm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fm-form-group { display: flex; flex-direction: column; gap: 5px; }
.fm-form-group.full { grid-column: 1/-1; }
.fm-form-label { font-size: 12px; font-weight: 600; color: var(--fm-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.fm-form-input {
  padding: 10px 12px;
  border: 2px solid var(--fm-border);
  border-radius: var(--fm-radius);
  font-family: var(--fm-font);
  font-size: 14px;
  color: var(--fm-text);
  background: var(--fm-bg);
  transition: all var(--fm-transition);
}
.fm-form-input:focus { outline: none; border-color: var(--fm-primary); background: var(--fm-card); box-shadow: 0 0 0 3px rgba(var(--fm-primary-rgb),.12); }
.fm-form-input.error { border-color: var(--fm-danger); }
.fm-form-input-error { font-size: 11px; color: var(--fm-danger); margin-top: 3px; }

.fm-payment-cards { display: flex; gap: 10px; }
.fm-payment-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--fm-radius);
  border: 2px solid var(--fm-border);
  cursor: pointer;
  transition: all var(--fm-transition);
  font-size: 13px;
  font-weight: 600;
  color: var(--fm-text-muted);
}
.fm-payment-card:hover { border-color: var(--fm-primary); }
.fm-payment-card.active { border-color: var(--fm-primary); background: var(--fm-primary-light); color: var(--fm-primary); }
.fm-payment-card input { display: none; }

.fm-place-order-btn {
  display: block;
  width: 100%;
  background: var(--fm-primary);
  color: #fff;
  border: none;
  border-radius: var(--fm-radius);
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--fm-transition);
  margin-top: 20px;
  font-family: var(--fm-font);
}
.fm-place-order-btn:hover { background: var(--fm-primary-dark); box-shadow: var(--fm-shadow-primary); }
.fm-place-order-btn:disabled { background: var(--fm-text-muted); cursor: not-allowed; box-shadow: none; }
.fm-place-order-btn.loading { opacity: .8; cursor: wait; }
.fm-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fm-spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

.fm-checkout-summary-card {
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  border: 1px solid var(--fm-border);
  padding: 20px;
  position: sticky;
  top: 80px;
}
.fm-cs-item { display: flex; justify-content: space-between; font-size: 13px; color: var(--fm-text-muted); padding: 5px 0; }
.fm-cs-item-name { flex: 1; }
.fm-cs-item-qty { color: var(--fm-text); font-weight: 600; }
.fm-cs-divider { height: 1px; background: var(--fm-border); margin: 12px 0; }
.fm-cs-totals {}
.fm-cs-total-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--fm-text-muted); margin-bottom: 6px; }
.fm-cs-total-final { font-size: 18px; font-weight: 800; color: var(--fm-text); padding-top: 10px; border-top: 2px solid var(--fm-border); }

/* ---------- Order Confirmation ----------------------------- */
.fm-confirmation-page {
  max-width: 600px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}
.fm-confirmation-check {
  width: 80px;
  height: 80px;
  background: var(--fm-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  color: #fff;
  animation: fm-bounce-in .5s cubic-bezier(.34,1.56,.64,1);
}
.fm-confirmation-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.fm-confirmation-sub { font-size: 16px; color: var(--fm-text-muted); margin-bottom: 28px; }
.fm-confirmation-card {
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  border: 1px solid var(--fm-border);
  padding: 24px;
  text-align: left;
  margin-bottom: 20px;
}
.fm-confirmation-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fm-border-light);
}
.fm-confirmation-row:last-child { border-bottom: none; }
.fm-confirmation-row-label { color: var(--fm-text-muted); }
.fm-confirmation-row-value { font-weight: 600; }

/* ---------- My Orders -------------------------------------- */
.fm-my-orders-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px;
}
.fm-order-card {
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  border: 1px solid var(--fm-border);
  padding: 16px 20px;
  margin-bottom: 14px;
  animation: fm-fade-in .3s ease;
}
.fm-order-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fm-order-id { font-size: 14px; font-weight: 700; }
.fm-order-date { font-size: 12px; color: var(--fm-text-muted); }
.fm-order-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.fm-status-pending   { background:#fef3c7; color:#92400e; }
.fm-status-confirmed { background:#dbeafe; color:#1d4ed8; }
.fm-status-preparing { background:#f3e8ff; color:#6b21a8; }
.fm-status-ready     { background:#dcfce7; color:#166534; }
.fm-status-delivered { background:#d1fae5; color:#065f46; }
.fm-status-cancelled { background:#fee2e2; color:#991b1b; }

.fm-order-items-list { font-size: 13px; color: var(--fm-text-muted); margin-bottom: 10px; }
.fm-order-card-foot { display: flex; justify-content: space-between; align-items: center; }
.fm-order-total { font-size: 16px; font-weight: 800; color: var(--fm-primary); }

/* ---------- Featured Widget -------------------------------- */
.fm-featured-section {
  padding: 40px 20px;
}
.fm-featured-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}
.fm-featured-subtitle {
  font-size: 14px;
  color: var(--fm-text-muted);
  text-align: center;
  margin-bottom: 28px;
}
.fm-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.fm-featured-card {
  background: var(--fm-card);
  border-radius: var(--fm-radius-lg);
  overflow: hidden;
  box-shadow: var(--fm-shadow-sm);
  border: 1px solid var(--fm-border);
  transition: all var(--fm-transition);
  cursor: pointer;
}
.fm-featured-card:hover {
  box-shadow: var(--fm-shadow-md);
  transform: translateY(-4px);
}
.fm-featured-card-img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.fm-featured-card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--fm-transition-slow); }
.fm-featured-card:hover img { transform: scale(1.08); }
.fm-featured-card-body { padding: 14px; }
.fm-featured-card-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.fm-featured-card-price { font-size: 16px; font-weight: 800; color: var(--fm-primary); }

/* ---------- Mobile Floating Cart --------------------------- */
.fm-mobile-cart-bar {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: var(--fm-primary);
  color: #fff;
  border-radius: 50px;
  padding: 14px 28px;
  box-shadow: 0 8px 32px rgba(var(--fm-primary-rgb),.5);
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  min-width: 240px;
  justify-content: space-between;
  font-family: var(--fm-font);
  animation: fm-fade-in .4s ease;
  text-decoration: none;
}
.fm-mobile-cart-bar:hover { background: var(--fm-primary-dark); color: #fff; text-decoration: none; }
.fm-mobile-cart-bar-count {
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ---------- Responsive --------------------------------------- */
@media (max-width: 1100px) {
  .fm-menu-layout {
    grid-template-columns: var(--fm-cat-width) 1fr;
  }
  .fm-cart-sidebar { display: none; }
  .fm-mobile-cart-bar { display: flex; }
}
@media (max-width: 768px) {
  :root {
    --fm-cat-width: 0px;
  }
  .fm-menu-layout {
    grid-template-columns: 1fr;
  }
  .fm-category-nav { display: none; }

  /* Mobile: horizontal scrollable category tabs */
  .fm-mobile-cat-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 12px 16px;
    background: var(--fm-card);
    border-bottom: 1px solid var(--fm-border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .fm-mobile-cat-tabs::-webkit-scrollbar { display: none; }
  .fm-mobile-cat-tab {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--fm-border);
    background: var(--fm-card);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--fm-text-muted);
    transition: all var(--fm-transition);
    white-space: nowrap;
    font-family: var(--fm-font);
  }
  .fm-mobile-cat-tab.active {
    background: var(--fm-primary);
    border-color: var(--fm-primary);
    color: #fff;
  }

  .fm-items-grid { grid-template-columns: 1fr 1fr; }
  .fm-menu-toolbar { padding: 10px 14px; }
  .fm-topbar-inner { padding: 10px 14px; }
  .fm-cart-page-layout { grid-template-columns: 1fr; }
  .fm-checkout-layout { grid-template-columns: 1fr; }
  .fm-order-type-grid { flex-direction: column; }
  .fm-form-grid { grid-template-columns: 1fr; }
  .fm-payment-cards { flex-direction: column; }

  .fm-restaurant-name { font-size: 15px; }
  .fm-theme-switcher { display: none; }
}
@media (max-width: 480px) {
  .fm-items-grid { grid-template-columns: 1fr; }
  .fm-modal { border-radius: var(--fm-radius-lg); }
  .fm-modal-overlay { padding: 0; align-items: flex-end; }
  .fm-modal { border-radius: var(--fm-radius-xl) var(--fm-radius-xl) 0 0; max-height: 92vh; }
}

/* ---------- Print Styles ----------------------------------- */
@media print {
  .fm-topbar, .fm-category-nav, .fm-cart-sidebar, .fm-mobile-cart-bar { display: none !important; }
}
