/* ============================================================
   RECIPE STYLES — recipe_styles.css
   ============================================================ */

:root {
  --recipe-accent: #e84c1e;
  --recipe-green:  #22c55e;
}

/* ============================================================
   ФИЛЬТРЫ
   ============================================================ */
.recipe-filters-section {
  background: #fff;
  border-bottom: 1px solid var(--ewi-border);
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.recipe-filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.recipe-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .9rem;
  border-radius: 2rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ewi-text-muted);
  background: var(--ewi-bg);
  border: 1.5px solid var(--ewi-border);
  text-decoration: none;
  transition: all .18s;
}
.recipe-filter-btn:hover {
  border-color: var(--recipe-accent);
  color: var(--recipe-accent);
}
.recipe-filter-btn--active {
  background: var(--recipe-accent);
  border-color: var(--recipe-accent);
  color: #fff;
}

/* ============================================================
   СЕТКА РЕЦЕПТОВ
   ============================================================ */
.recipe-catalog { padding: 2.5rem 0 3rem; }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.recipe-grid--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .recipe-grid,
  .recipe-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .recipe-grid,
  .recipe-grid--3 { grid-template-columns: 1fr; }
}

/* ============================================================
   КАРТОЧКА РЕЦЕПТА
   ============================================================ */
.recipe-card {
  background: #fff;
  border-radius: var(--ewi-radius);
  border: 1px solid var(--ewi-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.recipe-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.recipe-card__cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}
.recipe-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.recipe-card:hover .recipe-card__cover img { transform: scale(1.04); }

.recipe-card__cover--1 { background: linear-gradient(135deg,#e8faf0,#d1fae5); }
.recipe-card__cover--2 { background: linear-gradient(135deg,#fff7ed,#fed7aa); }
.recipe-card__cover--3 { background: linear-gradient(135deg,#eff6ff,#bfdbfe); }
.recipe-card__cover--4 { background: linear-gradient(135deg,#fffbeb,#fde68a); }
.recipe-card__cover--5 { background: linear-gradient(135deg,#fdf4ff,#e9d5ff); }
.recipe-card__cover--6 { background: linear-gradient(135deg,#fff1f2,#fecdd3); }

.recipe-card__emoji {
  font-size: 3rem;
  line-height: 1;
}

.recipe-card__body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}
.recipe-card__meta-top { display: flex; gap: .3rem; flex-wrap: wrap; }

.recipe-card h3 {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ewi-dark);
  flex: 1;
}
.recipe-card h3 a { color: inherit; text-decoration: none; }
.recipe-card h3 a:hover { color: var(--recipe-accent); }

.recipe-card p {
  font-size: .78rem;
  color: var(--ewi-text-muted);
  line-height: 1.5;
}

.recipe-card__info {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: .72rem;
  color: var(--ewi-text-muted);
  padding-top: .5rem;
  border-top: 1px solid var(--ewi-border);
  margin-top: auto;
}
.recipe-card__info span {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.recipe-card__info svg { flex-shrink: 0; }

/* ============================================================
   HERO ДЕТАЛЬНОЙ СТРАНИЦЫ
   ============================================================ */
.recipe-post-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background: #1a1a2e;
  overflow: hidden;
}
.recipe-post-hero__bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .55;
}
.recipe-post-hero__bg-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  opacity: .15;
}
.recipe-post-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}
.recipe-post-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
  color: #fff;
}
.recipe-post-hero__title {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  margin: .5rem 0 .75rem;
  color: #fff;
}
.recipe-post-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,.8);
  max-width: 640px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Плашки КБЖУ */
.recipe-post-hero__stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.recipe-stat {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: .75rem;
  padding: .5rem .9rem;
  color: #fff;
  min-width: 80px;
}
.recipe-stat svg { flex-shrink: 0; opacity: .85; }
.recipe-stat div { display: flex; flex-direction: column; }
.recipe-stat strong { font-size: .9rem; font-weight: 700; line-height: 1.1; }
.recipe-stat span { font-size: .65rem; opacity: .7; text-transform: uppercase; letter-spacing: .05em; }

/* ============================================================
   КОНТЕНТ РЕЦЕПТА (двухколоночный)
   ============================================================ */
.recipe-content-section { padding: 2.5rem 0 3rem; }

.recipe-content-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .recipe-content-wrap { grid-template-columns: 1fr; }
}

/* Ингредиенты */
.recipe-ingredients { margin-bottom: 2rem; }
.recipe-ingredients h2,
.recipe-steps h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--ewi-dark);
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--ewi-border);
}

.recipe-ingredients__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.recipe-ingredients__list li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--ewi-border);
  font-size: .9rem;
  color: var(--ewi-text);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.recipe-ingredients__list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--recipe-accent);
  flex-shrink: 0;
}

/* Шаги приготовления */
.recipe-steps { }

/* ============================================================
   САЙДБАР
   ============================================================ */
.recipe-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.recipe-sidebar-block {
  background: #fff;
  border: 1px solid var(--ewi-border);
  border-radius: var(--ewi-radius);
  padding: 1.25rem;
}

.recipe-sidebar__list { display: flex; flex-direction: column; gap: .75rem; margin-top: .75rem; }

.recipe-sidebar-item {
  display: flex;
  gap: .75rem;
  align-items: center;
  text-decoration: none;
  color: var(--ewi-text);
  transition: color .15s;
}
.recipe-sidebar-item:hover { color: var(--recipe-accent); }

.recipe-sidebar-item__img {
  width: 60px;
  height: 60px;
  border-radius: .5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.6rem;
}
.recipe-sidebar-item__img--1 { background: linear-gradient(135deg,#e8faf0,#d1fae5); }
.recipe-sidebar-item__img--2 { background: linear-gradient(135deg,#fff7ed,#fed7aa); }
.recipe-sidebar-item__img--3 { background: linear-gradient(135deg,#eff6ff,#bfdbfe); }
.recipe-sidebar-item__img img { width:100%; height:100%; object-fit:cover; }

.recipe-sidebar-item__body { flex: 1; }
.recipe-sidebar-item__body p { font-size: .82rem; font-weight: 600; line-height: 1.35; margin-bottom: .2rem; }
.recipe-sidebar-item__body span { font-size: .72rem; color: var(--ewi-text-muted); }

/* ============================================================
   СЕКЦИЯ ПОХОЖИХ РЕЦЕПТОВ ВНИЗУ
   ============================================================ */
.recipe-related-section {
  padding: 2rem 0 3rem;
  background: var(--ewi-bg);
}

/* ============================================================
   BREADCRUMB — светлый вариант (для тёмного hero)
   ============================================================ */
.blog-breadcrumb--light,
.blog-breadcrumb--light a { color: rgba(255,255,255,.7); }
.blog-breadcrumb--light a:hover { color: #fff; }
.blog-breadcrumb--light span[aria-hidden] { color: rgba(255,255,255,.4); }

/* ============================================================
   ПЕРЕЛИНКОВКА
   ============================================================ */
.recipe-links-section {
  padding: 2.5rem 0 3rem;
  background: var(--ewi-bg);
}
.recipe-links__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ewi-dark);
  margin-bottom: 1.5rem;
}
.recipe-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.recipe-links-group {
  background: #fff;
  border: 1px solid var(--ewi-border);
  border-radius: var(--ewi-radius);
  padding: 1rem 1.1rem 1.1rem;
}
.recipe-links-group__head {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .75rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--ewi-border);
}
.recipe-links-group__cat {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ewi-dark);
  text-decoration: none;
}
.recipe-links-group__cat:hover { color: var(--recipe-accent); }

.recipe-links-group__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.recipe-links-group__list li::before { display: none; }
.recipe-links-group__list a {
  font-size: .8rem;
  color: var(--ewi-text-muted);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  padding: .2rem 0;
  border-bottom: 1px dashed var(--ewi-border);
  transition: color .15s;
}
.recipe-links-group__list a:hover { color: var(--recipe-accent); }
.recipe-links-group__list li:last-child a { border-bottom: none; }

/* ============================================================
   ГДЕ КУПИТЬ
   ============================================================ */
.recipe-where-to-buy {
  margin-top: 2rem;
  background: #fff;
  border: 1px solid var(--ewi-border);
  border-radius: var(--ewi-radius);
  padding: 1.5rem;
}

.recipe-where-to-buy h2 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--ewi-dark);
}
.recipe-where-to-buy h2 svg { color: var(--recipe-accent); flex-shrink: 0; }

.recipe-stores-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.recipe-stores-table thead tr {
  background: var(--ewi-bg);
}
.recipe-stores-table th {
  padding: .6rem .9rem;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ewi-text-muted);
  border-bottom: 2px solid var(--ewi-border);
}
.recipe-stores-table td {
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--ewi-border);
  vertical-align: middle;
  line-height: 1.4;
}
.recipe-stores-table tbody tr:last-child td { border-bottom: none; }
.recipe-stores-table tbody tr:hover { background: #fafafa; }

.recipe-stores-table__name {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  color: var(--ewi-dark);
  white-space: nowrap;
}
.recipe-stores-table__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: .3rem;
  border: 1px solid var(--ewi-border);
  padding: 2px;
  background: #fff;
  flex-shrink: 0;
  display: block;
}
.recipe-stores-table__desc {
  color: var(--ewi-text-muted);
  vertical-align: middle;
}

.recipe-stores-table__action {
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

.recipe-store-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .9rem;
  background: var(--recipe-accent);
  color: #fff;
  border-radius: .5rem;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.recipe-store-btn:hover {
  background: #c43c12;
  transform: translateY(-1px);
}
.recipe-store-btn svg { flex-shrink: 0; }

@media (max-width: 560px) {
  .recipe-stores-table th:nth-child(2),
  .recipe-stores-table td:nth-child(2) { display: none; }
}
