/* ──────────────────────────────────────────
   Beimbatti — Recipe page CSS (flat light)
   ────────────────────────────────────────── */
@import url('/css/main.css');

/* ── Carousel ──────────────────────────── */
.carousel { position: relative; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.carousel__placeholder {
  height: 460px; background: var(--panel-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--border); font-size: 56px;
}
.carousel__single { width: 100%; height: 360px; object-fit: cover; display: block; }

.carousel__track-wrap {
  position: relative; overflow: hidden; height: 460px;
}
.carousel__track { position: relative; width: 100%; height: 100%; }
.carousel__slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .4s ease;
  pointer-events: none;
}
.carousel__slide.is-active { opacity: 1; pointer-events: auto; }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s; z-index: 2;
}
.carousel__btn:hover { background: var(--panel-2); }
.carousel__btn--prev { left: 0; }
.carousel__btn--next { right: 0; }

.carousel__dots {
  position: absolute; bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 7px;
  z-index: 3; pointer-events: none;
}
.carousel__dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,.55); border: none;
  border-radius: 50%;
  cursor: pointer; transition: all .25s;
  padding: 0; pointer-events: auto;
}
.carousel__dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

.carousel__counter {
  text-align: center; font-size: 12px; color: var(--muted);
  padding-bottom: 6px; letter-spacing: .06em;
}

/* ── Recipe hero ───────────────────────── */
.recipe-hero { padding: 40px 0 0; }
.recipe-hero__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: start;
}
@media (max-width: 980px) { .recipe-hero__grid { grid-template-columns: 1fr; } }

.recipe-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 14px;
  border-radius: 999px;
}

.hero__title {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.1; font-weight: 700;
}
.hero__lead { margin: 0 0 20px; color: var(--muted); font-size: 15px; font-weight: 300; }

/* ── Stats ─────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  /*border: 1px solid var(--border);*/
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 20px;
}
@media (max-width: 480px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 12px; text-align: center; gap: 4px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: 0; }
.stat__icon { color: var(--muted); flex-shrink: 0; }
.stat__label {
  font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.stat__value { font-family: var(--font-head); font-size: 16px; font-weight: 700; }

/* ── Like overlay on carousel ───────────── */
.carousel__heart {
  position: absolute; top: 12px; right: 12px; z-index: 4;
}
.carousel__heart-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,.08); border-radius: 20px;
  padding: 6px 11px; font-size: 17px; cursor: pointer;
  color: var(--muted); transition: color .15s, background .15s;
}
.carousel__heart-btn:hover { background: #fff; }
.carousel__heart-btn--liked { color: var(--brand); }
.carousel__heart-btn span { font-size: 13px; font-weight: 700; }
.carousel__heart-display {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,.08); border-radius: 20px;
  padding: 6px 11px; font-size: 17px; color: var(--muted);
}

.login-prompt { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.login-prompt a { color: var(--brand); font-weight: 700; }


/* ── Page grid ─────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 28px 0; }
.page-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto auto;
  gap: 0; align-items: start;
  margin-top: 20px;
  padding-bottom: 64px;
}
.main-col       { grid-column: 1; grid-row: 1; }
.side-col        { grid-column: 2; grid-row: 1 / 3; }
.main-col-bottom { grid-column: 1; grid-row: 2; }

@media (max-width: 980px) {
  .page-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .main-col        { order: 2; grid-row: auto; grid-column: 1; }
  .side-col        { order: 1; grid-row: auto; grid-column: 1; border-left: 0; border-top: 1px solid var(--border); }
  .main-col-bottom { order: 3; grid-row: auto; grid-column: 1; }
}

/* ── Panel ─────────────────────────────── */
.panel {
  background: var(--bg); 
  /*border: 1px solid var(--border);*/
  margin-bottom: 0;
}
.panel + .panel { border-top: 0; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
}
.panel__head .btn { flex-shrink: 0; white-space: nowrap; max-width: 100%; }
.panel__title {
  margin: 0; font-family: var(--font-head);
  font-size: 16px; font-weight: 700;
}

/* Sidebar panels separated */
.side-col .panel { margin-bottom: 0; border-bottom: 0; }
.side-col .panel:last-child { /*border-bottom: 1px solid var(--border);*/ }
.side-col { /*border-left: 1px solid var(--border); */ }
@media (max-width: 980px) { .side-col { border-left: 0; border-top: 1px solid var(--border); } }

/* ── Steps ─────────────────────────────── */
.steps { margin: 0; padding: 0 18px 6px; list-style: none; display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 44px 1fr;
  gap: 14px; padding: 18px 0;
  border-top: 1px solid var(--border); cursor: pointer;
}
.step:first-child { border-top: 0; }
.step__badge {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--border);
  font-family: var(--font-head); font-weight: 700; font-size: 15px; flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.step__label { font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.step__text { margin: 5px 0 0; color: var(--muted); line-height: 1.7; font-size: 15px; }
.step.is-active .step__badge { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.is-active .step__text { color: var(--text); }

/* ── Comments ───────────────────────────── */
.comment-form { display: flex; flex-direction: column; gap: 10px; }
.comment-form__input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--panel-2); color: var(--text); outline: none;
  font-size: 14px; font-family: var(--font-body);
}
.comment-form__input:focus { border-color: var(--brand); }

.comments-list { display: flex; flex-direction: column; gap: 0; }
.comment {
  display: grid; grid-template-columns: 44px 1fr;
  gap: 14px; padding: 18px 0;
  border-top: 1px solid var(--border);
}
.comment:first-child { border-top: 0; }
.comment__avatar {
  width: 38px; height: 38px;
  background: var(--panel-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--muted); flex-shrink: 0;
  border-radius: 50%;
}
.comment__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.comment__meta { font-size: 12px; color: var(--muted); }
.comment__body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--brand); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; font-family: var(--font-body);
}
.link-btn:hover { text-decoration: underline; }
.comment--reply {
  margin-top: 14px; padding-top: 14px; padding-left: 14px;
  border-top: 1px solid var(--border);
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 38px 1fr; gap: 12px;
}
.reply-form { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }

/* ── Ingredients ────────────────────────── */
.ingredient-list { margin: 0; padding: 14px 18px 14px 36px; }
.ingredient-list li {
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.ingredient-list li:last-child { border-bottom: 0; }
.ing-qty { font-weight: 700; color: var(--brand); margin-right: 4px; }

/* ── Tags ───────────────────────────────── */
.tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px; }
.tag {
  padding: 5px 11px;
  border: 1px solid var(--border); background: var(--panel-2);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  transition: all .14s;
}
.tag:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* ── Share ──────────────────────────────── */
.share-btns { padding: 14px 18px; }
.icon-btn {
  padding: 10px 16px;
  border: 1px solid var(--border); background: var(--panel-2);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: all .14s; width: 100%; font-family: var(--font-body);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* ── Related recipes ────────────────────── */
.related-section {
  border-top: 1px solid var(--border);
  padding: 40px 0 64px;
}
.related-section__head {
  display: flex; align-items: center; gap: 0; margin-bottom: 0;
  padding-bottom: 0;
}
.related-section__head h2 {
  margin: 0 0 10px;
  font-family: var(--font-head); font-size: 26px; font-weight: 700;
}

.related-cards {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; background: var(--bg);
  border: none;
  margin-top: 24px;
}
@media (max-width: 1100px) { .related-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .related-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .related-cards { grid-template-columns: 1fr; } }

.r-card {
  display: block; background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: background .15s;
}
.r-card:hover { background: var(--panel-2); }
.r-card__img-wrap { height: 130px; overflow: hidden; }
.r-card__img { height: 100%; width: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.r-card:hover .r-card__img { transform: scale(1.04); }
.r-card__img--placeholder { background: var(--panel-2); height: 100%; }
.r-card__body { padding: 14px; }
.r-card__cat {
  font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 5px;
}
.r-card__title { margin: 0 0 6px; font-family: var(--font-head); font-size: 14px; line-height: 1.3; font-weight: 700; }
.r-card__meta { font-size: 13px; color: var(--gold); font-weight: 700; }
