/**
 * Dish & Menu Item Single Page Styling
 * Replicates USA Food Journal Cactus Blossom layout and responsive design
 *
 * @package FoodMenuJournal
 */

/* Breadcrumb Strip */
.fmj-dish-breadcrumb-strip {
  background: #ffffff;
  border-bottom: 1px solid var(--fmj-border-light, #e2e8f0);
  padding: 12px 0;
  font-size: 0.85rem;
}

.fmj-dish-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--fmj-text-muted, #64748b);
}

.fmj-dish-breadcrumbs a {
  color: var(--fmj-text-muted, #64748b);
  text-decoration: none;
  transition: color 0.15s ease;
}

.fmj-dish-breadcrumbs a:hover {
  color: var(--fmj-primary, #a6192e);
}

.fmj-bc-sep {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.fmj-bc-current {
  color: var(--fmj-text-main, #0f172a);
  font-weight: 700;
}

/* Page Layout Grid */
.fmj-dish-page-wrapper {
  background-color: #faf7f2;
  padding: 32px 0 60px;
  min-height: 80vh;
}

.fmj-dish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.fmj-dish-main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fmj-dish-sidebar-col {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 1. Hero Dish Card */
.fmj-dish-hero-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.fmj-dish-hero-media {
  position: relative;
  height: 380px;
  background-color: #1e293b;
  overflow: hidden;
}

.fmj-dish-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.fmj-dish-hero-card:hover .fmj-dish-hero-img {
  transform: scale(1.02);
}

.fmj-dish-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.35) 0%,
    rgba(15, 23, 42, 0.1) 40%,
    rgba(15, 23, 42, 0.88) 100%
  );
  pointer-events: none;
}

.fmj-dish-top-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background-color: var(--fmj-primary, #a6192e);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.fmj-dish-top-brand-badge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.fmj-dish-brand-text {
  background-color: #831021;
  color: #fef08a;
  border: 1px solid #fde047;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 3px 12px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.fmj-dish-brand-sub {
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.fmj-dish-hero-text {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 2;
}

.fmj-dish-hero-sub {
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.fmj-dish-hero-title {
  color: #ffffff;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* Price & Calorie Banner */
.fmj-dish-price-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.fmj-dish-price-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.fmj-dish-meta-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.fmj-dish-price-val {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--fmj-primary, #a6192e);
  line-height: 1;
}

.fmj-dish-meta-vdiv {
  width: 1px;
  height: 42px;
  background: #e2e8f0;
}

.fmj-dish-cal-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.fmj-cal-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
}

.fmj-btn-round {
  border-radius: 9999px !important;
  padding: 10px 22px !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
}

/* 2. Nutrition Grid Card */
.fmj-nutrition-card-inner {
  padding: 24px;
  background: #ffffff;
}

.fmj-sec-heading {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
  margin-bottom: 16px;
}

.fmj-nutrition-boxes-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.fmj-nutri-box {
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fmj-nutri-val {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.1;
}

.fmj-nutri-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 4 Distinct Color Pill BGs */
.fmj-nutri-box.nutri-fat {
  background-color: #fff1f2;
  border: 1px solid #ffe4e6;
}
.fmj-nutri-box.nutri-fat .fmj-nutri-val {
  color: #e11d48;
}
.fmj-nutri-box.nutri-fat .fmj-nutri-label {
  color: #9f1239;
}

.fmj-nutri-box.nutri-carbs {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
}
.fmj-nutri-box.nutri-carbs .fmj-nutri-val {
  color: #d97706;
}
.fmj-nutri-box.nutri-carbs .fmj-nutri-label {
  color: #92400e;
}

.fmj-nutri-box.nutri-protein {
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
}
.fmj-nutri-box.nutri-protein .fmj-nutri-val {
  color: #059669;
}
.fmj-nutri-box.nutri-protein .fmj-nutri-label {
  color: #065f46;
}

.fmj-nutri-box.nutri-sodium {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
}
.fmj-nutri-box.nutri-sodium .fmj-nutri-val {
  color: #2563eb;
}
.fmj-nutri-box.nutri-sodium .fmj-nutri-label {
  color: #1e40af;
}

.fmj-nutri-disclaimer {
  font-size: 0.78rem;
  color: #64748b;
  font-style: italic;
  margin: 0 0 16px;
  line-height: 1.5;
}

.fmj-allergen-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: #fffbeb;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #9a3412;
  line-height: 1.5;
}

/* 3. Editorial Content Card */
.fmj-dish-content-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.fmj-dish-content-h2 {
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 20px;
}

.fmj-dish-content-card .fmj-entry-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #334155;
}

.fmj-dish-content-card .fmj-entry-body h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 28px 0 12px;
  line-height: 1.3;
}

.fmj-dish-content-card .fmj-entry-body p {
  margin-bottom: 16px;
}

.fmj-dish-content-card .fmj-entry-body a {
  color: var(--fmj-primary, #a6192e);
  font-weight: 700;
  text-decoration: underline;
}

/* 4. Pro Tips Card */
.fmj-pro-tips-card {
  background-color: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.fmj-pro-tips-title {
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #854d0e;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fmj-pro-tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fmj-pro-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.92rem;
  color: #713f12;
  line-height: 1.55;
}

.fmj-pro-tip-num {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background-color: #eab308;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* 5. FAQs Card */
.fmj-dish-faq-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.fmj-dish-faq-title {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 20px;
}

.fmj-dish-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fmj-dish-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.fmj-dish-faq-item[open] {
  border-color: #cbd5e1;
}

.fmj-dish-faq-q {
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  background-color: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.fmj-dish-faq-q::-webkit-details-marker {
  display: none;
}

.fmj-q-icon {
  color: var(--fmj-primary, #a6192e);
  font-weight: 900;
  font-size: 1rem;
}

.fmj-dish-faq-a {
  padding: 16px 20px;
  background: #ffffff;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  border-top: 1px solid #f1f5f9;
}

.fmj-dish-faq-a p {
  margin: 0;
}

/* 6 & 7. Related Sections & Compact Cards */
.fmj-dish-related-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.fmj-dish-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.fmj-dish-related-title {
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #0f172a;
  margin: 0;
}

.fmj-dish-related-seeall {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fmj-primary, #a6192e);
  text-decoration: none;
}

.fmj-dish-cards-row {
  display: grid;
  gap: 14px;
}

.fmj-dish-cards-4 {
  grid-template-columns: repeat(4, 1fr);
}

.fmj-dish-cards-6 {
  grid-template-columns: repeat(6, 1fr);
}

.fmj-dish-compact-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fmj-dish-compact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.fmj-compact-media {
  position: relative;
  height: 110px;
  background-color: #f1f5f9;
  overflow: hidden;
}

.fmj-dish-cards-6 .fmj-compact-media {
  height: 90px;
}

.fmj-compact-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fmj-compact-price {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background-color: var(--fmj-primary, #a6192e);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.fmj-compact-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.fmj-compact-rest {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--fmj-primary, #a6192e);
  text-transform: uppercase;
}

.fmj-compact-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 8. About Restaurant Card */
.fmj-dish-about-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
}

.fmj-dish-about-title {
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 12px;
}

.fmj-dish-about-card p {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.fmj-dish-about-card a {
  color: var(--fmj-primary, #a6192e);
  font-weight: 700;
  text-decoration: underline;
}

/* SIDEBAR STYLES */
.fmj-sidebar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.fmj-summary-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 16px;
}

.fmj-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.fmj-summary-table tr {
  border-bottom: 1px solid #f1f5f9;
}

.fmj-summary-table th {
  text-align: left;
  padding: 10px 0;
  font-weight: 600;
  color: #64748b;
}

.fmj-summary-table td {
  text-align: right;
  padding: 10px 0;
  font-weight: 700;
  color: #0f172a;
}

.fmj-summary-table .fmj-sum-price {
  color: var(--fmj-primary, #a6192e);
  font-size: 1.25rem;
  font-weight: 900;
}

.fmj-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fmj-btn-block {
  width: 100%;
  display: block;
  text-align: center;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 8px;
}

.fmj-summary-coupon-link {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fmj-primary, #a6192e);
  text-decoration: none;
  padding: 6px 0;
}

.fmj-summary-coupon-link:hover {
  text-decoration: underline;
}

/* Red Branded Promo Card */
.fmj-sidebar-promo-card {
  background: linear-gradient(135deg, #a6192e 0%, #831021 100%);
  border-radius: 14px;
  padding: 24px;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(166, 25, 46, 0.25);
}

.fmj-promo-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.fmj-promo-heading {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 8px;
  color: #ffffff;
}

.fmj-promo-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: 18px;
}

.fmj-btn-white {
  background: #ffffff;
  color: var(--fmj-primary, #a6192e) !important;
  font-weight: 800;
  font-size: 0.88rem;
  border-radius: 8px;
  text-decoration: none;
  display: block;
  text-align: center;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.fmj-btn-white:hover {
  background-color: #f8fafc;
  transform: translateY(-2px);
}

/* Sidebar Dining Guides */
.fmj-sidebar-guides-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fmj-sidebar-guides-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.fmj-sidebar-guides-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fmj-sidebar-guides-list a {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  line-height: 1.4;
  display: block;
  transition: color 0.15s ease;
}

.fmj-sidebar-guides-list a:hover {
  color: var(--fmj-primary, #a6192e);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .fmj-dish-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .fmj-dish-sidebar-col {
    position: static;
  }
  .fmj-dish-cards-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .fmj-dish-hero-media {
    height: 280px;
  }
  .fmj-dish-price-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .fmj-dish-price-right {
    width: 100%;
  }
  .fmj-dish-price-right .fmj-btn {
    width: 100%;
    text-align: center;
  }
  .fmj-nutrition-boxes-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .fmj-dish-cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .fmj-dish-cards-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  .fmj-dish-content-card,
  .fmj-dish-faq-card {
    padding: 20px;
  }
}
