/* ReSaddle
   Kolory z logo: butelkowa zieleń, mosiądz, biel. Tło stron białe, powierzchnie w kolorze filcu.
   Pismo: Brygada 1918 (nagłówki, ceny) i Jost (interfejs, tekst). */

:root {
  --zielen: #06522e;
  --zielen-gleboka: #043b21;
  --mech: #12241b;
  --filc: #edf0ea;
  --biel: #fff;
  --mosiadz: #a67c36;
  --mosiadz-jasny: #e3c583;
  --skora: #8c4a22;
  --popiel: #56635b;
  --linia: #d3d9d0;
  --linia-mocna: #a9b3a8;
  --blad: #a3261b;

  --display: 'Brygada 1918', 'Iowan Old Style', Georgia, serif;
  --ui: 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 112.5%; /* 18 px: Jost ma niską wysokość x */
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--biel);
  color: var(--mech);
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

ul,
ol,
dl,
dd,
fieldset {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

fieldset {
  border: 0;
  min-width: 0;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--mosiadz);
  outline-offset: 3px;
  border-radius: 2px;
}

main:focus {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 800px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--biel);
  border: 2px solid var(--zielen);
  border-radius: var(--radius);
}

.skip:focus {
  top: 12px;
}

.noscript {
  padding: 24px var(--gutter);
}

/* ---- przyciski i linki ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 28px;
  border: 1px solid var(--zielen);
  border-radius: var(--radius);
  background: var(--zielen);
  color: var(--biel);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s;
}

.btn:hover {
  background: var(--zielen-gleboka);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-brass {
  border-color: var(--mosiadz-jasny);
  background: var(--mosiadz-jasny);
  color: var(--zielen-gleboka);
}

.btn-brass:hover {
  background: #efd9a4;
}

.btn-ghost {
  background: transparent;
  color: var(--zielen);
}

.btn-ghost:hover {
  background: var(--filc);
}

.btn-block {
  width: 100%;
  padding-inline: 16px;
}

.link,
.link-light {
  padding: 0;
  border: 0;
  background: none;
  color: var(--zielen);
  font-weight: 500;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--mosiadz);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.link:hover {
  text-decoration-color: currentColor;
}

.link-light {
  color: var(--biel);
  text-decoration-color: var(--mosiadz-jasny);
}

.link-light:hover {
  text-decoration-color: var(--biel);
}

/* ---- nagłówek --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--biel);
  border-bottom: 1px solid var(--linia);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.site-nav a,
.cart-link {
  padding-block: 6px;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.cart-link:hover {
  border-bottom-color: var(--linia-mocna);
}

.site-nav a[aria-current],
.cart-link[aria-current] {
  border-bottom-color: var(--mosiadz);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding-inline: 6px;
  border-radius: 13px;
  background: var(--zielen);
  color: var(--biel);
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid var(--linia-mocna);
  border-radius: var(--radius);
  background: none;
}

@media (max-width: 1020px) {
  .menu-toggle {
    display: block;
  }

  .header-row {
    flex-wrap: wrap;
    gap: 0 14px;
    min-height: 64px;
  }

  .brand {
    gap: 10px;
    font-size: 1.3rem;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .cart-link {
    order: 1;
    margin-left: auto;
  }

  .menu-toggle {
    order: 2;
    margin-left: 0;
    padding: 7px 12px;
  }

  .site-nav {
    display: none;
    order: 3;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 0;
    padding-bottom: 12px;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--linia);
  }

  .site-nav a[aria-current] {
    border-bottom-color: var(--mosiadz);
  }
}

/* ---- pierwszy ekran --------------------------------------------------------- */

.hero {
  background: var(--zielen);
  color: var(--biel);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 3vw, 56px);
  padding-block: clamp(40px, 5vw, 72px);
}

.motto {
  font-size: clamp(2.5rem, 5.3vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.motto span {
  display: block;
  white-space: nowrap;
}

.hero-lead {
  max-width: 27em;
  margin: 1.4em 0 0;
  font-size: 1.167rem;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
  margin-top: 2.2em;
}

.hero :focus-visible,
.band :focus-visible,
.site-footer :focus-visible,
.chat-head :focus-visible {
  outline-color: var(--mosiadz-jasny);
}

.portrait {
  margin: 0;
}

.portrait-stage {
  position: relative;
  aspect-ratio: 1;
  max-width: 660px;
  margin-inline: auto;
}

.portrait-disc {
  position: absolute;
  inset: 13.8%;
  overflow: hidden;
  border-radius: 50%;
  background: var(--filc);
}

.portrait-disc:focus-visible {
  border-radius: 50%;
  outline-offset: 12px;
}

/* Zdjęcie jest kwadratem z siodłem trochę w prawo od środka: powiększamy i przesuwamy,
   żeby siodło wypadło w środku koła. */
.portrait-disc img {
  position: absolute;
  left: -33%;
  top: -27%;
  width: 155%;
  max-width: none;
}

.portrait-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.portrait-lines .ring {
  fill: none;
  stroke: var(--mosiadz-jasny);
  stroke-width: 0.42;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.leader path {
  fill: none;
  stroke: var(--mosiadz-jasny);
  stroke-width: 0.22;
}

.leader circle {
  fill: var(--mosiadz-jasny);
}

.note {
  position: absolute;
  left: var(--l);
  bottom: var(--b);
  width: var(--w);
  padding-bottom: 7px;
  font-size: 0.86rem;
  line-height: 1.25;
  color: var(--biel);
}

.portrait figcaption {
  margin-top: 4px;
  text-align: center;
  font-size: 0.89rem;
  color: rgb(255 255 255 / 0.8);
}

.portrait figcaption a {
  color: var(--biel);
  text-decoration-color: var(--mosiadz-jasny);
  text-underline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .portrait-lines .ring {
    stroke-dasharray: 100;
    animation: draw 1.5s cubic-bezier(0.6, 0, 0.2, 1) 0.15s backwards;
  }

  .leader path {
    stroke-dasharray: 100;
    animation: draw 0.55s ease-out calc(1.2s + var(--i) * 0.28s) backwards;
  }

  .leader circle,
  .note {
    animation: appear 0.4s ease-out calc(1.2s + var(--i) * 0.28s) backwards;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 100;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .portrait-stage {
    max-width: 520px;
  }
}

@media (max-width: 560px) {
  .portrait-stage {
    aspect-ratio: auto;
  }

  .portrait-disc {
    position: relative;
    display: block;
    inset: auto;
    width: 86%;
    aspect-ratio: 1;
    margin: 12px auto 0;
    outline: 1.5px solid var(--mosiadz-jasny);
    outline-offset: 6px;
  }

  .portrait-lines {
    display: none;
  }

  .portrait-notes {
    display: grid;
    gap: 6px;
    margin-top: 30px;
    padding-left: 4px;
  }

  .note {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    padding: 0 0 0 20px;
  }

  .note::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.42em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mosiadz-jasny);
  }

  .portrait figcaption {
    margin-top: 16px;
    text-align: left;
    padding-left: 4px;
  }
}

/* ---- sekcje ----------------------------------------------------------------- */

.section {
  padding-block: clamp(56px, 7.5vw, 112px);
}

.felt {
  background: var(--filc);
}

.band {
  padding-block: clamp(56px, 7.5vw, 112px);
  background: var(--zielen);
  color: var(--biel);
}

.band-top {
  padding-block: clamp(40px, 5vw, 80px);
}

.band h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
}

.band .page-lead {
  color: rgb(255 255 255 / 0.88);
}

.h-section {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
}

.h-small {
  font-size: 1.333rem;
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(28px, 3.5vw, 48px);
}

.page-head {
  padding-block: clamp(36px, 5vw, 72px) clamp(24px, 3vw, 40px);
}

.page-head h1,
.thanks h1 {
  font-size: clamp(2.3rem, 4.8vw, 3.75rem);
}

.page-lead {
  max-width: 34em;
  margin: 0.8em 0 0;
  font-size: 1.167rem;
  line-height: 1.5;
  color: var(--popiel);
}

/* Dyscypliny: lista, nie kafle */
.types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--linia);
}

.types a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 2px 20px;
  height: 100%;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--linia);
  text-decoration: none;
}

.types-name {
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.2;
}

.types a:hover .types-name {
  text-decoration: underline;
  text-decoration-color: var(--mosiadz);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}

.types-count {
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  color: var(--popiel);
  font-size: 0.89rem;
  font-variant-numeric: tabular-nums;
}

.types-lead {
  grid-column: 1 / -1;
  max-width: 36em;
  color: var(--popiel);
  font-size: 0.95rem;
}

/* Tekst obok zdjęcia */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.split-photo img {
  width: 100%;
  border-radius: var(--radius);
}

.split-text > p {
  max-width: 32em;
}

.split-text .h-section,
.split-text h1 {
  margin-bottom: 0.6em;
}

.about-split {
  align-items: start;
  padding-bottom: clamp(24px, 3vw, 40px);
}

.checks {
  margin-block: 1.6em 1.8em;
  border-top: 1px solid var(--linia-mocna);
}

.checks > div {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 4px 20px;
  padding-block: 14px;
  border-bottom: 1px solid var(--linia-mocna);
}

.checks dt {
  font-family: var(--display);
  font-size: 1.167rem;
  line-height: 1.3;
}

.checks dd {
  font-size: 0.95rem;
}

/* Kolejne kroki: to rzeczywiście kolejność, stąd numery */
.steps {
  counter-reset: krok;
  display: grid;
  gap: 14px;
  margin-block: 1.6em 2em;
}

.steps li {
  counter-increment: krok;
  position: relative;
  min-height: 34px;
  padding: 4px 0 0 52px;
}

.steps li::before {
  content: counter(krok);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--mosiadz-jasny);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1;
}

.steps-dark li::before {
  border-color: var(--mosiadz);
}

.ask > * {
  max-width: 780px;
}

.ask > p {
  max-width: 32em;
  margin-top: 0.9em;
  color: var(--popiel);
}

.ask > .btn {
  margin-top: 0.6em;
}

.ask-form {
  display: flex;
  gap: 12px;
  margin-top: 1.6em;
}

.ask-form input {
  flex: 1;
  min-width: 0;
}

.ask-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ask-examples button,
.chat-starters button {
  padding: 7px 16px;
  border: 1px solid var(--linia-mocna);
  border-radius: 999px;
  background: var(--biel);
  font-size: 0.89rem;
  text-align: left;
  transition: border-color 0.15s;
}

.ask-examples button:hover,
.chat-starters button:hover {
  border-color: var(--zielen);
}

@media (max-width: 900px) {
  .types,
  .split {
    grid-template-columns: 1fr;
  }

  .split-reverse .split-photo {
    order: -1;
  }

  .band-top .split-photo {
    display: none;
  }
}

@media (max-width: 560px) {
  .checks > div {
    grid-template-columns: 1fr;
  }

  .ask-form {
    flex-direction: column;
  }
}

/* ---- siatka siodeł ---------------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(32px, 4vw, 52px) clamp(16px, 2.4vw, 32px);
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.tile-link {
  display: grid;
  gap: 3px;
  text-decoration: none;
}

.tile-photo {
  display: block;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--filc);
  aspect-ratio: 1;
}

.tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.state {
  margin: 0;
  font-size: 0.83rem;
  font-weight: 500;
}

.state-used {
  color: var(--skora);
}

.state-new {
  color: var(--zielen);
}

.tile-name {
  font-family: var(--display);
  font-size: 1.39rem;
  line-height: 1.2;
}

.tile-link:hover .tile-name {
  text-decoration: underline;
  text-decoration-color: var(--mosiadz);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.tile-spec {
  color: var(--popiel);
  font-size: 0.89rem;
}

.tile-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-top: 6px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.tile-was {
  color: var(--popiel);
  font-size: 0.83rem;
  font-weight: 400;
}

/* ---- katalog ---------------------------------------------------------------- */

.catalog {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(56px, 7.5vw, 112px);
}

.filters-box > summary {
  display: none;
}

.filters {
  display: grid;
  gap: 26px;
}

.filters legend,
.choice legend,
.checkout legend,
.sell-form legend {
  padding: 0;
  font-family: var(--display);
  font-size: 1.167rem;
  line-height: 1.3;
}

.filters legend {
  margin-bottom: 8px;
}

.pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 4px;
  cursor: pointer;
}

input[type='radio'] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--zielen);
}

.field {
  display: grid;
  gap: 6px;
}

.field > span,
.field > label {
  font-size: 0.89rem;
  font-weight: 500;
}

.optional {
  color: var(--popiel);
  font-weight: 400;
}

input[type='text'],
input[type='email'],
input[type='tel'],
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid var(--linia-mocna);
  border-radius: var(--radius);
  background: var(--biel);
}

select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2312241b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #7b867e;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
  border-color: var(--zielen);
}

input[type='file'] {
  max-width: 100%;
  font-size: 0.89rem;
}

.field-inline {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 12px;
}

.field-inline select {
  min-height: 44px;
  padding-block: 8px;
}

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--linia);
}

.results-bar p {
  margin: 0;
  color: var(--popiel);
}

.empty {
  grid-column: 1 / -1;
  max-width: 32em;
  padding-block: 24px;
}

.empty-page {
  padding-bottom: clamp(56px, 7.5vw, 112px);
}

.empty-title {
  margin-bottom: 0.4em;
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.2;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 1.4em;
}

@media (max-width: 900px) {
  .catalog {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .filters-box {
    border: 1px solid var(--linia-mocna);
    border-radius: var(--radius);
  }

  .filters-box > summary {
    display: block;
    padding: 12px 16px;
    font-weight: 500;
    cursor: pointer;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px 16px 20px;
  }
}

@media (max-width: 480px) {
  .filters {
    grid-template-columns: 1fr;
  }
}

/* ---- strona siodła ---------------------------------------------------------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding-block: 22px;
  color: var(--popiel);
  font-size: 0.89rem;
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.crumbs > * + *::before {
  content: '/';
  margin-right: 10px;
  color: var(--linia-mocna);
}

.product {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  align-items: start;
  gap: clamp(28px, 5vw, 80px);
}

.product-photo img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--filc);
}

.product-info h1 {
  margin-top: 6px;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
}

.product-short {
  max-width: 26em;
  margin: 0.7em 0 0;
  font-size: 1.167rem;
  line-height: 1.45;
  color: var(--popiel);
}

.product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 18px;
  margin: 0.8em 0 0;
  font-family: var(--display);
  font-size: 2.3rem;
  line-height: 1.1;
  font-variant-numeric: lining-nums;
}

.product-was {
  font-family: var(--ui);
  font-size: 0.89rem;
  color: var(--popiel);
}

.buy {
  display: grid;
  gap: 20px;
  margin-block: 28px 20px;
}

.choice legend {
  margin-bottom: 10px;
  font-family: var(--ui);
  font-size: 0.89rem;
  font-weight: 500;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: block;
  padding: 9px 16px;
  border: 1px solid var(--linia-mocna);
  border-radius: var(--radius);
  background: var(--biel);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.chip input:checked + span {
  border-color: var(--zielen);
  background: var(--zielen);
  color: var(--biel);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--mosiadz);
  outline-offset: 3px;
}

.one-size,
.in-cart {
  margin: 0;
  font-size: 0.95rem;
}

.buy-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.buy-actions .btn {
  min-width: min(100%, 300px);
}

.promises {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--linia);
  font-size: 0.95rem;
}

.promises li {
  position: relative;
  padding-left: 24px;
}

.promises li::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 0.48em;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--mosiadz);
  border-radius: 50%;
}

.product-body {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  align-items: start;
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(48px, 6vw, 88px);
}

.product-copy p {
  max-width: 34em;
  font-size: 1.06rem;
  line-height: 1.6;
}

.product-copy h2 {
  margin: 1.5em 0 0.5em;
  font-size: 1.6rem;
}

.product-side {
  display: grid;
  gap: 40px;
}

.specs > div,
.passport-rows > div {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 16px;
  padding-block: 10px;
}

.specs > div {
  border-bottom: 1px solid var(--linia);
}

.specs > div:first-child {
  border-top: 1px solid var(--linia);
}

.specs dt,
.passport-rows dt {
  color: var(--popiel);
  font-size: 0.89rem;
  padding-top: 0.08em;
}

/* Paszport siodła: dokument, a nie karta produktu */
.passport {
  position: relative;
  padding: clamp(24px, 3vw, 40px);
  background: var(--filc);
  border-radius: var(--radius);
}

.passport::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--mosiadz);
  border-radius: 2px;
  opacity: 0.6;
  pointer-events: none;
}

.passport-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.passport-head h2 {
  font-size: 1.9rem;
}

.passport-no {
  margin: 4px 0 0;
  color: var(--popiel);
  font-variant-numeric: tabular-nums;
}

.stamp {
  flex: none;
  width: 112px;
  height: 112px;
  margin: -6px -4px 0 0;
  color: var(--zielen);
  transform: rotate(-9deg);
}

.stamp-ring {
  fill: currentColor;
  font-family: var(--ui);
  font-size: 7.6px;
  font-weight: 500;
  letter-spacing: 0.115em;
}

.stamp-date {
  fill: currentColor;
  font-family: var(--display);
  font-size: 8.4px;
}

.stamp-year {
  fill: currentColor;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.passport-grade {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 10px 0 14px;
  font-weight: 500;
}

.grade {
  display: inline-flex;
  gap: 5px;
}

.grade i {
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--skora);
  border-radius: 50%;
}

.grade i.on {
  background: var(--skora);
}

.passport-rows > div {
  border-bottom: 1px dotted var(--linia-mocna);
}

.passport-rows > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 900px) {
  .product,
  .product-body {
    grid-template-columns: 1fr;
  }

  .buy-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stamp {
    width: 88px;
    height: 88px;
  }

  .specs > div,
  .passport-rows > div {
    grid-template-columns: 6.5em 1fr;
  }
}

/* ---- koszyk i zamówienie ---------------------------------------------------- */

.cart-grid,
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
  padding-bottom: clamp(56px, 7.5vw, 112px);
}

.lines {
  border-top: 1px solid var(--linia);
}

.line {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 20px;
  padding-block: 22px;
  border-bottom: 1px solid var(--linia);
}

.line-photo img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--filc);
}

.line-name {
  font-family: var(--display);
  font-size: 1.39rem;
  line-height: 1.2;
  text-decoration: none;
}

.line-name:hover {
  text-decoration: underline;
  text-decoration-color: var(--mosiadz);
  text-underline-offset: 5px;
}

.line-spec {
  margin: 4px 0 0;
  color: var(--popiel);
  font-size: 0.89rem;
}

.line-end {
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 12px;
}

.line-end .link {
  font-size: 0.89rem;
  font-weight: 400;
}

.line-price {
  margin: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.qty {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  border: 1px solid var(--linia-mocna);
  border-radius: var(--radius);
}

.qty button {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  font-size: 1.1rem;
}

.qty button:disabled {
  opacity: 0.35;
  cursor: default;
}

.qty span {
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.summary {
  position: sticky;
  top: 100px;
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--filc);
  border-radius: var(--radius);
}

.sum > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 6px;
  font-variant-numeric: tabular-nums;
}

.sum dd {
  text-align: right;
}

.sum .sum-total {
  align-items: baseline;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--linia-mocna);
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.2;
}

.sum-hint,
.summary-note {
  margin: 10px 0 0;
  color: var(--popiel);
  font-size: 0.89rem;
}

.summary .btn {
  margin-top: 20px;
}

.mini-lines {
  margin-bottom: 14px;
  border-bottom: 1px solid var(--linia-mocna);
}

.mini-lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.mini-lines li > span:last-child {
  white-space: nowrap;
}

.mini-lines small {
  display: block;
  color: var(--popiel);
  font-size: 0.83rem;
}

.checkout-form,
.sell-form {
  display: grid;
  gap: 36px;
}

.checkout fieldset,
.sell-form fieldset {
  display: grid;
  gap: 16px;
}

.checkout legend,
.sell-form legend {
  margin-bottom: 14px;
  font-size: 1.5rem;
}

.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkout .field-pair {
  grid-template-columns: 160px minmax(0, 1fr);
}

.field-hint,
.field-error {
  margin: 0;
  font-size: 0.83rem;
  color: var(--popiel);
}

.field-error {
  color: var(--blad);
  font-weight: 500;
}

input[aria-invalid='true'] {
  border-color: var(--blad);
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--linia-mocna);
  border-radius: var(--radius);
  background: var(--biel);
  cursor: pointer;
}

.option:has(input:checked) {
  border-color: var(--zielen);
  box-shadow: inset 0 0 0 1px var(--zielen);
}

.option-main {
  flex: 1;
}

.option-main small {
  display: block;
  color: var(--popiel);
  font-size: 0.83rem;
}

.option-price {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.notice {
  margin: 0;
  padding: 12px 16px;
  border-left: 3px solid var(--mosiadz);
  background: var(--filc);
  font-size: 0.95rem;
}

.felt .notice {
  background: var(--biel);
}

.thanks {
  padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7.5vw, 112px);
}

.thanks > * {
  max-width: 780px;
}

.thanks .notice {
  margin-top: 24px;
}

.thanks-box {
  margin-block: 32px;
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--filc);
  border-radius: var(--radius);
}

.sent {
  padding: 28px;
  background: var(--biel);
  border-left: 3px solid var(--zielen);
}

.sent h3 {
  margin-bottom: 0.5em;
  font-size: 1.6rem;
}

.sent:focus {
  outline: none;
}

.sell-form {
  margin-top: 28px;
}

.sell-form > .btn {
  justify-self: start;
}

@media (max-width: 900px) {
  .cart-grid,
  .checkout {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }
}

@media (max-width: 560px) {
  .line {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .line-photo img {
    width: 84px;
    height: 84px;
  }

  .line-end {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }

  .field-pair,
  .checkout .field-pair {
    grid-template-columns: 1fr;
  }
}

/* ---- poradnik, o nas, sprzedaż ---------------------------------------------- */

.prose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 72px) clamp(32px, 6vw, 96px);
  padding-bottom: clamp(56px, 7.5vw, 112px);
}

.prose-grid section {
  padding-top: 22px;
  border-top: 1px solid var(--linia-mocna);
}

.prose-grid h2,
.prose h2 {
  margin-bottom: 0.6em;
  font-size: 1.9rem;
}

.prose-grid p,
.prose p {
  max-width: 34em;
}

.prose p {
  font-size: 1.06rem;
  line-height: 1.6;
}

.aside {
  color: var(--popiel);
  font-size: 0.95rem;
}

.table {
  width: 100%;
  max-width: 26em;
  margin-block: 1.2em;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.table th,
.table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--linia);
  text-align: left;
}

.table th {
  color: var(--popiel);
  font-size: 0.89rem;
  font-weight: 400;
}

.table td:last-child,
.table th:last-child {
  text-align: right;
}

.defs > div {
  padding-block: 12px;
  border-bottom: 1px solid var(--linia);
}

.defs dt {
  font-weight: 500;
}

.defs dd {
  max-width: 34em;
  color: var(--popiel);
}

.defs-wide {
  margin-top: clamp(20px, 3vw, 36px);
  border-top: 1px solid var(--linia-mocna);
}

.defs-wide > div {
  display: grid;
  grid-template-columns: 12em minmax(0, 1fr);
  gap: 6px 32px;
  padding-block: 18px;
  border-bottom-color: var(--linia-mocna);
}

.defs-wide dt {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
}

.defs-wide dd {
  color: var(--mech);
}

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 6vw, 96px);
  margin-top: clamp(20px, 3vw, 36px);
}

.compare > div {
  padding-top: 20px;
  border-top: 1px solid var(--linia-mocna);
}

.compare h3 {
  margin-bottom: 0.5em;
  font-size: 1.6rem;
}

.compare p {
  max-width: 30em;
}

@media (max-width: 800px) {
  .prose-grid,
  .compare {
    grid-template-columns: 1fr;
  }

  .defs-wide > div {
    grid-template-columns: 1fr;
  }
}

/* ---- stopka ----------------------------------------------------------------- */

.site-footer {
  background: var(--zielen-gleboka);
  color: rgb(255 255 255 / 0.82);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px 32px;
  padding-block: clamp(48px, 6vw, 80px) 40px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.footer-motto {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--biel);
}

.site-footer h2 {
  margin-bottom: 12px;
  font-family: var(--ui);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--biel);
}

.site-footer nav a {
  display: block;
  width: fit-content;
  padding-block: 4px;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--biel);
  text-decoration: underline;
  text-decoration-color: var(--mosiadz-jasny);
  text-underline-offset: 5px;
}

.site-footer p {
  margin: 0;
}

.footer-note {
  padding-block: 20px 28px;
  border-top: 1px solid rgb(255 255 255 / 0.16);
  font-size: 0.83rem;
}

.footer-note p {
  max-width: 44em;
  padding-right: 200px;
}

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-note p {
    padding: 0 0 64px;
  }
}

/* ---- doradca ---------------------------------------------------------------- */

.chat-launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 22px 6px 6px;
  border: 1px solid var(--mosiadz-jasny);
  border-radius: 999px;
  background: var(--zielen);
  color: var(--biel);
  font-weight: 500;
  box-shadow: 0 8px 28px rgb(4 40 24 / 0.28);
}

.chat-launch:hover {
  background: var(--zielen-gleboka);
}

.chat-launch img,
.chat-head img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(410px, calc(100vw - 40px));
  height: min(660px, calc(100dvh - 40px));
  overflow: hidden;
  border: 1px solid var(--linia-mocna);
  border-radius: 12px;
  background: var(--biel);
  box-shadow: 0 20px 64px rgb(4 40 24 / 0.3);
}

.chat[hidden],
.chat-launch[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .chat {
    animation: chat-in 0.22s ease-out;
    transform-origin: bottom right;
  }
}

@keyframes chat-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 14px;
  background: var(--zielen);
  color: var(--biel);
}

.chat-head div {
  flex: 1;
  min-width: 0;
}

.chat-head h2 {
  font-size: 1.17rem;
  white-space: nowrap;
}

.chat-head p {
  margin: 1px 0 0;
  font-size: 0.78rem;
  color: rgb(255 255 255 / 0.8);
}

.chat-close {
  border: 0;
  background: none;
  color: var(--biel);
}

.chat-new {
  padding: 0;
  border: 0;
  background: none;
  color: var(--zielen);
  font-size: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--mosiadz);
  text-underline-offset: 3px;
  white-space: nowrap;
}

.chat-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.chat-close:hover {
  background: rgb(255 255 255 / 0.12);
}

.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 0.92rem;
  line-height: 1.5;
}

.chat-log:focus-visible {
  outline-offset: -3px;
}

.msg {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 14px;
  overflow-wrap: anywhere;
}

.msg p,
.msg ul {
  margin: 0 0 8px;
}

.msg > :last-child {
  margin-bottom: 0;
}

.msg ul {
  padding-left: 18px;
  list-style: disc;
}

.msg li + li {
  margin-top: 4px;
}

.msg-bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: var(--filc);
}

.msg-user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--zielen);
  color: var(--biel);
}

.msg-error {
  align-self: flex-start;
  border: 1px solid var(--blad);
  border-bottom-left-radius: 4px;
}

.chat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--linia);
  border-radius: 8px;
  background: var(--biel);
  text-decoration: none;
}

.chat-card:hover {
  border-color: var(--zielen);
}

.chat-card img {
  flex: none;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
}

.chat-card b {
  display: block;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.2;
}

.chat-card small {
  color: var(--popiel);
  font-size: 0.8rem;
}

.chat-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-starters button {
  font-size: 0.86rem;
}

.dots {
  display: inline-flex;
  gap: 5px;
  padding-block: 6px;
}

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--popiel);
}

@media (prefers-reduced-motion: no-preference) {
  .dots i {
    animation: blink 1.2s infinite ease-in-out;
  }

  .dots i:nth-child(2) {
    animation-delay: 0.18s;
  }

  .dots i:nth-child(3) {
    animation-delay: 0.36s;
  }
}

@keyframes blink {
  0%,
  70%,
  100% {
    opacity: 0.25;
  }

  35% {
    opacity: 1;
  }
}

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--linia);
}

.chat-form textarea {
  flex: 1;
  min-height: 46px;
  max-height: 132px;
  padding: 10px 12px;
  resize: none;
  font-size: 0.92rem;
  line-height: 1.4;
}

.chat-form .btn {
  min-height: 46px;
  padding: 8px 18px;
  font-size: 0.92rem;
}

.chat-foot {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--popiel);
  font-size: 0.74rem;
  line-height: 1.45;
}

@media (max-width: 600px) {
  .chat {
    inset: 0;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
  }

  .chat-launch {
    right: 12px;
    bottom: 12px;
    gap: 8px;
    padding: 5px 16px 5px 5px;
    font-size: 0.89rem;
  }

  .chat-launch img {
    width: 34px;
    height: 34px;
  }

  body.chat-open {
    overflow: hidden;
  }
}
