/* ===== BODY ===== */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background: linear-gradient(180deg, #fff7ed 0%, #ffe4e6 40%, #fff 100%);
}

/* ===== NAVBAR ===== */
#navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

/* ===== CATEGORY BAR ===== */
.category-bar {
  position: sticky;
  top: var(--navbar-height, 0); /* sticky below navbar */
  z-index: 150;
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid #ddd;
  scroll-behavior: smooth; /* optional smooth scrolling for mouse/trackpad */
  scroll-snap-type: x mandatory;
}

/* Hide default scrollbar */
.category-bar::-webkit-scrollbar {
  height: 6px;
}
.category-bar::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}
.category-bar::-webkit-scrollbar-track {
  background: transparent;
}

/* CATEGORY LINKS */
.category-bar a {
  flex-shrink: 0;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;

  background: #f3f4f6;        /* light pill background */
  border: 1px solid #e5e7eb;  /* subtle border */

  transition: background 0.15s ease, border 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  scroll-snap-align: center;
}

.category-bar a:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.category-bar a.active {
  background: #ef4444;/*#ff7f50;*/
  border-color: #ef4444;/*#ff7f50;*/
  color: white;
  transition: none;
}

/* ===== CATEGORY SECTION ===== */
.category-section::before {
  content: "";
  display: block;
  height: calc(var(--navbar-height, 0) + 60px); /* extra offset for sticky bars */
  margin-top: calc(-1 * (var(--navbar-height, 0) + 60px));
}

.category-title {
  font-size: 26px;
  margin: 40px 0 20px 0;
}

/* ===== GRID ===== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ===== CARD ===== */
.menu-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: all 0.3s ease;
  position: relative;
}

.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* IMAGE */
.image-container {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  margin-bottom: 12px;
  position: relative;

  aspect-ratio: 4 / 3;
  background: white; /* important */
  display: flex;
  align-items: center;
  justify-content: center;
  /*background: #f5f5f5;  /* fallback so empty never looks broken */
}


.image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.image-container img:hover {
  transform: scale(1.05);
}

/* CARD CONTENT */
.card-content {
  padding: 12px;
}

.item-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.description {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}

/* PRICE */
.price, .size-prices-container .price {
  font-weight: 600;
  font-size: 15px;
}

/* MULTI SIZE BUTTONS */
.size-pill {
  display: inline-block;
  padding: 4px 10px;
  margin-right: 6px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.size-pill.selected {
  background: #ef4444;/*#ff7f50*/;
  color: #fff;
  border-color: #ef4444;/*#ff7f50;*/;
}

/* POPULAR BADGE */
.popular-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff6f61;
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .image-container {
    height: 150px;
  }
}
.price.single-size {
  font-size: 0.95rem;
  color: #555;
  margin-top: 6px;
}

.menu-card.no-image {
  padding-top: 16px;
}

.menu-card.no-image .card-content {
  padding-top: 0;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 32px;
  font-weight: 600;

  background: linear-gradient(135deg, #fff7ed, #ffe4e6);
  color: #ff7f50;
}

.image-placeholder {
  transition: transform 0.3s ease;
}

.menu-card:hover .image-placeholder {
  transform: scale(1.05);
}
/* Quick CSS for modal */
.nutrition-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.nutrition-modal.hidden { display: none; }
.nutrition-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;
  width: 90%;
}
.nutrition-modal-content .close-modal {
  float: right;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}
.nutrition-variants button.selected { font-weight: bold; }


.view-nutrition-btn,
.view-nutrition-btn-item {
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #555;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.view-nutrition-btn:hover,
.view-nutrition-btn-item:hover {
  background: #f7f7f7;
  border-color: #ccc;
}

.view-nutrition-btn .icon,
.view-nutrition-btn-item .icon {
  font-size: 14px;
  color: #ff6b6b;
}

.nutrition-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.nutrition-modal.hidden {
  display: none;
}

.nutrition-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: fadeInScale 0.2s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.close-modal {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  float: right;
}

.close-modal:hover {
  background: #ff6b6b;
  color: #fff;
}
.nutrition-info {
  margin-top: 12px;
}

.nutrition-chip {
  display: inline-block;
  background: #f3f3f3;
  padding: 6px 10px;
  border-radius: 12px;
  margin: 4px 6px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.nutrition-variants button {
  border: 1px solid #ddd;
  background: #fff;
  padding: 6px 12px;
  margin-right: 6px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nutrition-variants button.selected {
  background: #ff6b6b;
  color: #fff;
  border-color: #ff6b6b;
}

@media (max-width: 768px) {
  .nutrition-modal {
    align-items: flex-end;
  }

  .nutrition-modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    animation: slideUp 0.25s ease;
  }

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

.nutrition-variants button:hover {
  transform: scale(1.05);
}

.category-title {
  margin-bottom: 6px; /* reduce from default (~20px) */
}

.view-nutrition-btn {
  margin-top: 0; /* remove extra spacing */
}

.view-nutrition-btn,
.view-nutrition-btn-item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #444;
  transition: all 0.2s ease;
  margin-top: 0;

  /* ✨ NEW */
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.view-nutrition-btn:hover,
.view-nutrition-btn-item:hover {
  background: #fff;
  border-color: #ff6b6b;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.view-nutrition-btn .icon,
.view-nutrition-btn-item .icon {
  font-size: 14px;
  color: #ff6b6b;
}

.view-nutrition-btn span:last-child,
.view-nutrition-btn-item span:last-child {
  font-weight: 500;
}
