/* Strona główna — według koncepcji. */

.xs-home {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- Polecane ---------- */
.xs-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 150px;
  gap: 12px;
}

.xs-hero__main {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  overflow: hidden;
  border-radius: var(--xs-radius-card);
  background: var(--xs-blue);
}

.xs-hero__text {
  flex: 1 1 0;
  min-width: 0;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
}

.xs-hero__tag {
  align-self: flex-start;
  padding: 5px 9px;
  font-weight: 700;
  border-radius: var(--xs-radius);
  background: var(--xs-brand);
  font-size: 12px;
}

.xs-hero__text h1 {
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.xs-hero__text p {
  margin: 0;
  max-width: 30ch;
  color: var(--xs-muted);
  line-height: 1.45;
}

.xs-hero__buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.xs-hero__price {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.xs-hero__image {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}

.xs-hero__image img,
.xs-hero__tile-image img {
  position: absolute;
  top: 8%;
  left: 4%;
  width: 92%;
  height: 84%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.xs-hero__tile {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: var(--xs-radius-card);
}

.xs-hero__tile:hover {
  color: var(--xs-text);
}

.xs-hero__tile--peach {
  background: var(--xs-peach);
}

.xs-hero__tile--mint {
  background: var(--xs-mint);
}

.xs-hero__tile-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xs-hero__tile-cat {
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  color: var(--xs-brand-text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Tytuły do 75 znaków: 4 linie mieszczą się w kafelku 150 px razem z kategorią i ceną. */
.xs-hero__tile-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.xs-hero__tile-price {
  font-size: 16px;
  font-weight: 800;
}

.xs-hero__tile-image {
  position: relative;
  width: 84px;
  height: 100px;
  flex: none;
}

/* ---------- Sekcje z produktami ---------- */
/* ---------- Leasing ---------- */
.xs-leasing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  padding: 28px;
  border: 1px solid var(--xs-line);
  border-radius: var(--xs-radius-card);
  background: var(--xs-surface);
}

.xs-leasing__text {
  flex: 2 1 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xs-leasing__text p {
  margin: 0;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--xs-muted);
}

.xs-leasing__perks {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xs-leasing__perk {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--xs-bg);
  font-weight: 600;
}

@media (max-width: 900px) {
  .xs-home {
    gap: 18px;
  }

  .xs-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 8px;
  }

  .xs-hero__main {
    flex-direction: column-reverse;
  }

  .xs-hero__image {
    min-height: 200px;
  }

  .xs-hero__text {
    padding: 18px;
  }

  .xs-hero__tile {
    flex-direction: column-reverse;
    align-items: flex-start;
    padding: 12px;
    border-radius: 20px;
  }

  .xs-hero__tile-image {
    width: 100%;
    height: 96px;
  }

  /* Na telefonie kafelek rośnie z treścią — tytuł w całości. */
  .xs-hero__tile-name {
    display: block;
    font-size: 13px;
  }

  .xs-leasing {
    gap: 16px;
    padding: 18px;
  }
}
