/*
 * Przepisy (tgrecipes) – strony /przepisy, kategorie, przepis, bloki na stronie głównej i karcie produktu.
 * Mobile first; kolory jak w mobile.css motywu (zielony #6dac23 / #4d8a14, tekst #2e2e2e).
 * Stepper „− ilość +” i napis „W koszyku” stylizuje mobile.css motywu (.tm-stepper, .tm-incart).
 */

.tgr {
  color: #2e2e2e;
}
.page-content.tgr {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.tgr-h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
}
.tgr-lead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-line;
}
.tgr-hint {
  margin: -4px 0 12px;
  color: #8a8a8a;
  font-size: 13px;
}
.tgr-empty {
  padding: 24px 16px;
  text-align: center;
  color: #8a8a8a;
  background: #f7f7f7;
  border-radius: 8px;
}

/* ---------- siatki kafelków ---------- */

.tgr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (min-width: 576px) {
  .tgr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .tgr-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tgr-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- zdjęcia ---------- */

.tgr picture,
.tgr picture img {
  display: block;
  width: 100%;
  height: 100%;
}
.tgr picture img {
  object-fit: cover;
}
.tgr-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #6dac23;
  background: #eef6e4;
}
.tgr-noimg .material-icons {
  font-size: 48px;
}

/* ---------- kafelek przepisu ---------- */

.tgr-card {
  min-width: 0;
}
.tgr-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  color: inherit;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.tgr-card__link:hover,
.tgr-card__link:focus-visible {
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}
.tgr-card__link:focus-visible {
  outline: 2px solid #6dac23;
  outline-offset: 2px;
}
.tgr-card__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f4f9ee;
}
.tgr-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px;
}
.tgr-card__category {
  color: #4d8a14;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.tgr-card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.tgr-card__intro {
  display: -webkit-box;
  overflow: hidden;
  color: #555;
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.tgr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: auto;
  padding-top: 6px;
  color: #8a8a8a;
  font-size: 13px;
}
.tgr-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tgr-meta .material-icons {
  font-size: 16px;
}

/* ---------- kafelek kategorii ---------- */

.tgr-cat {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  color: #fff;
  background: #eef6e4;
  border-radius: 10px;
}
.tgr-cat__media {
  position: absolute;
  inset: 0;
}
.tgr-cat__media picture img {
  transition: transform .4s ease;
}
.tgr-cat:hover .tgr-cat__media picture img,
.tgr-cat:focus-visible .tgr-cat__media picture img {
  transform: scale(1.04);
}
.tgr-cat__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
}
.tgr-cat__name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.tgr-cat__count {
  font-size: 13px;
  opacity: .9;
}
.tgr-cat:hover,
.tgr-cat:focus-visible {
  color: #fff;
  text-decoration: none;
}
.tgr-cat:focus-visible {
  outline: 2px solid #6dac23;
  outline-offset: 2px;
}

/* ---------- kategorie (pigułki), paginacja ---------- */

.tgr-pills {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.tgr-pill {
  flex: 0 0 auto;
  display: inline-block;
  padding: 6px 14px;
  color: #2e2e2e;
  font-size: 14px;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
}
.tgr-pill:hover,
.tgr-pill:focus-visible {
  color: #4d8a14;
  text-decoration: none;
  border-color: #6dac23;
}
.tgr-pill.is-current {
  color: #fff;
  background: #6dac23;
  border-color: #6dac23;
}
.tgr-pill--sm {
  padding: 3px 10px;
  margin: 0 6px 6px 0;
  font-size: 12px;
}
.tgr-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 24px;
}
.tgr-pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  color: #2e2e2e;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
}
.tgr-pagination__link.is-current {
  color: #fff;
  font-weight: 700;
  background: #6dac23;
  border-color: #6dac23;
}
.tgr-pagination a.tgr-pagination__link:hover {
  color: #4d8a14;
  text-decoration: none;
  border-color: #6dac23;
}

/* ---------- strona przepisu ---------- */

.tgr-preview {
  margin-bottom: 16px;
}
.tgr-recipe__top {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}
.tgr-recipe__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f4f9ee;
  border-radius: 12px;
}
.tgr-recipe__cats {
  margin: 0 0 8px;
}
.tgr-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.tgr-facts div {
  padding: 10px 12px;
  background: #f4f9ee;
  border-radius: 8px;
}
.tgr-facts dt {
  color: #4d8a14;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.tgr-facts dd {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
}
.tgr-recipe__body {
  display: grid;
  gap: 28px;
  margin-bottom: 20px;
}
.tgr-content {
  font-size: 15px;
  line-height: 1.65;
}
.tgr-content ol,
.tgr-content ul {
  padding-left: 1.4em;
}
.tgr-content ol > li {
  margin-bottom: 10px;
  padding-left: 4px;
}
.tgr-content ol > li::marker {
  color: #4d8a14;
  font-weight: 700;
}
.tgr-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.tgr-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4d8a14;
  font-weight: 600;
}

@media (min-width: 768px) {
  .tgr-recipe__top {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
  }
  .tgr-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .tgr-recipe__body {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ---------- składniki ---------- */

.tgr-ings {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tgr-ing {
  border-bottom: 1px solid #eaeaea;
}
.tgr-ing:last-child {
  border-bottom: 0;
}
.tgr-ing__item {
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr);
  grid-template-areas:
    "thumb info"
    "thumb side";
  gap: 6px 12px;
  align-items: center;
  padding: 10px 0;
}
.tgr-ing__item--text {
  grid-template-columns: 49px minmax(0, 1fr);
  grid-template-areas: "thumb info";
  padding: 8px 0;
}
.tgr-ing__thumb,
.tgr-ing__dot {
  grid-area: thumb;
  align-self: start;
}
.tgr-ing__thumb img {
  display: block;
  width: 49px;
  height: 67px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
}
.tgr-ing__dot {
  justify-self: center;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: #6dac23;
  border-radius: 50%;
}
.tgr-ing__info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
/* 1. linia: składnik i ilość z przepisu */
/* zwykły tekst w linii (nie flex): „Do przepisu” stoi tuż za nazwą także w wąskiej kolumnie na
   komputerze, a do nowej linii przechodzi dopiero, gdy nie mieści się nawet sama ilość */
.tgr-ing__head {
  display: block;
  line-height: 1.4;
}
.tgr-ing__head .tgr-ing__amount {
  margin-left: 8px;
  white-space: nowrap;
}
.tgr-ing__name {
  color: #2e2e2e;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.tgr-ing__amount {
  color: #4d8a14;
  font-weight: 600;
}
.tgr-ing__lbl {
  color: #6b6b6b;
  font-size: 12px;
  font-weight: 500;
}
/* 2. linia: co dokładnie kupuje klient (produkt, wariant/opakowanie) */
.tgr-ing__pack {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.tgr .tgr-ing__pname {
  color: #2e2e2e;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #c9c9c9;
  text-underline-offset: 2px;
}
.tgr .tgr-ing__pname:hover {
  color: #4d8a14;
  text-decoration-color: currentColor;
}
.tgr-ing__variant {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #eef6e4;
  color: #3f7a10;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tgr-ing__variants {
  margin-left: 4px;
  color: #6b6b6b;
}
/* 3. linia: cena za sztukę (opakowanie) i cena za kg/l */
.tgr-ing__price {
  font-size: 14px;
  font-weight: 700;
}
.tgr-ing__per {
  font-size: 12px;
  font-weight: 500;
  color: #6b6b6b;
}
.tgr-ing__regular {
  margin-left: 6px;
  color: #8a8a8a;
  font-weight: 400;
}
.tgr-ing__unit {
  margin-left: 6px;
  color: #6b6b6b;
  font-size: 12px;
  font-weight: 500;
}
/* wyjaśnienie nad listą składników */
.tgr-pack-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f9f1;
  color: #4a4a4a;
  font-size: 13px;
  line-height: 1.4;
}
.tgr-pack-note .material-icons {
  flex: 0 0 auto;
  color: #6dac23;
  font-size: 18px;
}
.tgr-ing__side {
  grid-area: side;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.tgr-ing__actions {
  display: flex;
  align-items: center;
}
.tgr-ing__form {
  display: flex;
  align-items: center;
  margin: 0;
}
.tgr .tgr-ing__add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  font-size: 14px;
  text-transform: none;
  white-space: nowrap;
  border-radius: 8px;
}
.tgr .tgr-ing__add .material-icons {
  font-size: 18px;
}
.tgr-ing__side .tm-incart {
  margin: 0;
}
.tgr-ing__na {
  color: #b3261e;
  font-size: 13px;
  font-weight: 600;
}
.tgr-ing__more {
  color: #4d8a14;
  font-size: 13px;
  text-decoration: underline;
}

/* „Wybierz” – jak na listach produktów (mobile.css: .products .product-miniature .tm-choose) */
.tgr .tgr-ing .tm-choose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 25px;
  background: #f5f5f5;
  color: #2e2e2e;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-transform: none;
  box-shadow: none;
}
.tgr .tgr-ing .tm-choose:hover,
.tgr .tgr-ing .tm-choose:focus-visible,
.tgr .tgr-ing .tm-choose[aria-expanded="true"] {
  background: #6dac23;
  color: #fff;
}
.tgr .tgr-ing .tm-choose:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
.tgr .tgr-ing .tm-choose:focus-visible {
  outline: 2px solid #3f7a10;
  outline-offset: 2px;
}

/* Panel wyboru wariantu (assets/js/cart-stepper.js, .tm-vpick) – wygląd jak na listach produktów,
   ale rozwija się pod składnikiem (cały wiersz siatki), a nie zakrywa karty. */
.tgr .tgr-ing .tm-vpick {
  grid-column: 1 / -1;
  grid-row: auto;
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  text-align: left;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  color: #2e2e2e;
  font-size: 20px;
  line-height: 32px;
  cursor: pointer;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__close:hover,
.tgr .tgr-ing .tm-vpick .tm-vpick__close:focus-visible {
  background: #eef6e4;
  color: #4d8a14;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 18px;
  background: #fff;
  color: #2e2e2e;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__opt:hover {
  border-color: #6dac23;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__opt[aria-checked="true"] {
  border-color: #6dac23;
  background: #6dac23;
  color: #fff;
}
.tgr .tgr-ing .tm-vpick button:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__opt:focus-visible,
.tgr .tgr-ing .tm-vpick .tm-vpick__close:focus-visible,
.tgr .tgr-ing .tm-vpick .tm-vpick__buy .add-to-cart:focus-visible {
  outline: 2px solid #3f7a10;
  outline-offset: 2px;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__buy {
  flex: 0 1 220px;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__buy .add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 25px;
  background: #6dac23;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-transform: none;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__buy .add-to-cart::before,
.tgr .tgr-ing .tm-vpick .tm-vpick__buy .add-to-cart::after {
  content: none;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__buy .add-to-cart:hover {
  background: #4d8a14;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__buy .add-to-cart:disabled {
  background: #e3e3e3;
  color: #8a8a8a;
  cursor: not-allowed;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__buy .tm-stepper {
  width: 100%;
}
.tgr .tgr-ing .tm-vpick .tm-vpick__buy .tm-incart {
  text-align: right;
}
@media (prefers-reduced-motion: no-preference) {
  .tgr .tgr-ing .tm-vpick {
    animation: tm-vpick-in 0.16s ease-out;
  }
}

@media (min-width: 576px) {
  .tgr-ing__item {
    grid-template-columns: 49px minmax(0, 1fr) auto;
    grid-template-areas: "thumb info side";
  }
  .tgr-ing__side {
    justify-content: flex-end;
    max-width: 220px;
  }
  .tgr-ing__side .tm-incart {
    flex-basis: 100%;
    text-align: right;
  }
}

/* ---------- bloki: strona główna, karta produktu, stopka ---------- */

.tgr-block {
  clear: both;
  margin: 32px 0;
}
.tgr-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 14px;
}
.tgr-block__head .tgr-h2 {
  margin: 0;
}
.tgr-block__all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4d8a14;
  font-weight: 600;
}
.tgr-block__all .material-icons {
  font-size: 18px;
}
.tgr-block .tgr-grid {
  margin-bottom: 0;
}

/* ---------- zakładka „Przepisy” na karcie produktu (displayProductExtraContent) ---------- */

.tgr-tab .tgr-block--product {
  margin: 0;
  padding-top: 8px;
}
