/* =========================================================
   TD Framework: Recipe Template
   Editorial recipe post + attached recipe card.
========================================================= */

.tdfw-recipe-page-shell {
  width: min(1200px, calc(100% - 40px));
  max-width: 1200px !important;
  margin: 55px auto 48px auto !important;
  padding: clamp(12px, 3vw, 24px);
  background: var(--tdfw-section-bg, #111111);
  border-radius: calc(var(--tdfw-card-radius, 18px) + 10px);
  box-shadow: var(--tdfw-section-shadow, 0 18px 45px rgba(0, 0, 0, 0.18));
  color: var(--tdfw-card-text-color, #fffaf0);
  overflow: hidden;
}

.tdfw-recipe-page-shell a {
  color: inherit;
}

.tdfw-recipe-hero,
.tdfw-recipe-card-shell,
.tdfw-recipe-section-card {
  position: relative;
  background: var(--tdfw-section-card-bg, #241713);
  border: 1px solid var(--tdfw-section-border, rgba(255, 250, 240, 0.10));
  border-radius: var(--tdfw-section-radius, var(--tdfw-card-radius, 18px));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.tdfw-recipe-hero {
  padding: clamp(20px, 4vw, 34px);
}

.tdfw-recipe-hero-grid {
  display: grid;
  grid-template-columns: minmax(240px, 440px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.tdfw-recipe-hero-media img,
.tdfw-recipe-step-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--tdfw-image-radius, 16px);
  object-fit: cover;
}

.tdfw-recipe-title,
.tdfw-recipe-card-header h2 {
  margin: 0;
  font-family: var(--tdfw-font-heading, inherit);
  color: var(--tdfw-card-text-color, #fffaf0);
  letter-spacing: var(--tdfw-letter-spacing-heading, normal);
}

.tdfw-recipe-title {
  font-size: clamp(2.2rem, 6vw, var(--tdfw-hero-heading-size, 4rem));
  line-height: 0.95;
}

.tdfw-recipe-subtitle {
  margin: 1rem 0 0;
  font-family: var(--tdfw-font-heading, inherit);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.3;
  color: rgba(255, 250, 240, 0.88);
}

.tdfw-recipe-description {
  margin-top: 1rem;
  color: rgba(255, 250, 240, 0.78);
  font-family: var(--tdfw-font-body, inherit);
  font-size: var(--tdfw-section-text-size, 1rem);
  line-height: 1.7;
}

.tdfw-recipe-description p:last-child,
.tdfw-recipe-section-body p:last-child,
.tdfw-recipe-note p:last-child,
.tdfw-recipe-step-content p:last-child {
  margin-bottom: 0;
}

.tdfw-recipe-pill-row,
.tdfw-recipe-cta-row,
.tdfw-recipe-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tdfw-recipe-pill-row {
  margin-bottom: 1.1rem;
}

.tdfw-recipe-pill,
.tdfw-recipe-button,
.tdfw-recipe-section-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--tdfw-font-ui, inherit);
  font-size: var(--tdfw-badge-text-size, 0.78rem);
  font-weight: 700;
  letter-spacing: var(--tdfw-letter-spacing-ui, 0.08em);
  text-transform: uppercase;
  text-decoration: none !important;
}

.tdfw-recipe-pill {
  padding: 0.42rem 0.72rem;
  background: rgba(161, 79, 69, 0.18);
  border: 1px solid rgba(161, 79, 69, 0.45);
  color: rgba(255, 250, 240, 0.92);
}

.tdfw-recipe-stats {
  margin-top: 1.35rem;
}

.tdfw-recipe-stat {
  min-width: 92px;
  padding: 0.7rem 0.9rem;
  background: var(--tdfw-section-inner-bg, rgba(17, 17, 17, 0.42));
  border: 1px solid var(--tdfw-section-border, rgba(255, 250, 240, 0.08));
  border-radius: var(--tdfw-section-card-radius, 14px);
}

.tdfw-recipe-stat span,
.tdfw-recipe-muted,
.tdfw-recipe-ingredient-note,
.tdfw-recipe-mise-list small {
  display: block;
  color: rgba(255, 250, 240, 0.62);
  font-family: var(--tdfw-font-ui, inherit);
  font-size: var(--tdfw-section-text-small-size, 0.85rem);
}

.tdfw-recipe-stat strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--tdfw-card-text-color, #fffaf0);
  font-family: var(--tdfw-font-heading, inherit);
  font-size: 1rem;
}

.tdfw-recipe-cta-row {
  margin-top: 1.5rem;
}

.tdfw-recipe-button {
  cursor: pointer;
  padding: var(--tdfw-button-padding-y, 0.75rem) var(--tdfw-button-padding-x, 1rem);
  background: var(--tdfw-button-bg, #a14f45);
  border: 1px solid transparent;
  color: var(--tdfw-button-text-color, #fffaf0) !important;
}

.tdfw-recipe-button-secondary {
  background: transparent;
  border-color: rgba(255, 250, 240, 0.24);
}

.tdfw-recipe-section,
.tdfw-recipe-card-shell {
  margin-top: clamp(22px, 3vw, 34px);
}

.tdfw-recipe-section-card,
.tdfw-recipe-card-shell {
  padding: clamp(18px, 3vw, 28px);
}

.tdfw-recipe-section-eyebrow {
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.45rem 0.78rem;
  background: rgba(255, 250, 240, 0.08);
  border: 1px solid rgba(255, 250, 240, 0.11);
  color: rgba(255, 250, 240, 0.82);
}

.tdfw-recipe-section-subtitle {
  margin: -0.35rem 0 1rem;
  color: rgba(255, 250, 240, 0.66);
}

.tdfw-recipe-section-body,
.tdfw-recipe-step-content,
.tdfw-recipe-note {
  color: rgba(255, 250, 240, 0.80);
  font-family: var(--tdfw-font-body, inherit);
  font-size: var(--tdfw-section-text-size, 1rem);
  line-height: 1.72;
}

.tdfw-recipe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.tdfw-recipe-card-header h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.tdfw-recipe-card-stats {
  justify-content: flex-end;
  margin-top: 0;
}

.tdfw-recipe-chip-list,
.tdfw-recipe-ingredient-list,
.tdfw-recipe-mise-list,
.tdfw-recipe-group-mise ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tdfw-recipe-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tdfw-recipe-chip-list li,
.tdfw-recipe-pairing-group li {
  margin: 0;
}

.tdfw-recipe-chip-list a,
.tdfw-recipe-chip-list li:not(:has(a)) {
  display: inline-flex;
  padding: 0.6rem 0.82rem;
  background: var(--tdfw-section-inner-bg, rgba(17, 17, 17, 0.38));
  border: 1px solid rgba(255, 250, 240, 0.10);
  border-radius: 999px;
  text-decoration: none;
}

.tdfw-recipe-ingredient-group + .tdfw-recipe-ingredient-group,
.tdfw-recipe-instruction-group + .tdfw-recipe-instruction-group,
.tdfw-recipe-pairing-group + .tdfw-recipe-pairing-group {
  margin-top: 1.5rem;
}

.tdfw-recipe-ingredient-group h3,
.tdfw-recipe-instruction-group h3,
.tdfw-recipe-pairing-group h3,
.tdfw-recipe-step-content h4 {
  margin: 0 0 0.75rem;
  color: var(--tdfw-card-text-color, #fffaf0);
  font-family: var(--tdfw-font-heading, inherit);
}

.tdfw-recipe-ingredient-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 250, 240, 0.09);
}

.tdfw-recipe-ingredient-list li:first-child {
  border-top: 1px solid rgba(255, 250, 240, 0.09);
}

.tdfw-recipe-mise-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 250, 240, 0.08);
}

.tdfw-recipe-check {
  width: 18px;
  height: 18px;
  margin-top: 0.25rem;
  border: 1px solid rgba(255, 250, 240, 0.35);
  border-radius: 5px;
}

.tdfw-recipe-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.tdfw-recipe-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(255, 250, 240, 0.09);
}

.tdfw-recipe-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--tdfw-button-bg, #a14f45);
  color: var(--tdfw-button-text-color, #fffaf0);
  font-family: var(--tdfw-font-ui, inherit);
  font-weight: 800;
}

.tdfw-recipe-step-image {
  margin: 0 0 1rem;
}

.tdfw-recipe-step-tip,
.tdfw-recipe-group-mise {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(161, 79, 69, 0.12);
  border: 1px solid rgba(161, 79, 69, 0.28);
  border-radius: var(--tdfw-section-card-radius, 14px);
}

.tdfw-recipe-group-mise ul {
  margin-top: 0.5rem;
}

.tdfw-recipe-group-mise li {
  padding: 0.25rem 0;
}

.tdfw-recipe-note,
.tdfw-recipe-nutrition-item {
  padding: 1rem;
  background: var(--tdfw-section-inner-bg, rgba(17, 17, 17, 0.38));
  border: 1px solid rgba(255, 250, 240, 0.09);
  border-radius: var(--tdfw-section-card-radius, 14px);
}

.tdfw-recipe-note + .tdfw-recipe-note {
  margin-top: 0.75rem;
}

.tdfw-recipe-note strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--tdfw-card-text-color, #fffaf0);
}

.tdfw-recipe-nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.tdfw-recipe-nutrition-item span {
  display: block;
  color: rgba(255, 250, 240, 0.62);
  font-size: 0.85rem;
}

.tdfw-recipe-nutrition-item strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--tdfw-card-text-color, #fffaf0);
  font-size: 1.08rem;
}

@media (max-width: 860px) {
  .tdfw-recipe-hero-grid,
  .tdfw-recipe-card-header {
    display: block;
  }

  .tdfw-recipe-hero-content,
  .tdfw-recipe-card-stats {
    margin-top: 1.25rem;
  }

  .tdfw-recipe-card-stats {
    justify-content: flex-start;
  }
}

@media print {
  .tdfw-recipe-page-shell {
    width: 100%;
    margin: 0 !important;
    padding: 0;
    box-shadow: none;
    background: #fff;
    color: #111;
  }

  .tdfw-recipe-hero,
  .tdfw-recipe-section-card,
  .tdfw-recipe-card-shell {
    background: #fff;
    color: #111;
    border-color: #ddd;
    box-shadow: none;
  }

  .tdfw-recipe-button,
  .tdfw-recipe-cta-row {
    display: none !important;
  }
}
