/* ============================================
   MENU ITEM DETAIL PAGE
   ============================================ */

.menu-item-hero {
  padding: 120px 0 60px;
  background: var(--bg-primary);
}

.menu-item-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.menu-item-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ── Carousel ────────────────────────────────────────────────────────────── */
.mi-carousel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  cursor: pointer;
  flex-shrink: 0;
}

.mi-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.mi-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.mi-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.mi-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mi-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 64px;
  opacity: 0.3;
}

/* Arrows */
.mi-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  z-index: 3;
  padding: 0;
}

.mi-arrow:hover { background: rgba(0, 0, 0, 0.75); }
.mi-prev { left: 12px; }
.mi-next { right: 12px; }

/* Dots */
.mi-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.mi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.mi-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Zoom button */
.mi-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 3;
  padding: 0;
}

.mi-zoom:hover { background: rgba(0, 0, 0, 0.75); }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.lb-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lb-inner {
  position: relative;
  max-width: min(90vw, 960px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  transform: scale(0.94);
  transition: transform 0.25s ease;
}

.lb-overlay.open .lb-img { transform: scale(1); }

.lb-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
  z-index: 10000;
}

.lb-close:hover { background: rgba(255, 255, 255, 0.25); }

.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
  z-index: 10000;
}

.lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, 0.22); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  z-index: 10000;
  white-space: nowrap;
}

/* ── Info column ─────────────────────────────────────────────────────────── */
.menu-item-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mi-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.menu-item-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.25);
  color: var(--gold);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Dietary tag chips */
.mi-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: color-mix(in srgb, var(--tag-color) 15%, transparent);
  color: var(--tag-color);
  border: 1px solid color-mix(in srgb, var(--tag-color) 35%, transparent);
}

.menu-item-name {
  font-size: clamp(26px, 6vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.mi-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-item-price {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.01em;
}

.mi-portion {
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

/* Spice level */
.mi-spice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  width: fit-content;
}

.menu-item-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}

/* Ingredients */
.mi-ingredients {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.mi-ingredients-label {
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 4px;
}

/* Allergens */
.mi-allergens {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
}

.mi-allergens-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ef4444;
  margin-bottom: 10px;
}

.mi-allergen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mi-allergen-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Availability */
.menu-item-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.availability-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.availability-dot.unavailable {
  background: var(--text-secondary);
  box-shadow: none;
}

/* CTAs */
.menu-item-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

/* ── Related section ─────────────────────────────────────────────────────── */
.menu-item-related {
  padding: 60px 0 80px;
  background: var(--bg-secondary);
}

.menu-item-related .section-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text-primary);
}

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

.related-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.related-card:hover { transform: translateY(-4px); }

.related-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card:hover .related-card-img img { transform: scale(1.05); }

.related-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.related-card-body { padding: 14px 16px; }

.related-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-card-price {
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 4px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .menu-item-grid {
    flex-direction: row;
    align-items: flex-start;
  }

  .mi-carousel {
    flex: 0 0 420px;
    max-width: 420px;
    aspect-ratio: 1 / 1;
  }

  .menu-item-info { flex: 1; }
  .menu-item-ctas { flex-direction: row; }
}

@media (min-width: 1024px) {
  .menu-item-hero { padding: 140px 0 80px; }
  .mi-carousel { flex: 0 0 480px; max-width: 480px; }
  .related-grid { grid-template-columns: repeat(4, 1fr); }
}
