/* Foodbooki: prezentacja kategorii i opisy produktów. */

.wm-foodbook-category-intro {
  max-width: 42rem;
  color: var(--wm-muted);
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.6;
}

.wm-foodbook-category-intro p {
  margin: 0;
}

.wm-foodbook-category-shell > .wm-foodbook-catalog {
  margin-block: var(--wp--preset--spacing--80) 0 !important;
}

.wm-foodbook-catalog .wc-block-product-template {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--wp--preset--spacing--80);
  margin: 0;
  padding: 0;
}

.wm-foodbook-catalog .wc-block-product {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--wm-surface);
}

.wm-foodbook-catalog .wm-foodbook-catalog__cover {
  display: grid;
  align-items: center;
  padding: var(--wp--preset--spacing--70);
  margin: 0;
}

.wm-foodbook-catalog__cover a {
  display: block;
  width: 100%;
  max-width: 25rem;
  margin-inline: auto;
}

.wm-foodbook-catalog__cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.wm-foodbook-catalog__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--wp--preset--spacing--50);
  min-width: 0;
  padding: var(--wp--preset--spacing--80);
}

.wm-foodbook-catalog__info > * {
  margin: 0;
}

.wm-foodbook-catalog__format {
  color: var(--wm-yellow);
  font-size: var(--wp--preset--font-size--small);
}

.wm-foodbook-catalog__title {
  font-size: clamp(2rem, 3.4vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.wm-foodbook-catalog__title a {
  color: inherit;
  text-decoration: none;
}

.wm-foodbook-catalog__title a:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.wm-foodbook-catalog__info .wp-block-woocommerce-product-summary {
  max-width: 38rem;
  color: #d9d9d9;
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.65;
}

.wm-foodbook-catalog__info .wc-block-components-product-summary {
  margin: 0;
  text-align: left;
}

.wm-foodbook-catalog__info .wc-block-components-product-summary > :first-child {
  margin-top: 0;
}

.wm-foodbook-catalog__info .wc-block-components-product-summary > :last-child {
  margin-bottom: 0;
}

.wm-foodbook-catalog__info ul {
  padding-left: 1.2em;
}

.wm-foodbook-catalog__info li + li {
  margin-top: 0.6em;
}

.wm-foodbook-catalog__price {
  font-family: var(--wm-display);
  font-weight: 600;
}

.wm-foodbook-catalog__actions {
  gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
  align-items: center;
}

.wm-foodbook-catalog__actions > * {
  margin: 0;
}

.wm-foodbook-catalog__buy .wc-block-components-product-button__button {
  min-height: 56px;
  background: var(--wm-yellow) !important;
  color: var(--wm-black) !important;
}

.wm-foodbook-catalog__buy .wc-block-components-product-button__button:hover {
  background: var(--wm-white) !important;
}

.wm-foodbook-catalog__details {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--wm-white);
  font-size: var(--wp--preset--font-size--small);
  text-decoration: underline;
}

/* Ten sam katalog obsługuje również kolejne foodbooki i pustą kategorię. */
.wm-foodbook-catalog .wc-block-product-collection-no-results {
  max-width: var(--wp--style--global--content-size);
}

@media (max-width: 1023px) {
  .wm-foodbook-catalog__info {
    padding: var(--wp--preset--spacing--60);
  }

  .wm-foodbook-catalog .wm-foodbook-catalog__cover {
    padding: var(--wp--preset--spacing--50);
  }
}

@media (max-width: 781px) {
  .wm-foodbook-catalog .wc-block-product {
    grid-template-columns: minmax(0, 1fr);
  }

  .wm-foodbook-catalog__cover a {
    max-width: 17rem;
  }

  .wm-foodbook-catalog__info {
    align-items: stretch;
  }

  .wm-foodbook-catalog__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wm-foodbook-catalog__buy .wc-block-components-product-button__button {
    width: 100%;
  }

  .wm-foodbook-catalog__details {
    justify-content: center;
  }
}

/* Opis foodbooka na stronie produktu. */
.wm-foodbook-buy {
  background: #fdf06f;
  border: 2px solid #fdf06f;
  color: #000 !important;
  display: inline-block;
  font-family: var(--wp--preset--font-family--heading-font);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1.2;
  padding: 16px 22px;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}

.wm-foodbook-buy:hover,
.wm-foodbook-buy:focus-visible {
  background: #fff;
  border-color: #fff;
  color: #000 !important;
}

.single-product .wm-foodbook-content {
  box-sizing: border-box;
  left: 50%;
  max-width: none;
  position: relative;
  transform: translateX(-50%);
  width: min(1400px, calc(100vw - 64px));
}

.single-product .wm-foodbook-content section {
  box-sizing: border-box;
  margin: 0;
  padding: clamp(52px, 6vw, 84px) clamp(24px, 5vw, 70px);
}

.single-product .wm-foodbook-content p {
  font-size: 1.04rem;
  line-height: 1.72;
  max-width: 72ch;
}

.wm-foodbook-kicker {
  font-family: var(--wp--preset--font-family--heading-font);
  font-size: .76rem !important;
  font-weight: 700;
  letter-spacing: .16em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.wm-foodbook-content h2 {
  font-size: clamp(2.15rem, 4.8vw, 4.6rem);
  letter-spacing: -.05em;
  line-height: .98;
  margin: 0 0 28px;
  max-width: 17ch;
  text-transform: uppercase;
}

.wm-foodbook-lead {
  font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
  line-height: 1.55 !important;
}

.wm-foodbook-band,
.wm-foodbook-end {
  background: #000;
  color: #fff;
}

/* Extend the background while keeping the existing content width. */
.single-product .wm-foodbook-content :is(.wm-foodbook-band, .wm-foodbook-end) {
  border-image: linear-gradient(#000 0 0) fill 0 // 0 100vmax;
}

.single-product .wm-foodbook-content .wm-foodbook-fit {
  border-image: linear-gradient(#f4f4f2 0 0) fill 0 // 0 100vmax;
}

.wm-foodbook-band .wm-foodbook-kicker,
.wm-foodbook-end .wm-foodbook-kicker {
  color: #fdf06f;
}

.wm-foodbook-band h2,
.wm-foodbook-end h2 {
  color: #fff;
}

.wm-foodbook-grid {
  display: grid;
  gap: var(--wp--preset--spacing--30);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 38px;
}

.wm-foodbook-grid article {
  background: #f4f4f2;
  padding: clamp(22px, 2.5vw, 32px);
}



.wm-foodbook-grid span {
  display: block;
  font-family: var(--wp--preset--font-family--heading-font);
  font-size: .85rem;
  letter-spacing: .14em;
  margin-bottom: 30px;
}

.wm-foodbook-content h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
  text-transform: uppercase;
}

.wm-foodbook-grid article p {
  font-size: .98rem;
  margin-bottom: 0;
}

.wm-foodbook-fit {
  background: #f4f4f2;
}

.wm-foodbook-faq > div {
  border-top: 1px solid var(--wp--preset--color--hairline, #e3e3e0);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  padding: 20px 0;
}

.wm-foodbook-faq h3,
.wm-foodbook-faq p {
  margin: 0;
}

.wm-foodbook-end .wm-foodbook-buy {
  margin-top: 18px;
}

.postid-1571 .wp-block-woocommerce-product-details ~ .wp-block-heading,
.postid-1571 .wp-block-woocommerce-product-details ~ .wp-block-woocommerce-product-collection {
  display: none;
}

.postid-1571 .woocommerce.product > .wp-block-group,
.postid-1571 .woocommerce.product .woocommerce-tabs,
.postid-1571 .woocommerce-Tabs-panel {
  margin-bottom: 0 !important;
}

@media (max-width: 760px) {
  .postid-1571 {
    --wp--custom--gap--horizontal: 20px;
  }

  .single-product .wm-foodbook-content {
    width: calc(100vw - 32px);
  }

  .single-product .wm-foodbook-content section {
    padding: 36px 12px;
  }

  .wm-foodbook-content :is(h2, h3) {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .wm-foodbook-content h2 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    line-height: 1.05;
  }

  .wm-foodbook-content p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .wm-foodbook-grid {
    margin-top: 24px;
  }

  .wm-foodbook-grid article {
    padding: 20px;
  }

  .wm-foodbook-grid span {
    margin-bottom: 18px;
  }

  .wm-foodbook-grid,
  .wm-foodbook-faq > div {
    grid-template-columns: 1fr;
  }


}
