/* ============================================================
   Tap2Order – Customer Menu Page Stylesheet
   Mobile-first design
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Custom Properties
   ---------------------------------------------------------- */
:root {
  --rest-primary: #e74c3c;
  --rest-primary-rgb: 231, 76, 60;
  --rest-secondary: #2c3e50;
  --rest-accent: #f39c12;
  --rest-bg: #fafafa;
  --rest-surface: #ffffff;
  --rest-text: #212529;
  --rest-text-light: #6c757d;
  --rest-text-muted: #adb5bd;
  --rest-border: #e9ecef;
  --rest-success: #27ae60;
  --rest-radius: 16px;
  --rest-radius-sm: 10px;
  --rest-radius-xs: 6px;
  --rest-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --rest-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --rest-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rest-transition: all 0.3s ease;
  --header-height: 56px;
  --category-bar-height: 50px;
  --bottom-nav-height: 64px;
}

/* ----------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--rest-font);
  background: var(--rest-bg);
  color: var(--rest-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: calc(var(--header-height) + var(--category-bar-height));
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ----------------------------------------------------------
   3. Header / Navbar
   ---------------------------------------------------------- */
.menu-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--rest-surface);
  border-bottom: 1px solid var(--rest-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  transition: var(--rest-transition);
}

.menu-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.menu-header .restaurant-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-header .restaurant-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--rest-border);
}

.menu-header .restaurant-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rest-text);
}

.menu-header .restaurant-tagline {
  font-size: 0.7rem;
  color: var(--rest-text-light);
}

.menu-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--rest-text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--rest-transition);
  position: relative;
}

.header-btn:hover {
  background: var(--rest-bg);
}

/* ----------------------------------------------------------
   4. Hero / Cover Section
   ---------------------------------------------------------- */
.hero-section {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.hero-section .hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-section .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.hero-section .hero-content {
  position: absolute;
  bottom: 20px;
  left: 16px;
  right: 16px;
  color: var(--rest-surface);
}

.hero-section .hero-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .hero-content p {
  font-size: 0.85rem;
  opacity: 0.9;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.hero-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-meta .meta-item i {
  color: var(--rest-accent);
}

/* ----------------------------------------------------------
   5. Search Bar
   ---------------------------------------------------------- */
.search-section {
  padding: 12px 16px;
  background: var(--rest-surface);
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--rest-bg);
  border: 1px solid var(--rest-border);
  border-radius: 12px;
  padding: 0 14px;
  height: 44px;
  transition: var(--rest-transition);
}

.search-bar:focus-within {
  border-color: var(--rest-primary);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.search-bar i {
  color: var(--rest-text-muted);
  margin-right: 10px;
  font-size: 0.95rem;
}

.search-bar input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-family: var(--rest-font);
  color: var(--rest-text);
  outline: none;
}

.search-bar input::placeholder {
  color: var(--rest-text-muted);
}

.search-bar .clear-search {
  display: none;
  background: none;
  border: none;
  color: var(--rest-text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
}

.search-bar .clear-search.show {
  display: flex;
}

.search-results-info {
  padding: 8px 16px 0;
  font-size: 0.8rem;
  color: var(--rest-text-light);
  display: none;
}

.search-results-info.show {
  display: block;
}

/* ----------------------------------------------------------
   6. Sticky Category Navigation
   ---------------------------------------------------------- */
.category-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: var(--rest-surface);
  border-bottom: 1px solid var(--rest-border);
  height: var(--category-bar-height);
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 0;
  padding: 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--rest-text-light);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--rest-transition);
  white-space: nowrap;
  font-family: var(--rest-font);
}

.category-pill:hover {
  color: var(--rest-primary);
}

.category-pill.active {
  color: var(--rest-primary);
  font-weight: 600;
  border-bottom-color: var(--rest-primary);
}

/* ----------------------------------------------------------
   7. Menu Content Area
   ---------------------------------------------------------- */
.menu-content {
  padding: 0 16px 100px;
  max-width: 600px;
  margin: 0 auto;
}

.menu-category-section {
  margin-top: 20px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.category-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rest-text);
}

.category-header .item-count {
  font-size: 0.75rem;
  color: var(--rest-text-muted);
  background: var(--rest-bg);
  padding: 2px 10px;
  border-radius: 12px;
}

.category-description {
  font-size: 0.8rem;
  color: var(--rest-text-light);
  margin-bottom: 12px;
  padding: 0 2px;
}

/* ----------------------------------------------------------
   8. Food Item Cards
   ---------------------------------------------------------- */
.food-items-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.food-item-card {
  display: flex;
  background: var(--rest-surface);
  border-radius: var(--rest-radius);
  overflow: hidden;
  box-shadow: var(--rest-shadow);
  border: 1px solid var(--rest-border);
  transition: var(--rest-transition);
  cursor: pointer;
  position: relative;
}

.food-item-card:active {
  transform: scale(0.98);
}

.food-item-card .item-image-wrapper {
  position: relative;
  width: 120px;
  min-height: 110px;
  flex-shrink: 0;
  overflow: hidden;
}

.food-item-card .item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-item-card .item-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rest-bg), var(--rest-border));
  color: var(--rest-text-muted);
  font-size: 2rem;
}

.food-item-card .item-badges {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.food-item-card .item-info {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.food-item-card .item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rest-text);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.food-item-card .item-description {
  font-size: 0.78rem;
  color: var(--rest-text-light);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.food-item-card .item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.food-item-card .item-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.food-item-card .price-current {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rest-primary);
}

.food-item-card .price-original {
  font-size: 0.78rem;
  color: var(--rest-text-muted);
  text-decoration: line-through;
}

.food-item-card .price-discount {
  font-size: 0.65rem;
  color: var(--rest-success);
  font-weight: 600;
}

.add-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--rest-primary);
  background: var(--rest-surface);
  color: var(--rest-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--rest-transition);
  flex-shrink: 0;
}

.add-btn:hover,
.add-btn:active {
  background: var(--rest-primary);
  color: var(--rest-surface);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--rest-primary);
  border-radius: 20px;
  overflow: hidden;
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--rest-surface);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--rest-transition);
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.qty-value {
  min-width: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rest-surface);
}

/* ----------------------------------------------------------
   9. Item Badges (New, Bestseller, Spicy, Veg, etc.)
   ---------------------------------------------------------- */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-new {
  background: var(--rest-primary);
  color: var(--rest-surface);
}

.badge-bestseller {
  background: var(--rest-accent);
  color: var(--rest-surface);
}

.badge-spicy {
  background: #e74c3c;
  color: var(--rest-surface);
}

.badge-veg {
  background: var(--rest-success);
  color: var(--rest-surface);
}

.badge-nonveg {
  background: #c0392b;
  color: var(--rest-surface);
}

.badge-veg::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rest-surface);
}

.badge-nonveg::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid var(--rest-surface);
}

/* ----------------------------------------------------------
   10. Floating Cart Button
   ---------------------------------------------------------- */
.floating-cart-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--rest-primary);
  color: var(--rest-surface);
  border: none;
  border-radius: 28px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--rest-font);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
  transition: var(--rest-transition);
}

.floating-cart-btn.show {
  display: flex;
  animation: fadeInUp 0.3s ease;
}

.floating-cart-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 24px rgba(231, 76, 60, 0.5);
}

.floating-cart-btn .cart-count {
  background: var(--rest-surface);
  color: var(--rest-primary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.floating-cart-btn .cart-total {
  margin-left: 4px;
}

/* ----------------------------------------------------------
   11. Cart Sidebar
   ---------------------------------------------------------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: var(--rest-transition);
  backdrop-filter: blur(2px);
}

.cart-overlay.show {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: var(--rest-surface);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.show {
  transform: translateX(0);
}

.cart-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rest-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-header .close-cart {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--rest-bg);
  border-radius: 50%;
  color: var(--rest-text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--rest-transition);
}

.cart-header .close-cart:hover {
  background: var(--rest-border);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--rest-text-muted);
}

.cart-empty i {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.cart-empty p {
  font-size: 0.9rem;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rest-border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item .cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: var(--rest-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item .cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item .cart-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rest-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item .cart-item-variation {
  font-size: 0.72rem;
  color: var(--rest-text-light);
  margin-bottom: 4px;
}

.cart-item .cart-item-addons {
  font-size: 0.7rem;
  color: var(--rest-text-muted);
  margin-bottom: 6px;
}

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

.cart-item .cart-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rest-primary);
}

.cart-item .remove-item {
  background: none;
  border: none;
  color: var(--rest-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--rest-transition);
}

.cart-item .remove-item:hover {
  background: #fee2e2;
  color: #e74c3c;
}

.cart-item .cart-qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--rest-border);
  border-radius: 8px;
  overflow: hidden;
}

.cart-item .cart-qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rest-bg);
  border: none;
  color: var(--rest-text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--rest-transition);
}

.cart-item .cart-qty-btn:hover {
  background: var(--rest-border);
}

.cart-item .cart-qty-value {
  min-width: 28px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Cart Notes */
.cart-item-notes {
  margin-top: 6px;
}

.cart-item-notes input {
  width: 100%;
  padding: 4px 8px;
  font-size: 0.72rem;
  border: 1px solid var(--rest-border);
  border-radius: var(--rest-radius-xs);
  font-family: var(--rest-font);
  color: var(--rest-text);
  outline: none;
}

.cart-item-notes input:focus {
  border-color: var(--rest-primary);
}

/* Cart Footer / Summary */
.cart-footer {
  border-top: 1px solid var(--rest-border);
  padding: 16px 20px;
  flex-shrink: 0;
  background: var(--rest-surface);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--rest-text-light);
}

.cart-summary-row.total {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rest-text);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rest-border);
  margin-bottom: 16px;
}

.cart-summary-row .discount {
  color: var(--rest-success);
}

.promo-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.promo-input-group input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--rest-border);
  border-radius: var(--rest-radius-sm);
  font-size: 0.82rem;
  font-family: var(--rest-font);
  outline: none;
}

.promo-input-group input:focus {
  border-color: var(--rest-primary);
}

.promo-input-group button {
  padding: 8px 16px;
  background: var(--rest-secondary);
  color: var(--rest-surface);
  border: none;
  border-radius: var(--rest-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--rest-font);
  transition: var(--rest-transition);
  white-space: nowrap;
}

.promo-input-group button:hover {
  opacity: 0.9;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--rest-primary);
  color: var(--rest-surface);
  border: none;
  border-radius: var(--rest-radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--rest-font);
  cursor: pointer;
  transition: var(--rest-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkout-btn:hover {
  background: #c0392b;
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ----------------------------------------------------------
   12. Item Detail Modal
   ---------------------------------------------------------- */
.item-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--rest-transition);
}

.item-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.item-modal {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  background: var(--rest-surface);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.item-modal-overlay.show .item-modal {
  transform: translateY(0);
}

.item-modal .modal-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  flex-shrink: 0;
}

.item-modal .modal-image-placeholder {
  width: 100%;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rest-bg), var(--rest-border));
  color: var(--rest-text-muted);
  font-size: 4rem;
  flex-shrink: 0;
}

.item-modal .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--rest-surface);
  border: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--rest-transition);
}

.item-modal .modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.item-modal .modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.item-modal .modal-item-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.item-modal .modal-item-desc {
  font-size: 0.85rem;
  color: var(--rest-text-light);
  margin-bottom: 16px;
  line-height: 1.5;
}

.item-modal .modal-item-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--rest-primary);
  margin-bottom: 20px;
}

.item-modal .modal-section {
  margin-bottom: 20px;
}

.item-modal .modal-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--rest-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-modal .modal-section-title .required-tag {
  font-size: 0.7rem;
  color: var(--rest-primary);
  font-weight: 600;
}

/* Variation Radio Buttons */
.variation-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variation-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--rest-border);
  border-radius: var(--rest-radius-sm);
  cursor: pointer;
  transition: var(--rest-transition);
}

.variation-option:hover {
  border-color: var(--rest-primary);
  background: rgba(231, 76, 60, 0.03);
}

.variation-option input[type="radio"] {
  accent-color: var(--rest-primary);
  width: 16px;
  height: 16px;
}

.variation-option .variation-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
}

.variation-option .variation-price {
  font-size: 0.85rem;
  color: var(--rest-text-light);
  font-weight: 600;
}

/* Add-on Checkboxes */
.addon-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.addon-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--rest-border);
  border-radius: var(--rest-radius-sm);
  cursor: pointer;
  transition: var(--rest-transition);
}

.addon-option:hover {
  border-color: var(--rest-primary);
  background: rgba(231, 76, 60, 0.03);
}

.addon-option input[type="checkbox"] {
  accent-color: var(--rest-primary);
  width: 16px;
  height: 16px;
}

.addon-option .addon-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
}

.addon-option .addon-price {
  font-size: 0.85rem;
  color: var(--rest-text-light);
  font-weight: 600;
}

/* Quantity Selector in Modal */
.modal-quantity-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-qty-control {
  display: flex;
  align-items: center;
  border: 2px solid var(--rest-border);
  border-radius: 12px;
  overflow: hidden;
}

.modal-qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rest-bg);
  border: none;
  color: var(--rest-text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--rest-transition);
}

.modal-qty-btn:hover {
  background: var(--rest-border);
}

.modal-qty-value {
  min-width: 44px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Notes Textarea */
.modal-notes textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rest-border);
  border-radius: var(--rest-radius-sm);
  font-size: 0.85rem;
  font-family: var(--rest-font);
  color: var(--rest-text);
  resize: vertical;
  min-height: 60px;
  outline: none;
  transition: var(--rest-transition);
}

.modal-notes textarea:focus {
  border-color: var(--rest-primary);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.modal-notes textarea::placeholder {
  color: var(--rest-text-muted);
}

/* Add to Cart Button in Modal */
.modal-add-to-cart {
  width: 100%;
  padding: 14px;
  background: var(--rest-primary);
  color: var(--rest-surface);
  border: none;
  border-radius: var(--rest-radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--rest-font);
  cursor: pointer;
  transition: var(--rest-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: sticky;
  bottom: 0;
}

.modal-add-to-cart:hover {
  background: #c0392b;
}

/* ----------------------------------------------------------
   13. Offer Banners
   ---------------------------------------------------------- */
.offer-banner-top {
  background: linear-gradient(135deg, var(--rest-primary), #c0392b);
  color: var(--rest-surface);
  padding: 10px 16px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.offer-banner-top .offer-code {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-family: monospace;
  letter-spacing: 1px;
}

.offer-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--rest-transition);
}

.offer-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.offer-popup {
  width: 90%;
  max-width: 380px;
  background: var(--rest-surface);
  border-radius: var(--rest-radius);
  overflow: hidden;
  animation: fadeInUp 0.4s ease;
  position: relative;
}

.offer-popup .offer-popup-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.offer-popup .offer-popup-content {
  padding: 20px;
  text-align: center;
}

.offer-popup .offer-popup-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.offer-popup .offer-popup-content p {
  font-size: 0.85rem;
  color: var(--rest-text-light);
  margin-bottom: 16px;
}

.offer-popup .close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--rest-surface);
  border: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.offer-banner-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--rest-secondary);
  color: var(--rest-surface);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 80;
  transform: translateY(100%);
  transition: var(--rest-transition);
}

.offer-banner-bottom.show {
  transform: translateY(0);
}

.offer-banner-bottom .offer-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.offer-banner-bottom .offer-cta {
  background: var(--rest-primary);
  color: var(--rest-surface);
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--rest-font);
}

/* ----------------------------------------------------------
   14. Advertisement Slider
   ---------------------------------------------------------- */
.ad-slider {
  margin: 16px 0;
  overflow: hidden;
  border-radius: var(--rest-radius);
}

.ad-slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

.ad-slide {
  min-width: 100%;
  position: relative;
}

.ad-slide img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--rest-radius);
}

.ad-slide .ad-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rest-surface);
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.3));
  border-radius: var(--rest-radius);
}

.ad-slide .ad-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ad-slide .ad-content p {
  font-size: 0.8rem;
  opacity: 0.9;
}

.ad-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.ad-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rest-border);
  border: none;
  cursor: pointer;
  transition: var(--rest-transition);
  padding: 0;
}

.ad-dot.active {
  background: var(--rest-primary);
  width: 20px;
  border-radius: 4px;
}

/* ----------------------------------------------------------
   15. Skeleton Loading
   ---------------------------------------------------------- */
.skeleton {
  animation: skeletonPulse 1.5s ease-in-out infinite;
  background: linear-gradient(90deg, var(--rest-border) 25%, #f1f1f1 50%, var(--rest-border) 75%);
  background-size: 200% 100%;
  border-radius: var(--rest-radius-sm);
}

.skeleton-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--rest-surface);
  border-radius: var(--rest-radius);
  margin-bottom: 12px;
}

.skeleton-image {
  width: 120px;
  height: 110px;
  border-radius: var(--rest-radius-sm);
}

.skeleton-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
}

.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.h-20 { height: 20px; }

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

/* ----------------------------------------------------------
   16. Animations
   ---------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideRight {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.animate-cart-bounce {
  animation: cartBounce 0.3s ease;
}

.item-added-flash {
  animation: flashGreen 0.5s ease;
}

@keyframes flashGreen {
  0% { background: var(--rest-surface); }
  50% { background: #eafaf1; }
  100% { background: var(--rest-surface); }
}

/* ----------------------------------------------------------
   17. Checkout Form
   ---------------------------------------------------------- */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--rest-transition);
}

.checkout-overlay.show {
  opacity: 1;
  visibility: visible;
}

.checkout-panel {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  background: var(--rest-surface);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.checkout-overlay.show .checkout-panel {
  transform: translateY(0);
}

.checkout-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--rest-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.checkout-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.checkout-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.checkout-section {
  margin-bottom: 20px;
}

.checkout-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--rest-text);
}

.order-type-options {
  display: flex;
  gap: 8px;
}

.order-type-btn {
  flex: 1;
  padding: 12px 8px;
  border: 2px solid var(--rest-border);
  border-radius: var(--rest-radius-sm);
  background: var(--rest-surface);
  text-align: center;
  cursor: pointer;
  transition: var(--rest-transition);
  font-family: var(--rest-font);
}

.order-type-btn i {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--rest-text-light);
}

.order-type-btn span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rest-text-light);
}

.order-type-btn.active {
  border-color: var(--rest-primary);
  background: rgba(231, 76, 60, 0.05);
}

.order-type-btn.active i,
.order-type-btn.active span {
  color: var(--rest-primary);
}

.checkout-form .form-group {
  margin-bottom: 14px;
}

.checkout-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rest-text);
  margin-bottom: 6px;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rest-border);
  border-radius: var(--rest-radius-sm);
  font-size: 0.9rem;
  font-family: var(--rest-font);
  color: var(--rest-text);
  outline: none;
  transition: var(--rest-transition);
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
  border-color: var(--rest-primary);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.checkout-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--rest-border);
  flex-shrink: 0;
}

.place-order-btn {
  width: 100%;
  padding: 14px;
  background: var(--rest-primary);
  color: var(--rest-surface);
  border: none;
  border-radius: var(--rest-radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--rest-font);
  cursor: pointer;
  transition: var(--rest-transition);
}

.place-order-btn:hover {
  background: #c0392b;
}

.place-order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ----------------------------------------------------------
   18. Order Confirmation Screen
   ---------------------------------------------------------- */
.order-confirmation {
  position: fixed;
  inset: 0;
  background: var(--rest-surface);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--rest-transition);
}

.order-confirmation.show {
  opacity: 1;
  visibility: visible;
}

.confirmation-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 380px;
}

.confirmation-check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--rest-success);
  color: var(--rest-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  animation: fadeInUp 0.5s ease;
}

.confirmation-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirmation-content p {
  font-size: 0.9rem;
  color: var(--rest-text-light);
  margin-bottom: 8px;
}

.confirmation-order-id {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rest-primary);
  margin: 12px 0;
  padding: 10px;
  background: rgba(231, 76, 60, 0.05);
  border-radius: var(--rest-radius-sm);
}

.confirmation-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.confirmation-btn {
  padding: 12px;
  border-radius: var(--rest-radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--rest-font);
  cursor: pointer;
  transition: var(--rest-transition);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
}

.confirmation-btn.btn-whatsapp {
  background: #25d366;
  color: var(--rest-surface);
}

.confirmation-btn.btn-directions {
  background: var(--rest-secondary);
  color: var(--rest-surface);
}

.confirmation-btn.btn-new-order {
  background: transparent;
  color: var(--rest-primary);
  border: 2px solid var(--rest-primary);
}

/* ----------------------------------------------------------
   19. Order Status Tracker
   ---------------------------------------------------------- */
.order-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--rest-surface);
  border-radius: var(--rest-radius);
  box-shadow: var(--rest-shadow);
  margin-bottom: 16px;
  position: relative;
}

.order-status-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--rest-border);
  transform: translateY(-50%);
  z-index: 0;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 1;
}

.status-step .step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rest-border);
  color: var(--rest-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--rest-transition);
}

.status-step.active .step-circle {
  background: var(--rest-primary);
  color: var(--rest-surface);
}

.status-step.completed .step-circle {
  background: var(--rest-success);
  color: var(--rest-surface);
}

.status-step .step-label {
  font-size: 0.65rem;
  color: var(--rest-text-muted);
  font-weight: 500;
}

.status-step.active .step-label,
.status-step.completed .step-label {
  color: var(--rest-text);
}

/* ----------------------------------------------------------
   20. Responsive
   ---------------------------------------------------------- */
@media (min-width: 768px) {
  .menu-content {
    padding: 0 24px 100px;
  }

  .hero-section {
    height: 300px;
  }

  .food-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .food-item-card {
    flex-direction: column;
  }

  .food-item-card .item-image-wrapper {
    width: 100%;
    height: 160px;
  }

  .category-nav {
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .food-items-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .item-modal {
    max-width: 550px;
  }

  .cart-sidebar {
    max-width: 420px;
  }
}

@media (max-width: 374px) {
  :root {
    --header-height: 50px;
  }

  .hero-section {
    height: 180px;
  }

  .food-item-card .item-image-wrapper {
    width: 100px;
    min-height: 90px;
  }
}

/* ----------------------------------------------------------
   21. Print
   ---------------------------------------------------------- */
@media print {
  .menu-header,
  .category-nav,
  .floating-cart-btn,
  .cart-overlay,
  .cart-sidebar,
  .item-modal-overlay,
  .checkout-overlay,
  .offer-banner-bottom {
    display: none !important;
  }

  body {
    padding-top: 0;
  }

  .food-item-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
