/* Dedicated Style for Dish Description Slide-up & Modal */
:root {
  --detail-primary: #961D00;
  --detail-secondary: #ffc135;
  --detail-text-dark: #212529;
  --detail-text-muted: #6c757d;
  --detail-border-color: rgba(0, 0, 0, 0.08);
}

/* Backdrop Overlay */
.dish-detail-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.dish-detail-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

/* Main Container (Defaults to Mobile Bottom-Sheet) */
.dish-detail-modal {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 85%;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dish-detail-modal.visible {
  transform: translateY(0);
}

/* Drag Handle for mobile swipe indicator */
.dish-detail-drag-handle {
  width: 50px;
  height: 6px;
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  margin: 12px auto 6px auto;
  flex-shrink: 0;
  cursor: grab;
}

.dish-detail-drag-handle:active {
  cursor: grabbing;
}

/* Close Button */
.dish-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 20px;
  font-weight: bold;
  color: var(--detail-text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  z-index: 10;
  transition: all 0.2s ease;
}

.dish-detail-close:hover {
  background: #ffffff;
  color: var(--detail-primary);
  transform: scale(1.05);
}

/* Content wrapper */
.dish-detail-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Hero Section (Image) */
.dish-detail-hero {
  position: relative;
  width: 100%;
  height: 250px;
  flex-shrink: 0;
  overflow: hidden;
}

.dish-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Restaurant Tag */
.dish-detail-restaurant-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--detail-primary);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Body Content */
.dish-detail-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dish-detail-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.dish-detail-category {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--detail-primary);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.dish-detail-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--detail-text-dark);
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.dish-detail-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--detail-primary);
}

.dish-detail-divider {
  height: 1px;
  background-color: var(--detail-border-color);
  margin-bottom: 20px;
}

.dish-detail-description-section {
  flex: 1;
  margin-bottom: 30px;
}

.dish-detail-description-section h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--detail-text-dark);
}

.dish-detail-description-section p {
  font-size: 14px;
  color: var(--detail-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Actions Section */
.dish-detail-actions {
  margin-top: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.dish-detail-order-btn {
  width: 100%;
  padding: 16px;
  background: var(--detail-primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(150, 29, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.dish-detail-order-btn:hover {
  background: var(--detail-secondary);
  color: var(--detail-text-dark);
  box-shadow: 0 6px 15px rgba(255, 193, 53, 0.35);
}

/* Desktop/Tablet Mode (screens >= 600px) */
@media (min-width: 600px) {
  .dish-detail-modal {
    left: 50%;
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%) scale(0.9);
    width: 600px;
    height: auto;
    max-height: 85vh;
    border-radius: 20px;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.35s ease;
  }

  .dish-detail-modal.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
  }

  .dish-detail-drag-handle {
    display: none; /* No drag handle on desktop */
  }

  .dish-detail-close {
    top: 20px;
    right: 20px;
  }

  .dish-detail-hero {
    height: 300px;
  }

  .dish-detail-body {
    padding: 30px;
  }

  .dish-detail-title {
    font-size: 28px;
  }
}
