/* Tastevia — Recipe Details (Figma 101:1002) */

.recipe-hero {
  padding: 48px 0 40px;
}

.recipe-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.recipe-hero__title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 28px;
  max-width: 18ch;
}

.recipe-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 36px;
}

.recipe-meta-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.recipe-meta-item__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.recipe-meta-item__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin: 0 0 4px;
}

.recipe-meta-item__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  margin: 0;
}

.recipe-meta-item__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.recipe-meta-item__name a {
  color: inherit;
  text-decoration: none;
}

.recipe-meta-item__name a:hover {
  opacity: 0.7;
}

.recipe-meta-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.recipe-hero__actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.recipe-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.recipe-action img {
  width: 80px;
  height: 80px;
}

.recipe-action span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.recipe-hero__media-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: stretch;
}

.recipe-hero__media-row--with-nutrition {
  grid-template-columns: 840fr 400fr;
}

.recipe-video {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #f3f3f3;
  aspect-ratio: 840 / 600;
}

.recipe-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-video__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 120px;
  height: 120px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.recipe-video__play img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nutrition {
  background: var(--color-cyan, #e7fafe);
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.nutrition h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
}

.nutrition__list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nutrition__list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.nutrition__list li span:first-child {
  color: var(--color-muted);
}

.nutrition__note {
  margin-top: 28px;
  font-size: 16px;
  line-height: 28px;
  color: var(--color-muted);
  text-align: center;
}

.recipe-intro {
  padding: 32px 0 64px;
  font-size: 16px;
  line-height: 28px;
  color: var(--color-muted);
  max-width: 1280px;
}

.recipe-body {
  padding-bottom: 80px;
}

.recipe-body__grid {
  display: grid;
  grid-template-columns: 840fr 400fr;
  gap: 40px;
  align-items: start;
}

.recipe-body__main h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0 0 28px;
}

.recipe-body__main h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}

.ingredients-block {
  margin-bottom: 40px;
}

.ingredient-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ingredient-list li {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 18px;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.ingredient-list li.is-checked {
  color: var(--color-muted);
  text-decoration: line-through;
  opacity: 0.35;
  font-size: 16px;
}

.ingredient-list__check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
}

.ingredient-list__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  color: inherit;
}

.ingredient-list__toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

.directions {
  margin-top: 48px;
}

.direction {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 24px;
  padding-bottom: 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.direction__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.direction__title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.direction__text {
  font-size: 16px;
  line-height: 26px;
  color: var(--color-muted);
  margin: 0;
}

.direction__media {
  margin: 24px 0;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 792 / 400;
}

.direction__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-aside h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0 0 28px;
}

.other-recipe {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  text-decoration: none;
  color: inherit;
}

.other-recipe__media {
  width: 180px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f3f3f3;
}

.other-recipe__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.other-recipe__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 28px;
  margin: 8px 0 12px;
}

.other-recipe__author {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  margin: 0;
}

.recipe-promo {
  margin-top: 40px;
  border-radius: var(--radius-card);
  background: radial-gradient(circle at 50% 40%, #2f6b4f 0%, var(--color-promo) 70%);
  color: #fff;
  text-align: center;
  padding: 36px 24px 28px;
  min-height: 434px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.recipe-promo__title {
  font-family: var(--font-logo);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
  max-width: 12ch;
}

.recipe-promo__img {
  width: 280px;
  max-width: 90%;
  height: auto;
  object-fit: contain;
}

.recipe-promo__url {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.related {
  padding: 40px 0 100px;
}

.related .section-title {
  text-align: center;
  margin-bottom: 48px;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
  align-items: start;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: inherit;
}

.related-card a {
  color: inherit;
  text-decoration: none;
}

.related-card__media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 290 / 200;
  background: var(--color-card, #f0f5f9);
}

.related-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__fav {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-card__media > a {
  display: block;
  width: 100%;
  height: 100%;
}

.related-card__fav img {
  width: 34px;
  height: 34px;
}

.related-card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 26px;
  margin: 0;
}

.related-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.related-card__meta .meta {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.related-card__meta .meta img {
  width: 24px;
  height: 24px;
}

@media (max-width: 1100px) {
  .recipe-hero__media-row,
  .recipe-body__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .nutrition {
    min-height: auto;
  }

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

@media (max-width: 700px) {
  .recipe-hero {
    padding: 28px 0 24px;
  }

  .recipe-hero__top {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
  }

  .recipe-hero__title {
    font-size: clamp(28px, 8vw, 40px);
    max-width: none;
    margin-bottom: 20px;
  }

  .recipe-hero__meta {
    gap: 18px 20px;
  }

  .recipe-hero__actions {
    align-self: stretch;
    justify-content: flex-start;
    gap: 20px;
  }

  .recipe-action img {
    width: 64px;
    height: 64px;
  }

  .recipe-action.tastevia-like .tastevia-like__count {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .recipe-video {
    border-radius: 20px;
  }

  .recipe-video__play {
    width: 80px;
    height: 80px;
  }

  .nutrition {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .nutrition h2 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .nutrition__list li {
    font-size: 15px;
    padding: 12px 0;
  }

  .nutrition__note {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
  }

  .recipe-intro {
    padding: 20px 0 40px;
    font-size: 15px;
    line-height: 1.7;
  }

  .recipe-body {
    padding-bottom: 56px;
  }

  .recipe-body__main h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .recipe-body__main h3 {
    font-size: 20px;
  }

  .other-recipe {
    gap: 14px;
    margin-bottom: 18px;
  }

  .other-recipe__media {
    width: 110px;
    height: 88px;
    border-radius: 14px;
    flex-shrink: 0;
  }

  .other-recipe__title {
    font-size: 16px;
    line-height: 1.35;
  }

  .recipe-promo {
    min-height: 0;
    padding: 28px 20px 24px;
    border-radius: 24px;
  }

  .related {
    padding: 40px 0 56px;
  }

  .related__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .direction {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .direction__num {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .direction__media {
    border-radius: 16px;
    margin: 16px 0;
  }
}

/* ——— Print: paper recipe sheet ——— */
@media print {
  @page {
    size: A4;
    margin: 1.4cm 1.6cm;
  }

  html,
  body.tastevia-single-recipe {
    background: #fff !important;
    color: #1a1a1a !important;
    font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif !important;
    font-size: 11pt !important;
    line-height: 1.55 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.tastevia-single-recipe * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body.tastevia-single-recipe .site-header,
  body.tastevia-single-recipe .site-footer,
  body.tastevia-single-recipe .menu-toggle,
  body.tastevia-single-recipe .recipe-hero__meta,
  body.tastevia-single-recipe .recipe-hero__actions,
  body.tastevia-single-recipe .recipe-video,
  body.tastevia-single-recipe .recipe-aside,
  body.tastevia-single-recipe .newsletter,
  body.tastevia-single-recipe .related,
  body.tastevia-single-recipe .tastevia-pagination,
  body.tastevia-single-recipe .tastevia-like,
  body.tastevia-single-recipe .recipe-promo,
	body.tastevia-single-recipe .tastevia-share,
  body.tastevia-single-recipe .ingredient-list__check,
  body.tastevia-single-recipe .ingredient-list__toggle,
  body.tastevia-single-recipe .recipe-video__play {
    display: none !important;
  }

  body.tastevia-single-recipe .site-main,
  body.tastevia-single-recipe .container,
  body.tastevia-single-recipe .recipe-hero,
  body.tastevia-single-recipe .recipe-hero__top,
  body.tastevia-single-recipe .recipe-hero__media-row,
  body.tastevia-single-recipe .recipe-body,
  body.tastevia-single-recipe .recipe-body__grid,
  body.tastevia-single-recipe .recipe-body__main {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    grid-template-columns: none !important;
    float: none !important;
    position: static !important;
    background: transparent !important;
    border: 0 !important;
    min-height: 0 !important;
  }

  /* Paper card frame */
  body.tastevia-single-recipe .site-main {
    border: 1.5pt solid #2b2b2b !important;
    padding: 22pt 24pt !important;
    outline: 4pt solid #fff !important;
    outline-offset: 3pt !important;
    box-shadow: inset 0 0 0 4pt #f7f2e8 !important;
    background:
      linear-gradient(#fffef9, #fffef9) padding-box,
      repeating-linear-gradient(
        0deg,
        transparent,
        transparent 27pt,
        rgba(0, 0, 0, 0.035) 28pt
      ) border-box !important;
  }

  body.tastevia-single-recipe .recipe-hero__title {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 26pt !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 8pt !important;
    padding-bottom: 10pt !important;
    color: #111 !important;
    border-bottom: 1.25pt solid #222 !important;
    text-align: center !important;
  }

  body.tastevia-single-recipe .recipe-hero__title::after {
    content: "";
    display: block;
    width: 48pt;
    height: 0;
    margin: 8pt auto 0;
    border-bottom: 0.5pt solid #888;
  }

  body.tastevia-single-recipe .recipe-intro {
    margin: 14pt 0 16pt !important;
    padding: 0 4pt !important;
    font-size: 10.5pt !important;
    line-height: 1.65 !important;
    color: #333 !important;
    font-style: italic !important;
    text-align: justify !important;
  }

  body.tastevia-single-recipe .nutrition {
    display: block !important;
    width: 100% !important;
    margin: 0 0 18pt !important;
    padding: 12pt 14pt !important;
    background: #f7f2e8 !important;
    border: 1pt solid #c9bfae !important;
    border-radius: 0 !important;
    color: #1a1a1a !important;
    page-break-inside: avoid;
  }

  body.tastevia-single-recipe .nutrition h2,
  body.tastevia-single-recipe #nutrition-title {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 13pt !important;
    font-weight: 700 !important;
    margin: 0 0 8pt !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #111 !important;
    text-align: center !important;
  }

  body.tastevia-single-recipe .nutrition__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  body.tastevia-single-recipe .nutrition__list li {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    gap: 12pt !important;
    margin: 0 !important;
    padding: 5pt 0 !important;
    border-bottom: 0.5pt dotted #8a7f6e !important;
    font-size: 10.5pt !important;
    line-height: 1.35 !important;
  }

  body.tastevia-single-recipe .nutrition__list li:last-child {
    border-bottom: 0 !important;
  }

  body.tastevia-single-recipe .nutrition__list li span:first-child {
    font-weight: 600 !important;
  }

  body.tastevia-single-recipe .nutrition__list li span:last-child {
    font-variant-numeric: tabular-nums !important;
  }

  body.tastevia-single-recipe .nutrition__note {
    margin: 8pt 0 0 !important;
    font-size: 9pt !important;
    font-style: italic !important;
    color: #555 !important;
    line-height: 1.45 !important;
  }

  body.tastevia-single-recipe .ingredients-block,
  body.tastevia-single-recipe .directions-block {
    margin: 0 0 16pt !important;
    page-break-inside: avoid;
  }

  body.tastevia-single-recipe .recipe-body__main h2 {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 14pt !important;
    font-weight: 700 !important;
    margin: 0 0 8pt !important;
    padding-bottom: 4pt !important;
    color: #111 !important;
    border-bottom: 0.75pt solid #444 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
  }

  body.tastevia-single-recipe .recipe-body__main h3,
  body.tastevia-single-recipe .direction__title {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 11.5pt !important;
    font-weight: 700 !important;
    margin: 9pt 0 3pt !important;
    color: #222 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border: 0 !important;
    padding: 0 !important;
  }

  body.tastevia-single-recipe .ingredient-list,
  body.tastevia-single-recipe .direction-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

	body.tastevia-single-recipe .ingredient-list li {
    display: block !important;
    position: relative !important;
    margin: 0 0 5pt !important;
    padding: 0 0 0 14pt !important;
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
    page-break-inside: avoid;
    cursor: default !important;
    opacity: 1 !important;
    text-decoration: none !important;
    color: #1a1a1a !important;
  }

  body.tastevia-single-recipe .ingredient-list li::before {
    content: "•";
    position: absolute;
    left: 2pt;
    top: 0;
    font-size: 12pt;
    line-height: 1.4;
  }

  body.tastevia-single-recipe .direction-list {
    counter-reset: tastevia-step;
  }

  body.tastevia-single-recipe .direction-list li,
  body.tastevia-single-recipe .direction {
    display: block !important;
    counter-increment: tastevia-step;
    grid-template-columns: none !important;
    gap: 0 !important;
    margin: 0 0 10pt !important;
    padding: 0 0 0 22pt !important;
    position: relative !important;
    font-size: 10.5pt !important;
    line-height: 1.55 !important;
    page-break-inside: avoid;
  }

  body.tastevia-single-recipe .direction::before {
    content: counter(tastevia-step) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    font-family: Georgia, "Times New Roman", serif;
  }

  body.tastevia-single-recipe .direction p {
    margin: 2pt 0 0 !important;
  }

  body.tastevia-single-recipe a {
    color: #1a1a1a !important;
    text-decoration: none !important;
  }

  body.tastevia-single-recipe .site-main::after {
    content: "Tastevia recipe card";
    display: block;
    margin-top: 18pt;
    padding-top: 8pt;
    border-top: 0.5pt solid #bbb;
    font-size: 8pt;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    color: #777;
  }
}


/* ——— Share popover ——— */
.tastevia-share {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.tastevia-share__toggle .tastevia-share__toggle-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tastevia-share__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  width: min(280px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.tastevia-share__panel[hidden] {
  display: none !important;
}

.tastevia-share__heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tastevia-share__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.tastevia-share__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tastevia-share__item:hover,
.tastevia-share__item:focus-visible {
  background: var(--color-cyan, #e7fafe);
  outline: none;
}

.tastevia-share__icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f4f4f4;
  flex-shrink: 0;
}

.tastevia-share__icon img {
  width: 16px;
  height: 16px;
  display: block;
}

.tastevia-share__item-label {
  flex: 1;
}

.tastevia-share__copied {
  color: #0a7a3e;
  font-size: 13px;
  font-weight: 600;
}

.tastevia-share__item--copy.is-copied {
  background: #eaf8ef;
}

.tastevia-share.is-open .tastevia-share__toggle {
  opacity: 0.85;
}

@media (max-width: 700px) {
  .tastevia-share__panel {
    right: 50%;
    transform: translateX(50%);
  }
}


