/* ============================================
   SPARX - wspolne elementy stron produktu (sparx-one.html, sparx-b.html)
   H1 w dwoch liniach, podpisy kolorow, porownanie modeli, podpisy punktow (+),
   podpisy w rolce, galeria wykonczen, "Czytaj dalej" w sekcji redakcyjnej.
   Rozmiary tekstu w px - root font-size w tym projekcie plynie z viewportem.
   ============================================ */

/* --- H1: nazwa modelu (Changeling Neo) + opis w drugiej linii (Hellix Medium) --- */
.sparx-h1 { margin: 0; }
.sparx-h1__model {
  display: block;
  font-family: 'Changeling Neo', sans-serif;
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
}
.sparx-h1__sub {
  display: block;
  margin-top: .6rem;
  font-family: Hellix, sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
}
.sparx-product-lead {
  margin: 1.1rem 0 0;
  font-family: Hellix, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
}
@media (max-width: 767px) {
  .sparx-h1__model { font-size: 34px; }
  .sparx-h1__sub { font-size: 19px; }
}

/* --- Probki kolorow z podpisem --- */
.product-header3_item { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.sparx-swatch-name {
  font-family: Hellix, sans-serif;
  font-size: 13px;
  line-height: 1.2;
  color: #4a4a4a;
  text-align: center;
}

/* --- Porownanie modeli --- */
.sparx-compare { padding: 80px 0; background: #fff; }
.sparx-compare__head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.sparx-compare__head p { font-size: 18px; line-height: 1.5; color: #4a4a4a; margin: 1rem 0 0; }
.sparx-compare__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
.sparx-compare__card {
  position: relative;
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  padding: 28px 28px 24px;
  background: #fff;
}
.sparx-compare__card.is-current { border: 2px solid #0a0a0a; padding: 27px 27px 23px; }
.sparx-compare__badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: Hellix, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #f32730;
}
.sparx-compare__name {
  margin: 0 0 18px;
  font-family: 'Changeling Neo', sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
}
.sparx-compare__list { margin: 0; }
.sparx-compare__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px 0;
  border-top: 1px solid #efefef;
  font-family: Hellix, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.sparx-compare__row dt { color: #6b6b6b; font-weight: 400; }
.sparx-compare__row dd { margin: 0; font-weight: 600; text-align: right; }
.sparx-compare__link {
  display: inline-block;
  margin-top: 16px;
  font-family: Hellix, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #f32730;
  text-decoration: none;
}
.sparx-compare__link:hover { text-decoration: underline; }
.sparx-compare__note { margin: 32px 0 0; text-align: center; font-size: 16px; line-height: 1.5; }
.sparx-compare__note a { color: #f32730; text-decoration: underline; }
@media (max-width: 767px) {
  .sparx-compare { padding: 48px 0; }
  .sparx-compare__grid { grid-template-columns: 1fr; gap: 16px; }
  .sparx-compare__card { padding: 22px 20px 18px; }
  .sparx-compare__card.is-current { padding: 21px 19px 17px; }
  .sparx-compare__badge { top: 20px; right: 18px; }
}

/* --- Rolka: podpis pod zdjeciem --- */
.sparx-slide-caption {
  margin-top: .75rem;
  font-family: Hellix, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #4a4a4a;
  text-align: center;
}
.sparx-slide-caption strong, .sparx-gal__tile-caption strong { color: #0a0a0a; font-weight: 600; }

/* --- Zdjecie z punktami (+): staly podpis obok kropki --- */
.sparx-hs-label {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
  font-family: Hellix, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #0a0a0a;
  pointer-events: none;
}
.sparx-hs-label.is-left { left: auto; right: calc(100% + 8px); }
@media (max-width: 991px) { .sparx-hs-label.is-left-md { left: auto; right: calc(100% + 8px); } }
/* Na telefonie przy brzegach zdjecia nie ma miejsca na podpisy - zamiast nich lista pod zdjeciem. */
.sparx-hs-legend { display: none; }
@media (max-width: 767px) {
  .sparx-hs-label { display: none; }
  .sparx-hs-legend {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    margin: 20px 0 0; padding: 0; list-style: none;
  }
  .sparx-hs-legend li {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px 5px 6px; border-radius: 999px; background: #f4f4f4;
    font-family: Hellix, sans-serif; font-size: 14px; font-weight: 600; line-height: 1.2;
  }
  .sparx-hs-legend li::before {
    content: "+"; display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%; background: #f32730; color: #fff; font-size: 14px;
  }
}

/* --- Dodatkowe wyposazenie: dwie karty obok siebie --- */
.sparx-extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.sparx-extras.is-single { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin: 0 auto; }
.sparx-extras__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42%;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  background: #fff;
}
.sparx-extras__card h3 { margin: 0 0 .75rem; font-size: 20px; line-height: 1.3; }
.sparx-extras__card p { margin: 0; font-size: 16px; line-height: 1.5; }
.sparx-extras__img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: #f4f4f4; }
@media (max-width: 991px) { .sparx-extras { grid-template-columns: 1fr; } }
@media (max-width: 479px) { .sparx-extras__card { grid-template-columns: 1fr; } }

/* --- Galeria wykonczen (modal, 2 poziomy: kafelki -> zdjecia jednego wozka) --- */
.sparx-gal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(20, 20, 20, .78); }
.sparx-gal.is-open { display: flex; }
.sparx-gal__box {
  position: relative;
  width: min(1200px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 40px 48px 48px;
  border-radius: 20px;
  background: #fff;
  font-family: Hellix, sans-serif;
}
.sparx-gal__top { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; padding-right: 56px; }
.sparx-gal__title { margin: 0; font-family: Hellix, sans-serif; font-size: 28px; font-weight: 600; line-height: 1.2; }
.sparx-gal__hint { margin: 0 0 28px; font-size: 16px; line-height: 1.5; color: #4a4a4a; }
.sparx-gal__close, .sparx-gal__back, .sparx-gal__arrow {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #d8d8d8; background: #fff; color: #0a0a0a; cursor: pointer;
  font-family: Hellix, sans-serif;
}
.sparx-gal__close { position: absolute; top: 32px; right: 40px; width: 44px; height: 44px; border-radius: 50%; }
.sparx-gal__back { gap: 6px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.sparx-gal__close svg, .sparx-gal__back svg, .sparx-gal__arrow svg { width: 16px; height: 16px; }
.sparx-gal__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sparx-gal__tile {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid #e3e3e3; border-radius: 14px; background: #fff; cursor: pointer;
  font-family: Hellix, sans-serif; transition: border-color .2s, box-shadow .2s;
}
.sparx-gal__tile:hover { border-color: #0a0a0a; box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.sparx-gal__tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f6f6f6; }
.sparx-gal__tile-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; font-size: 15px; color: #4a4a4a; }
.sparx-gal__tile-caption svg { width: 14px; height: 14px; color: #f32730; flex-shrink: 0; }
.sparx-gal__detail { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; margin-top: 20px; }
.sparx-gal__stage { position: relative; border-radius: 14px; background: #f6f6f6; }
.sparx-gal__stage img { display: block; width: 100%; aspect-ratio: 1 / 1; max-height: calc(100vh - 300px); object-fit: contain; }
.sparx-gal__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border-color: transparent; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.sparx-gal__arrow.is-prev { left: 14px; }
.sparx-gal__arrow.is-next { right: 14px; }
.sparx-gal__thumbs { grid-column: 1; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.sparx-gal__thumb { flex: 0 0 96px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #f6f6f6; cursor: pointer; }
.sparx-gal__thumb.is-active { border-color: #0a0a0a; }
.sparx-gal__thumb img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.sparx-gal__info { grid-column: 2; grid-row: 1; }
.sparx-gal__spec { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 0 0 18px; font-size: 16px; }
.sparx-gal__spec dt { color: #6b6b6b; }
.sparx-gal__spec dd { margin: 0; font-weight: 600; }
.sparx-gal__info p { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: #4a4a4a; }
.sparx-gal__info .button { width: 100%; }
body.sparx-gal-lock { overflow: hidden; }
@media (max-width: 991px) {
  .sparx-gal__box { padding: 28px 24px 32px; }
  .sparx-gal__close { top: 20px; right: 20px; }
  .sparx-gal__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sparx-gal__detail { grid-template-columns: 1fr; }
  .sparx-gal__info { grid-column: 1; grid-row: auto; }
}
@media (max-width: 767px) {
  .sparx-gal { padding: 0; }
  .sparx-gal__box { max-height: 100vh; height: 100%; border-radius: 0; padding: 20px 16px 28px; }
  .sparx-gal__top { flex-wrap: wrap; gap: 10px; }
  .sparx-gal__title { font-size: 22px; }
  .sparx-gal__tiles { grid-template-columns: 1fr; gap: 14px; }
  .sparx-gal__thumb { flex-basis: 72px; }
  .sparx-gal__arrow { width: 38px; height: 38px; }
}

/* --- Sekcja redakcyjna: "Czytaj dalej" (tekst zostaje w HTML dla Google) --- */
.sparx-readmore__more[hidden] { display: none; }
.sparx-readmore__btn {
  margin-top: 1.2rem;
  padding: 0;
  border: 0;
  background: none;
  font-family: Hellix, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #f32730;
  cursor: pointer;
}
.sparx-readmore__btn:hover { text-decoration: underline; }

/* Strony produktu: ciasniejsze odstepy miedzy sekcjami (mniej scrollowania) */
body .section_product-header2 .padding-section-medium { padding-top: 2rem; padding-bottom: 3rem; }
body .section_galeria .padding-section-large,
body .section_w-cenie .padding-section-medium,
body .section_opcje-dodatkowe .padding-section-large,
body .section_konfigurator .padding-section-large { padding-top: 3rem; padding-bottom: 3rem; }
body .sparx-compare { padding: 3rem 0; }
body .sparx-faq { padding-top: 3rem; padding-bottom: 3rem; }
body .sparx-editorial { padding-top: 3rem; padding-bottom: 3rem; }
@media screen and (max-width: 767px) {
  body .section_product-header2 .padding-section-medium { padding-top: 2rem; padding-bottom: 2.5rem; }
  body .section_galeria .padding-section-large,
  body .section_w-cenie .padding-section-medium,
  body .section_opcje-dodatkowe .padding-section-large,
  body .section_konfigurator .padding-section-large,
  body .sparx-compare, body .sparx-faq, body .sparx-editorial { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}
