/* ============================================================
   STOLMAR BLOCKS — Frontend CSS
   Używa CSS zmiennych z infology_pro (--color-primary itd.)
   Fallbacki zapewniają działanie bez wtyczki infology.
   ============================================================ */

:root {
  --stlm-primary:    var(--color-primary,   #82B635);
  --stlm-secondary:  var(--color-secondary, #F2F7EA);
  --stlm-dark:       var(--color-accent,    #2A2622);
  --stlm-text:       var(--color-text,      #2A2622);
  --stlm-heading:    var(--color-heading,   #2A2622);
  --stlm-border:     var(--color-border,    #E5EDD5);
  --stlm-bg:         var(--color-bg,        #FFFFFF);
  --stlm-success:    var(--color-success,   #10B981);
  --stlm-font-body:  var(--font-body,       system-ui, sans-serif);
  --stlm-font-head:  var(--font-heading,    system-ui, sans-serif);
  --stlm-radius:     var(--radius-button,   8px);
  --stlm-block-gap:  48px;
}

/* ─── WSPÓLNE ─────────────────────────────────────────────── */
.stlm-block {
  margin-bottom: var(--stlm-block-gap);
  font-family: var(--stlm-font-body);
  color: var(--stlm-text);
  line-height: 1.7;
}

.stlm-block:last-child { margin-bottom: 0; }

.stlm-col__title {
  font-family: var(--stlm-font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--stlm-heading);
  margin: 0 0 .75rem 0;
}

.stlm-col__body p   { margin: 0 0 .85em; }
.stlm-col__body p:last-child { margin-bottom: 0; }
.stlm-col__body ul  { padding-left: 1.4em; margin: 0 0 .85em; }
.stlm-col__body li  { margin-bottom: .35em; }

.stlm-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.stlm-block-img--rounded {
  border-radius: calc(var(--stlm-radius) * 1.5);
}

/* ─── HERO ────────────────────────────────────────────────── */
.stlm-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--stlm-dark);
  background-size: cover;
  background-position: center;
  min-height: 480px;
  border-radius: var(--stlm-radius);
  overflow: hidden;
}

.stlm-hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--stlm-dark);
  pointer-events: none;
}

.stlm-hero__inner {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem;
  max-width: 720px;
  width: 100%;
}

.stlm-hero--align-center .stlm-hero__inner { text-align: center; margin: 0 auto; }
.stlm-hero--align-right  .stlm-hero__inner { text-align: right;  margin-left: auto; }
.stlm-hero--align-left   .stlm-hero__inner { text-align: left; }

.stlm-hero__title {
  font-family: var(--stlm-font-head);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 .5rem;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.stlm-hero__subtitle {
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.88);
  margin: 0 0 1.5rem;
}

.stlm-hero__cta {
  display: inline-block;
  padding: .75rem 2rem;
  background: var(--stlm-primary);
  color: #fff;
  border-radius: var(--stlm-radius);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: background .2s, transform .15s;
  letter-spacing: .02em;
}
.stlm-hero__cta:hover {
  background: color-mix(in srgb, var(--stlm-primary) 85%, #000);
  transform: translateY(-1px);
  color: #fff;
}

/* ─── NAGŁÓWKI ────────────────────────────────────────────── */
.stlm-heading {
  font-family: var(--stlm-font-head);
  font-weight: 700;
  color: var(--stlm-heading);
  margin: 0 0 1rem;
  line-height: 1.25;
}
.stlm-heading--h1 { font-size: clamp(2rem,   5vw, 3.25rem); }
.stlm-heading--h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
.stlm-heading--h3 { font-size: clamp(1.3rem, 3vw, 2rem);   }
.stlm-heading--h4 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
.stlm-heading--h5 { font-size: 1.15rem; }
.stlm-heading--h6 { font-size: 1rem;    }
.stlm-heading--center { text-align: center; }
.stlm-heading--right  { text-align: right; }

/* ─── LAYOUT 2-KOLUMNOWY (baza dla tf, ft, tt) ───────────── */
.stlm-tf, .stlm-ft, .stlm-tt {
  display: grid;
  gap: var(--stlm-col-gap, 40px);
  align-items: start;
}
.stlm-tf--valign-center,
.stlm-ft--valign-center,
.stlm-tt--valign-center { align-items: center; }
.stlm-tf--valign-bottom,
.stlm-ft--valign-bottom,
.stlm-tt--valign-bottom { align-items: end; }

/* TF — tekst lewa, foto prawa */
.stlm-tf {
  grid-template-columns: 1fr var(--stlm-img-ratio, 55%);
}
/* FT — foto lewa, tekst prawa */
.stlm-ft {
  grid-template-columns: var(--stlm-img-ratio, 55%) 1fr;
}
/* TT — dwie kolumny tekstu */
.stlm-tt {
  grid-template-columns: 1fr 1fr;
}

/* ─── FOTO | FOTO ─────────────────────────────────────────── */
.stlm-ff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--stlm-col-gap, 20px);
}
.stlm-ff__item {
  margin: 0;
}
.stlm-ff__caption {
  font-size: .875rem;
  color: #666;
  text-align: center;
  margin: .5rem 0 0;
}

/* ─── CECHY ───────────────────────────────────────────────── */
.stlm-features { }
.stlm-features__title {
  font-family: var(--stlm-font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--stlm-heading);
  margin: 0 0 1.25rem;
}
.stlm-features__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
}
.stlm-features--cols-2 .stlm-features__list { grid-template-columns: 1fr 1fr; }
.stlm-features--cols-3 .stlm-features__list { grid-template-columns: 1fr 1fr 1fr; }

/* Styl: karta */
.stlm-features__item--card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: var(--stlm-secondary);
  border-radius: var(--stlm-radius);
  border: 1px solid var(--stlm-border);
  transition: box-shadow .2s, transform .15s;
}
.stlm-features__item--card:hover {
  box-shadow: 0 4px 16px rgba(130,182,53,.18);
  transform: translateY(-2px);
}

/* Styl: lista */
.stlm-features__item--list {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--stlm-border);
}
.stlm-features__item--list:last-child { border-bottom: none; }

/* Styl: minimal */
.stlm-features__item--minimal {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}

.stlm-features__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1.2;
}
.stlm-features__text {
  font-size: .97rem;
  color: var(--stlm-text);
  font-weight: 500;
  line-height: 1.4;
}

/* ─── TABELA ──────────────────────────────────────────────── */
.stlm-table__title {
  font-family: var(--stlm-font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--stlm-heading);
  margin: 0 0 1rem;
}
.stlm-table__wrap {
  overflow-x: auto;
  border-radius: var(--stlm-radius);
  border: 1px solid var(--stlm-border);
}
.stlm-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.stlm-table thead th {
  padding: .75rem 1rem;
  background: var(--stlm-primary);
  color: #fff;
  font-weight: 700;
  text-align: left;
  font-size: .875rem;
  letter-spacing: .03em;
}
.stlm-table__key {
  padding: .65rem 1rem;
  font-weight: 600;
  color: var(--stlm-dark);
  width: 40%;
}
.stlm-table__val {
  padding: .65rem 1rem;
  color: var(--stlm-text);
}
.stlm-table--striped .stlm-table__row--even td { background: var(--stlm-secondary); }
.stlm-table--bordered td,
.stlm-table--bordered th { border-bottom: 1px solid var(--stlm-border); }
.stlm-table--bordered tbody tr:last-child td { border-bottom: none; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .stlm-tf,
  .stlm-ft  { grid-template-columns: 1fr !important; }
  .stlm-tt  { grid-template-columns: 1fr !important; }
  .stlm-ff  { grid-template-columns: 1fr !important; }

  .stlm-ft > .stlm-ft__img { order: -1; }

  .stlm-features--cols-2 .stlm-features__list,
  .stlm-features--cols-3 .stlm-features__list { grid-template-columns: 1fr; }

  .stlm-hero { min-height: 300px !important; }
  .stlm-hero__inner { padding: 2rem 1.25rem; }

  :root { --stlm-block-gap: 32px; }
}

/* ═══════════════════════════════════════════════════════════════
   Infology Block — style faktycznego HTML (klasy .inflg-*)
   Shortcode generuje .inflg-*, a starszy CSS był dla .stlm-*
   (rozjazd po refaktorze) — bez tego bloki układały się pionowo.
   ═══════════════════════════════════════════════════════════════ */
/* Szerokość treści opisu jak na Allegro — węziej i wyśrodkowane, żeby zdjęcia nie były gigantyczne */
.inflg-block { max-width: 880px; margin: 28px auto; }
.inflg-block:first-child { margin-top: 0; }
.inflg-block:last-child { margin-bottom: 0; }
.inflg-ff__figure img, .inflg-tf__figure img { max-height: 560px; object-fit: contain; }
.inflg-img { max-width: 100%; height: auto; display: block; }

/* Foto|Tekst / Tekst|Foto — 2 kolumny (kierunek wg kolejności w HTML) */
.inflg-tf { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.inflg-tf__figure { margin: 0; }
.inflg-tf__figure img { width: 100%; height: auto; display: block; border-radius: 10px; }
.inflg-tf__text > :first-child { margin-top: 0; }
.inflg-tf__text > :last-child { margin-bottom: 0; }
.inflg-tf__caption, .inflg-ff__caption { font-size: .875rem; color: #666; margin: .5rem 0 0; text-align: center; }

/* Tekst|Tekst — 2 kolumny */
.inflg-tt { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.inflg-tt__col-title { font-weight: 700; margin: 0 0 .6rem; }
.inflg-tt__content > :first-child { margin-top: 0; }

/* Foto|Foto — 2 kolumny */
.inflg-ff { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.inflg-ff__figure { margin: 0; }
.inflg-ff__figure img { width: 100%; height: auto; display: block; border-radius: 10px; }

/* Cechy */
.inflg-features__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.inflg-features__item { display: flex; gap: 12px; align-items: flex-start; }
.inflg-features__icon { flex: 0 0 auto; font-size: 22px; line-height: 1.2; color: #5f9136; }
.inflg-features__icon svg { width: 24px; height: 24px; }
.inflg-features__title { font-weight: 700; margin: 0 0 2px; }
.inflg-features__text { margin: 0; color: #555; }

/* Nagłówek bloku */
.inflg-heading { font-weight: 800; line-height: 1.25; margin: 0 0 .8rem; }
.inflg-heading--h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.inflg-heading--h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
.inflg-heading--h3 { font-size: clamp(1.25rem, 3vw, 1.8rem); }
.inflg-heading--h4 { font-size: 1.3rem; }
.inflg-heading--h5 { font-size: 1.1rem; }
.inflg-heading--h6 { font-size: 1rem; }

/* Tabela / specyfikacja */
.inflg-specs__title { font-weight: 700; font-size: 1.2rem; margin: 0 0 .8rem; }
.inflg-specs__table { width: 100%; border-collapse: collapse; }
.inflg-specs__row { border-bottom: 1px solid #ececec; }
.inflg-specs__param, .inflg-specs__value { padding: 10px 14px; text-align: left; vertical-align: top; }
.inflg-specs__param { font-weight: 600; color: #333; width: 40%; }

/* Responsywność — kolumny jedna pod drugą, zdjęcie na górze */
@media (max-width: 768px) {
  .inflg-tf, .inflg-tt, .inflg-ff { grid-template-columns: 1fr !important; gap: 20px; }
  .inflg-tf__figure { order: -1; }
}

/* Nagłówek wewnątrz układu + wyrównanie tekstu (lewo/środek/prawo) */
.inflg-tf__heading { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin: 0 0 .6rem; color: var(--stlm-heading, #2a2622); }
.inflg-tf--align-center .inflg-tf__text { text-align: center; }
.inflg-tf--align-right  .inflg-tf__text { text-align: right; }
.inflg-heading--align-center { text-align: center; }
.inflg-heading--align-right  { text-align: right; }

/* ═══════════════════════════════════════════════════════════════
   OPIS PRODUKTU — wygląd w karcie produktu
   Uwaga: motyw ustawia html{font-size:10px}, więc rozmiary podane
   są w px — w rem wychodziłyby o 40% za małe.
   ═══════════════════════════════════════════════════════════════ */
.inflg-desc {
  font-size: 16px;
  line-height: 1.65;
  color: #3a352f;
}

/* kolumna czytelnej szerokości, wyśrodkowana w kontenerze sklepu */
.inflg-desc p,
.inflg-desc ul:not([class]),
.inflg-desc ol:not([class]) {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.inflg-desc p { margin-top: 0; margin-bottom: 18px; }
.inflg-desc p:last-child { margin-bottom: 0; }
.inflg-desc strong { font-weight: 600; color: #2a2622; }

/* odstęp między wierszami opisu */
.inflg-desc .inflg-block { margin-top: 40px; margin-bottom: 40px; }

/* nagłówki wierszy — „auto" po bokach trzyma je w tej samej kolumnie co tekst */
.inflg-desc .inflg-heading { margin: 40px auto 16px; letter-spacing: -.01em; }
/* podtytuł tuż pod nagłówkiem (np. nazwa modelu) trzyma się blisko */
.inflg-desc .inflg-heading--h2 + .inflg-heading--h3 { margin-top: 2px; }
.inflg-desc .inflg-heading--h2 { font-size: 30px; line-height: 1.25; }
.inflg-desc .inflg-heading--h3 { font-size: 23px; line-height: 1.3; }
.inflg-desc .inflg-heading--h4 { font-size: 19px; }
.inflg-desc .inflg-heading--h5,
.inflg-desc .inflg-heading--h6 { font-size: 17px; }

/* ── Tabela specyfikacji ────────────────────────────────────── */
.inflg-specs__title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 18px;
}
.inflg-specs__wrapper {
  border: 1px solid #e7e5e2;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.inflg-specs__wrapper:focus-visible { outline: 2px solid #5f9136; outline-offset: 2px; }
.inflg-specs__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.inflg-specs__row { border-bottom: 1px solid #f0efed; transition: background .15s ease; }
.inflg-specs__row:last-child { border-bottom: 0; }
.inflg-specs__row--even { background: #fafaf9; }
.inflg-specs__row:hover { background: #f4f7f1; }
.inflg-specs__param {
  width: 45%;
  padding: 15px 20px;
  font-weight: 600;
  color: #2a2622;
  line-height: 1.45;
}
.inflg-specs__value { padding: 15px 20px; color: #4a4a4a; line-height: 1.45; }

/* ── Lista cech ─────────────────────────────────────────────── */
.inflg-features__title { text-align: center; font-size: 22px; font-weight: 700; margin: 0 0 20px; }
.inflg-features__list { gap: 18px 28px; }
.inflg-features__item { align-items: center; }
.inflg-features__icon { font-size: 17px; line-height: 1.4; }
.inflg-features__text { font-size: 15px; line-height: 1.45; color: #4a4a4a; }

/* ── Zdjęcia ────────────────────────────────────────────────── */
.inflg-ff--single { grid-template-columns: 1fr; }
.inflg-ff--single .inflg-ff__figure img { margin: 0 auto; }
.inflg-tf__caption, .inflg-ff__caption { font-size: 13px; }

@media (max-width: 600px) {
  .inflg-desc { font-size: 15px; }
  .inflg-desc .inflg-heading--h2 { font-size: 24px; }
  .inflg-desc .inflg-heading--h3 { font-size: 20px; }
  .inflg-specs__table { font-size: 14px; }
  .inflg-specs__param, .inflg-specs__value { padding: 12px 14px; }
  .inflg-specs__param { width: 50%; }
}

/* pierwszy i ostatni wiersz bez zewnętrznego odstępu */
.inflg-desc > *:first-child { margin-top: 0; }
.inflg-desc > *:last-child { margin-bottom: 0; }
