.cat-slider { position: relative; }
.cat-slider__track {
  display: grid;
  grid-template-columns: repeat(var(--cat-cols, 3), minmax(0, 1fr));
  gap: 16px;
}
.draft-categories--slider .cat-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
}
.draft-categories--slider .cat-slider__track::-webkit-scrollbar { display: none; }
.cat-slider__track:focus-visible { outline: 3px solid #8e963d; outline-offset: 4px; }

.draft-categories .draft-category {
  position: relative;
  overflow: hidden;
  min-height: var(--cat-h, 340px);
  isolation: isolate;
}
.draft-categories--slider .draft-category {
  flex: 0 0 calc((100% - 16px * (var(--cat-cols, 3) - 1)) / var(--cat-cols, 3));
  scroll-snap-align: start;
}
.draft-categories--slider .draft-category--wide {
  flex-basis: calc((100% - 16px * (var(--cat-cols, 3) - 1)) / var(--cat-cols, 3) * 2 + 16px);
}
.draft-categories--grid .draft-category--wide { grid-column: span 2; }

.draft-category__body { display: flex; flex-direction: column; flex: 1 1 auto; }
.draft-category__body .draft-category__action { margin-top: auto; }

/* Kafelek ze zdjęciem w tle — selektory z .draft-categories, żeby wygrać z draft-offer.css */
.draft-categories .draft-category.draft-category--photo { border-color: transparent; color: #fff; background: #151a10; }
.draft-categories .draft-category.draft-category--photo h3 { color: #fff; margin-top: 0; }
.draft-categories .draft-category.draft-category--photo p { color: rgba(255, 255, 255, 0.88); margin-bottom: 18px; }
.draft-categories .draft-category.draft-category--photo .draft-category__action { color: #fff; margin-top: 0; }
.draft-categories .draft-category.draft-category--photo:hover { background: #151a10; color: #fff; }
.draft-categories .draft-category.draft-category--photo:hover p { color: #fff; }
.draft-categories .draft-category.draft-category--photo .draft-category__body { justify-content: flex-end; }
.draft-category__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.draft-category--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(9, 11, 9, 0.1) 0%, rgba(9, 11, 9, 0.35) 35%, rgba(9, 11, 9, 0.92) 100%);
}
.draft-categories .draft-category.draft-category--photo .draft-category__top { color: #fff; justify-content: flex-end; }
.draft-category--photo:hover .draft-category__bg { transform: scale(1.04); }

/* Nawigacja slidera */
.cat-slider__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}
.cat-slider__nav[hidden] { display: none; }
.cat-slider__arrow {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #b9bea8;
  background: #fff;
  color: var(--draft-ink, #151a10);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, opacity 0.18s;
}
.cat-slider__arrow:hover:not(:disabled) { background: var(--draft-olive, #4b5320); border-color: var(--draft-olive, #4b5320); color: #fff; }
.cat-slider__arrow:disabled { opacity: 0.35; cursor: default; }
.cat-slider__arrow:focus-visible { outline: 3px solid #8e963d; outline-offset: 3px; }
.cat-slider__dots { display: flex; gap: 8px; }
.cat-slider__dots span { width: 28px; height: 4px; background: #cfd3c0; transition: background 0.2s; }
.cat-slider__dots span.is-active { background: var(--draft-olive, #4b5320); }

@media (max-width: 899px) {
  .draft-categories--slider .draft-category { flex-basis: 72%; }
  .draft-categories--slider .draft-category--wide { flex-basis: 86%; }
  .draft-categories--grid .cat-slider__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 649px) {
  .draft-categories .draft-category { min-height: min(var(--cat-h, 340px), 320px); }
  .draft-categories--slider .draft-category,
  .draft-categories--slider .draft-category--wide { flex-basis: 84%; }
  .draft-categories--grid .cat-slider__track { grid-template-columns: 1fr; }
  .draft-categories--grid .draft-category--wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .draft-categories--slider .cat-slider__track { scroll-behavior: auto; }
  .draft-category__bg { transition: none; }
}
