/* Home: "Bu gün nə yeyək?" (two questions, one recipe), "Evdə nə var?" shelf, category row. */

/* ---- Bu gün nə yeyək? ---- */
/* Tasty-style: white ground, the section heading, one row of plain selects, then recipe cards like every other
   list. No coloured block, no pills. Motion only explains the change (Emil): the old row dims while the new one
   loads, the new row comes in from a light blur; buttons scale on press. */
.ask__head { margin-bottom: 24px; }
.ask__again { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; border: 0; background: none;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--c-primary-ink); cursor: pointer; transition: transform 160ms var(--ease-out); }
.ask__again { white-space: nowrap; }
.ask__again img { transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .ask__again:hover img { transform: rotate(90deg); } }
.ask__again:active { transform: scale(0.97); }
.ask__again:disabled { cursor: wait; }
.ask__bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.ask__select { appearance: none; height: 46px; min-width: 200px; padding: 0 40px 0 16px; border: 0; border-radius: 10px;
  background: #fff url("../img/icons/chevron-down.svg") right 14px center / 14px no-repeat; box-shadow: 0 0 0 1px var(--c-line);
  font: inherit; font-size: 15px; color: var(--c-ink); cursor: pointer; transition: box-shadow 150ms ease; }
@media (hover: hover) and (pointer: fine) { .ask__select:hover { box-shadow: 0 0 0 1px #9fcfc7; } }
.ask__select:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--c-primary); }
.ask__select:has(option:checked:not([value=""])) { box-shadow: 0 0 0 1.5px var(--c-primary); color: var(--c-primary-ink); font-weight: 700; }
.ask__lead { margin: -16px 0 20px; font-size: 15px; color: var(--c-muted); }
.ask__result { min-height: 200px; }
.ask__result [data-answer] { transition: opacity 200ms ease, filter 200ms ease; }
@starting-style { .ask__result [data-answer] { opacity: 0; filter: blur(4px); } }
.ask[aria-busy="true"] .ask__result [data-answer] { opacity: .45; filter: blur(2px); transition-duration: 150ms; }
.ask__empty { padding: 48px 0; color: var(--c-muted); }
@media (prefers-reduced-motion: reduce) {
  @starting-style { .ask__result [data-answer] { filter: none; } }
  .ask[aria-busy="true"] .ask__result [data-answer] { filter: none; }
  .ask__again img { transition: none; }
}

/* ---- Evdə nə var? ---- */
/* After nepisirsem.com / cooknew.ru: a box for anything not listed, ingredients in groups as text chips. */
.pantry__head { margin-bottom: 24px; }
.pantry .section-title { margin-bottom: 8px; }
.pantry__intro { color: var(--c-muted); }
.shelf__search { display: flex; gap: 12px; max-width: 720px; }
.shelf__search .input { flex: 1; min-height: 52px; background: #fff; }
.shelf__groups { display: grid; grid-template-columns: 1fr 1.6fr 1.3fr 1.3fr; gap: 20px 32px; margin-top: 28px; }
.shelf__group { border: 0; padding: 0; margin: 0; min-width: 0; }
.shelf__group legend { font-size: 14px; font-weight: 700; color: var(--c-muted); margin-bottom: 10px; }
.shelf__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.shelf__chip { cursor: pointer; }
.shelf__chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--c-line); background: #fff;
  font-weight: 600; font-size: 15px; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .shelf__chip:hover span { border-color: var(--c-primary-line); } }
.shelf__chip:active span { transform: scale(0.96); }
.shelf__chip input:checked + span { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.shelf__chip input:focus-visible + span { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.shelf__clear { border: 0; background: none; padding: 6px 0; font: inherit; font-weight: 700; color: var(--c-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .shelf__clear:hover { color: var(--c-text); } }

/* Live results under the home shelf. */
.shelf__live { margin-top: 32px; border-radius: var(--radius); background: var(--c-primary-soft); padding: 24px 28px 28px; transition: opacity 150ms ease; }
.shelf__live[aria-busy="true"] { opacity: .6; }
.shelf__hint { color: var(--c-muted); font-size: 17px; text-align: center; padding: 20px 0; }
.shelf-res__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.shelf-res__sum { font-size: 17px; }
.shelf-res__sum strong { color: var(--c-primary-dark); }
.shelf-res__tools { display: flex; align-items: baseline; gap: 20px; }
.shelf-res__all { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c-primary-dark); white-space: nowrap; }
.shelf-res__group { font-size: 16px; font-weight: 700; margin: 24px 0 12px; }
.shelf-res__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.shelf-res__item { position: relative; display: grid; align-content: start; gap: 6px; background: #fff; border-radius: 16px; padding: 10px 10px 14px; }
.shelf-res__item .shelf-res__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: 4px; }
.shelf-res__title { font-size: 15px; font-weight: 700; line-height: 1.3; padding: 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .shelf-res__item:hover .shelf-res__title { color: var(--c-primary); } }
.shelf-res__fit { font-size: 13px; color: var(--c-muted); padding: 0 4px; }

.pantry--page { display: block; margin-top: 32px; }
.pantry__title { font-size: 40px; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.pantry--page .pantry__intro { margin-bottom: 24px; }
.pantry__summary { margin: 48px 0 32px; font-size: 17px; }
.pantry__group + .pantry__group { margin-top: 64px; }
.pantry__group-title { font-size: 22px; font-weight: 700; margin-bottom: 24px; }

/* ---- Category row: one line of round photos instead of two rows of big tiles ---- */
.cat-row { display: flex; gap: 16px; justify-content: space-between; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: thin; }
.cat-row__item { flex: 0 0 112px; display: grid; justify-items: center; gap: 4px; text-align: center; scroll-snap-align: start; }
.cat-row__item .cat-row__img { width: 112px !important; height: 112px !important; border-radius: 50%; object-fit: cover; margin-bottom: 8px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .cat-row__item:hover .cat-row__img { transform: scale(1.05); } .cat-row__item:hover .cat-row__name { color: var(--c-primary); } }
.cat-row__name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.cat-row__count { font-size: 13px; color: var(--c-muted); }

@media (max-width: 960px) {
  .shelf__groups { grid-template-columns: 1fr 1fr; }
  .shelf-res__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-row { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .collection .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .ask__bar { display: grid; grid-template-columns: 1fr 1fr; }
  .ask__select { min-width: 0; width: 100%; }
  .ask__select:first-child { grid-column: 1 / -1; }
  .ask__again-more { display: none; }
  /* Two small cards a row on phones, so four suggestions fit in about one screen. */
  .ask .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .ask .card__title { font-size: 15px; }
  .ask .card__meta { font-size: 13px; }
  .shelf__search { flex-direction: column; }
  .shelf__groups { grid-template-columns: 1fr; gap: 18px; }
  .shelf__live { padding: 18px 14px 20px; margin-left: -4px; margin-right: -4px; }
  .shelf-res__list { gap: 10px; }
  .pantry__title { font-size: 28px; }
  .cat-row { gap: 18px; margin-right: -20px; padding-right: 20px; }
  .cat-row__item { flex-basis: 88px; }
  .cat-row__item .cat-row__img { width: 88px !important; height: 88px !important; }
  .cat-row__name { font-size: 13px; }
}
