/* ==========================================================================
   Blog i sekcja sklepu na stronie głównej - Born to perform

   Wszystko na zmiennych motywu i sklepu (shop.css ładuje się wcześniej):
   beżowe tło zdjęć, promień 20px kart, mięta jako kolor linków, font
   bc-novatica-cyr. Nowych kolorów ani krojów tu nie ma.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sekcja sklepu na stronie głównej
   -------------------------------------------------------------------------- */

.btp-home-shop__header {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

/* Opis pod nagłówkiem jak w sekcji CTA: bez własnego marginesu z góry,
   bo odstęp daje nagłówek. */
.btp-home-shop__text {
  margin-top: 1rem;
}

@media (max-width: 767px) {
  .btp-home-shop__header {
    margin-bottom: 2.5rem;
  }
}

/* --------------------------------------------------------------------------
   Lista wpisów
   -------------------------------------------------------------------------- */

.btp-blog-hero__eyebrow {
  margin-bottom: 0.75rem;
  color: var(--base-color-brand--mint);
}

.btp-blog-list .padding-section-medium {
  padding-top: 3rem;
}

.btp-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem var(--shop-gap--grid);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 991px) {
  .btp-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .btp-posts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
}

/* Karta wpisu: ten sam box ze zdjęciem co karta produktu, tylko poziomy. */
.btp-post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.btp-post-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--shop-radius--card);
  background-color: var(--shop-color--product-media-bg);
}

.btp-post-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.btp-post-card:hover .btp-post-card__media img {
  transform: scale(1.03);
}

/* Wpis bez zdjęcia: logo na beżowym tle zamiast pustego boxu. */
.btp-post-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.btp-post-card .btp-post-card__placeholder img {
  width: 45%;
  height: auto;
  object-fit: contain;
  opacity: 0.35;
}

.btp-post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btp-post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 0;
  color: var(--base-color-brand--text-color);
  font-size: 0.875rem;
  line-height: 1.5;
}

.btp-post-card__category {
  color: var(--base-color-brand--mint);
  font-weight: 500;
}

.btp-post-card__title {
  margin: 0;
  font-family: bc-novatica-cyr, sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
  text-wrap: balance;
}

.btp-post-card__title a {
  color: var(--text-color--text-primary);
  text-decoration: none;
}

/* Link w tytule rozciągnięty na całą kartę, bez zagnieżdżania linków. */
.btp-post-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.btp-post-card:hover .btp-post-card__title a {
  color: var(--base-color-brand--mint);
}

.btp-post-card__title a:focus-visible {
  outline: none;
}

.btp-post-card:has(.btp-post-card__title a:focus-visible) {
  outline: 2px solid var(--base-color-brand--mint);
  outline-offset: 6px;
  border-radius: var(--shop-radius--card);
}

.btp-post-card__excerpt {
  margin: 0;
  color: var(--base-color-brand--text-color);
  font-size: 1rem;
  line-height: 1.5;
}

/* Stronicowanie: pigułki jak filtry. */
.btp-pagination {
  margin-top: 4rem;
}

.btp-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.btp-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  color: var(--text-color--text-primary);
  font-family: bc-novatica-cyr, sans-serif;
  text-decoration: none;
}

.btp-pagination a.page-numbers:hover {
  border-color: var(--base-color-brand--mint);
  color: var(--base-color-brand--mint);
}

.btp-pagination .page-numbers.current {
  border-color: var(--shop-color--accent);
  background-color: var(--shop-color--accent);
  color: var(--base-color-neutral--white);
}

.btp-pagination .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* --------------------------------------------------------------------------
   Pojedynczy wpis
   -------------------------------------------------------------------------- */

.btp-post__header,
.btp-post__content,
.btp-post__products {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

.btp-post__header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.btp-post__crumbs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btp-post__crumbs a {
  color: var(--base-color-brand--mint);
  text-decoration: none;
}

.btp-post__crumbs a:hover {
  color: var(--base-color-brand--dark-mint);
}

.btp-post__title {
  margin: 0;
  text-wrap: balance;
}

.btp-post__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  color: var(--base-color-brand--text-color);
  font-size: 0.9375rem;
}

.btp-post__image {
  max-width: 64rem;
  margin: 0 auto 3rem;
  overflow: hidden;
  border-radius: var(--shop-radius--card);
  background-color: var(--shop-color--product-media-bg);
}

.btp-post__image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 36rem;
  object-fit: cover;
}

/* Treść z edytora bloków. */
.btp-post__content {
  color: var(--text-color--text-primary);
  font-size: 1.125rem;
  line-height: 1.7;
}

.btp-post__content > * {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.btp-post__content h2,
.btp-post__content h3,
.btp-post__content h4 {
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  font-family: bc-novatica-cyr, sans-serif;
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}

.btp-post__content h2 { font-size: 1.75rem; }
.btp-post__content h3 { font-size: 1.375rem; }
.btp-post__content h4 { font-size: 1.125rem; }

.btp-post__content a {
  color: var(--base-color-brand--mint);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.btp-post__content a:hover {
  color: var(--base-color-brand--dark-mint);
}

.btp-post__content ul,
.btp-post__content ol {
  padding-left: 1.5rem;
}

.btp-post__content li {
  margin-bottom: 0.5rem;
}

.btp-post__content li::marker {
  color: var(--base-color-brand--mint);
}

.btp-post__content blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  border: 0;
  border-radius: var(--shop-radius--card);
  background-color: var(--shop-color--product-media-bg);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
}

.btp-post__content blockquote p:last-child {
  margin-bottom: 0;
}

.btp-post__content blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  font-style: normal;
  font-weight: 400;
  color: var(--base-color-brand--text-color);
}

.btp-post__content figure {
  margin-left: 0;
  margin-right: 0;
}

.btp-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--shop-radius--card);
}

.btp-post__content figcaption {
  margin-top: 0.5rem;
  color: var(--base-color-brand--text-color);
  font-size: 0.875rem;
  text-align: center;
}

.btp-post__content hr {
  margin: 3rem auto;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Polecane produkty pod wpisem: karty sklepu w węższej kolumnie. */
.btp-post__products {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btp-post__section-title {
  margin: 0 0 2rem;
  text-align: center;
}

.btp-post__products ul.products {
  justify-content: center;
}

.woocommerce .btp-post__products ul.products.columns-1,
.btp-post__products ul.products.columns-1 {
  grid-template-columns: minmax(0, 18rem);
}

.woocommerce .btp-post__products ul.products.columns-2,
.btp-post__products ul.products.columns-2 {
  grid-template-columns: repeat(2, minmax(0, 18rem));
}

.woocommerce .btp-post__products ul.products.columns-3,
.btp-post__products ul.products.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767px) {
  .btp-post__header {
    margin-bottom: 2rem;
  }

  .btp-post__image {
    margin-bottom: 2rem;
  }

  .btp-post__content {
    font-size: 1rem;
  }

  .btp-post__content h2 { font-size: 1.5rem; }
  .btp-post__content h3 { font-size: 1.25rem; }

  .woocommerce .btp-post__products ul.products.columns-1,
  .btp-post__products ul.products.columns-1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 18rem;
    margin: 0 auto;
  }

  .woocommerce .btp-post__products ul.products.columns-2,
  .woocommerce .btp-post__products ul.products.columns-3,
  .btp-post__products ul.products.columns-2,
  .btp-post__products ul.products.columns-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* "Czytaj dalej" pod wpisem. */
.btp-post-more {
  background-color: var(--base-color-neutral--white, #fff);
}

.btp-post-more__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btp-post-more__header h2 {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .btp-post-card__media img {
    transition: none;
  }

  .btp-post-card:hover .btp-post-card__media img {
    transform: none;
  }
}

/* Filtry kategorii w sekcji sklepu: te same pigułki co w sklepie, nad kartami. */
.btp-home-shop .btp-home-shop__filters {
  margin: 0 0 2.5rem;
}

/* Bez JavaScriptu widać tylko polecane; filtry działają wtedy jak linki. */
.btp-home-shop__products:not(.is-js) li.product:not(.featured) {
  display: none;
}

.btp-home-shop__products li.product[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .btp-home-shop .btp-home-shop__filters {
    margin-bottom: 2rem;
  }
}
