/* ==========================================================================
   Swipeo — przeglądanie ofert na www (format pionowy jak Shorts)
   ========================================================================== */

body.feed-body { background: var(--f-bg); color: var(--f-text); }
body.feed-body a:not([class]) { color: #C9B8FF; }
body.feed-body a:not([class]):hover { color: #fff; }
body.feed-body .modal a:not([class]) { color: var(--c-primary); }
body.feed-body :focus-visible { outline-color: #C9B8FF; }

.wf { min-height: 100vh; display: flex; flex-direction: column; }

/* --- Pasek górny --- */
.wf-header { height: var(--header-h); padding: 0 20px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid #2A2350; flex-shrink: 0; }
.wf-search { flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; background: var(--f-surface); border: 1px solid var(--f-line); border-radius: var(--r-pill); padding: 0 16px; }
.wf-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: inherit; font-size: var(--fs-sm); padding: 11px 0; }
.wf-search input::placeholder { color: var(--f-muted); }
.wf-search input:focus { outline: none; }
.wf-search:focus-within { border-color: #8D7FD6; }
.wf-header__actions { display: flex; gap: 10px; align-items: center; margin-left: auto; flex-shrink: 0; }
.btn--dark-soft { --btn-bg: var(--f-surface); --btn-fg: #fff; --btn-bd: var(--f-line); border-radius: var(--r-pill); }
.wf-header .btn--primary { border-radius: var(--r-pill); }

/* --- Układ --- */
.wf-body { flex: 1; display: flex; min-height: 0; }
.wf-side { width: 232px; flex-shrink: 0; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid #2A2350; font-size: var(--fs-sm); }
.wf-side__item { font: inherit; font-size: var(--fs-sm); text-align: left; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: var(--touch); border: 0; border-radius: 10px; background: transparent; color: var(--c-navy-text); cursor: pointer; text-decoration: none; }
.wf-side__item:hover { background: rgba(255,255,255,.05); color: #fff; }
.wf-side__item[aria-current="page"], .wf-side__item[aria-pressed="true"] { background: var(--f-raised); color: #fff; font-weight: 600; }
.wf-side__dot { width: 10px; height: 10px; border-radius: 3px; }
.wf-side__sep { height: 1px; background: #2A2350; margin: 10px 4px; }
.wf-side__label { font-size: 12px; font-weight: 600; color: var(--f-muted); padding: 4px 12px; text-transform: uppercase; letter-spacing: .06em; }
.wf-side__foot { margin-top: auto; padding: 12px; font-size: 12px; line-height: 1.7; color: var(--f-muted); }
.wf-side__foot a { color: var(--f-muted); }
.wf-side__foot a.strong { color: #C9B8FF; }

.wf-stage { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; }

/* --- Karta oferty --- */
.wf-card { position: relative; width: 420px; height: min(746px, calc(100vh - var(--header-h) - 48px)); aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; flex-shrink: 0; box-shadow: 0 30px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; transition: opacity .2s ease, transform .25s ease; }
.wf-card.is-leaving-up { opacity: 0; transform: translateY(-24px); }
.wf-card.is-leaving-down { opacity: 0; transform: translateY(24px); }
.wf-card__image { position: absolute; inset: 70px 0 300px; display: flex; align-items: center; justify-content: center; }
.wf-card__image img { width: 100%; height: 100%; object-fit: contain; }
.wf-card__progress { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 4px; }
.wf-card__progress[hidden] { display: none; }
.wf-card__progress span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.45); transition: background-color .2s; }
.wf-card__progress span.is-active { background: #fff; }

/* --- Galeria zdjęć w karcie (kilka zdjęć: przesuwanie w poziomie) --- */
.wf-card__image.is-gallery { overflow: hidden; touch-action: pan-y; cursor: grab; }
.wf-card__image.is-gallery:active { cursor: grabbing; }
.wf-gallery__track { display: flex; width: 100%; height: 100%; transition: transform .3s cubic-bezier(.2, .7, .3, 1); will-change: transform; }
.wf-gallery__track img { flex: 0 0 100%; min-width: 0; user-select: none; -webkit-user-drag: none; }
/* środek obszaru zdjęcia: .wf-card__image ma inset 70px 0 300px */
.wf-gallery__nav {
  position: absolute; top: calc(70px + (100% - 370px) / 2); transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(22,18,46,.45); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s, background-color .15s;
}
.wf-gallery__nav[hidden] { display: none; }
.wf-gallery__nav--prev { left: 10px; }
.wf-gallery__nav--next { right: 10px; }
.wf-card:hover .wf-gallery__nav, .wf-gallery__nav:focus-visible { opacity: 1; }
.wf-gallery__nav:hover { background: rgba(22,18,46,.7); }
.wf-card:hover .wf-gallery__nav:disabled { opacity: .3; cursor: default; }
.wf-gallery__count {
  position: absolute; top: 28px; right: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: var(--r-pill); background: rgba(22,18,46,.35);
}
.wf-gallery__count[hidden] { display: none; }
@media (hover: none) { .wf-gallery__nav { display: none; } }
.wf-card__chips { position: absolute; top: 28px; left: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.wf-card__chip { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill); background: rgba(22,18,46,.35); }
.wf-card__code { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill); background: #fff; color: var(--c-ink); font-family: var(--font-mono); }
.wf-card__info { position: relative; padding: 80px 18px 18px; background: linear-gradient(transparent, rgba(22,18,46,.9) 32%); display: flex; flex-direction: column; gap: 8px; }
.wf-card__who { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.wf-card__who span { color: var(--c-navy-text); }
.wf-card__who .avatar { color: var(--c-ink); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--c-ink); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wf-card__title { font-size: 21px; font-weight: 600; line-height: 1.25; }
.wf-card__note { font-size: var(--fs-sm); line-height: 1.5; color: var(--f-soft); }
.wf-card__price { display: flex; align-items: baseline; gap: 10px; }
.wf-card__price strong { font-size: 30px; }
.wf-card__price s { font-size: 15px; color: var(--c-navy-text); }
body.feed-body .wf-card .btn--accent { color: var(--c-accent-ink); }

/* --- Akcje obok karty --- */
.wf-rail { display: flex; flex-direction: column; gap: 18px; align-self: flex-end; padding-bottom: 40px; font-size: 12px; font-weight: 600; text-align: center; }
.wf-rail__btn { font: inherit; border: 0; background: none; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wf-rail__icon { width: 52px; height: 52px; border-radius: 50%; background: var(--f-raised); display: flex; align-items: center; justify-content: center; transition: background-color .15s; }
.wf-rail__btn:hover .wf-rail__icon { background: var(--f-line); }
.wf-rail__btn[aria-pressed="true"] .wf-rail__icon { background: var(--c-primary); }
.wf-rail__btn[data-liked="true"] svg { fill: #FF6FAE; stroke: #FF6FAE; }

/* --- Panel komentarzy --- */
.wf-comments { width: 380px; height: min(746px, calc(100vh - var(--header-h) - 48px)); flex-shrink: 0; background: var(--f-surface); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; }
.wf-comments__head { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--f-line); }
.wf-comments__head h2 { font-size: var(--fs-md); }
.wf-comments__list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 16px; list-style: none; margin: 0; }
.wf-comment { display: flex; gap: 10px; font-size: 13px; line-height: 1.5; }
.wf-comment--reply { margin-left: 44px; }
.wf-comment .avatar { width: 34px; height: 34px; }
.wf-comment__badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--f-line); color: var(--f-soft); }
.wf-comment__time { color: var(--f-muted); font-size: 11px; }
.wf-comment p { color: var(--f-soft); white-space: pre-line; overflow-wrap: anywhere; }
.wf-comment > div { min-width: 0; }
/* „Odpowiedz” — mały tekst, ale cel dotyku 44 px (ujemny margines trzyma układ) */
.wf-comment__reply-btn { background: none; border: 0; padding: 12px 4px; margin: -12px 0 -12px 2px; min-height: 44px; font: inherit; font-size: 11px; font-weight: 600; color: var(--f-muted); cursor: pointer; }
.wf-comment__reply-btn:hover, .wf-comment__reply-btn:focus-visible { color: #fff; }
.wf-comments__more-row { text-align: center; }
.wf-comments__more { background: var(--f-raised); color: var(--f-soft); border: 0; border-radius: var(--r-pill); min-height: 44px; padding: 0 18px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.wf-comments__more:hover { background: var(--f-line); }
.wf-comments__state { color: var(--f-muted); font-size: 13px; }
.wf-comments__foot { padding: 12px 16px 16px; border-top: 1px solid var(--f-line); }

/* --- Formularz komentarza --- */
.wf-comment-form { display: flex; flex-direction: column; gap: 8px; }
.wf-comment-form__row { display: flex; align-items: flex-end; gap: 8px; }
.wf-comment-form__input { flex: 1; min-height: 44px; max-height: 140px; resize: none; padding: 11px 16px; border-radius: 22px; border: 1px solid var(--f-line); background: var(--f-raised); color: var(--f-text); font: inherit; font-size: 13px; line-height: 1.5; }
.wf-comment-form__input::placeholder { color: var(--f-muted); }
.wf-comment-form__input:focus { outline: none; border-color: var(--f-muted); }
.wf-comment-form__send { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 0; background: var(--c-primary); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.wf-comment-form__send:disabled { opacity: .5; cursor: default; }
.wf-comment-form__reply { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--f-muted); }
.wf-comment-form__reply strong { color: var(--f-soft); }
.wf-comment-form__cancel { margin-left: auto; background: none; border: 0; min-height: 44px; padding: 0 4px; font: inherit; font-size: 12px; font-weight: 600; color: var(--f-soft); cursor: pointer; }
.wf-comment-form__error { font-size: 12px; color: var(--s-bad-bg); }
.wf-comment-form__error:empty { display: none; }
.icon-btn-dark { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--f-raised); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* --- Nawigacja góra/dół --- */
.wf-nav { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.wf-nav__btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--f-raised); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wf-nav__btn:hover { background: var(--f-line); }
.wf-nav__pos { font-size: 11px; color: var(--f-muted); }
.wf-hint { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-size: 12px; color: var(--f-muted); white-space: nowrap; }
.kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--f-line); border-bottom-width: 2px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; text-align: center; }

/* --- Responsywność --- */
@media (max-width: 1200px) { .wf-comments { position: absolute; right: 16px; top: 24px; z-index: 5; } }
@media (max-width: 900px) {
  .wf-side, .wf-search, .wf-nav, .wf-hint, .wf-header__actions .btn--dark-soft { display: none; }
  .wf-stage { padding: 0; align-items: stretch; }
  .wf-card { width: 100%; height: calc(100vh - var(--header-h)); border-radius: 0; aspect-ratio: auto; }
  .wf-rail { position: absolute; right: 10px; bottom: 260px; padding: 0; z-index: 3; }
  .wf-rail__icon { background: rgba(22,18,46,.45); }
  .wf-comments { position: fixed; inset: auto 0 0 0; width: auto; height: 70vh; border-radius: 24px 24px 0 0; z-index: 20; }
}

/* --- Udostępnij (okno z linkiem /s/{id} i celami udostępniania) --- */
.share { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.share__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share__close { width: 44px; height: 44px; margin: -10px -12px -10px 0; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--c-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.share__close:hover { background: var(--c-bg-soft); color: var(--c-ink); }
.share__offer { font-size: var(--fs-sm); color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share__link { display: flex; gap: 8px; }
.share__link .input { flex: 1; min-width: 0; font-size: var(--fs-sm); }
.share__link .btn { flex-shrink: 0; }
.share__status { min-height: 1.4em; margin-top: -6px; font-size: var(--fs-xs); font-weight: 600; color: var(--s-good); }
.share__targets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); gap: 4px; }
.share__targets li[hidden] { display: none; }
.share__target { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 2px; border: 0; border-radius: var(--r-md); background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--c-ink); text-decoration: none; cursor: pointer; }
.share__icon { width: 48px; height: 48px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary-ink); display: flex; align-items: center; justify-content: center; transition: background-color .15s, color .15s; }
.share__target:hover .share__icon, .share__target:focus-visible .share__icon { background: var(--c-primary); color: #fff; }

/* --- „Obserwuj” (okno z marką, autorem i sklepem oferty) --- */
.follow__desc { margin-top: -6px; font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.5; }
.follow__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.follow__row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: var(--r-lg); background: var(--c-bg-soft); }
.follow__icon { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--c-primary-soft); color: var(--c-primary); }
.follow__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.follow__meta span { font-size: var(--fs-xs); color: var(--c-muted); }
.follow__meta strong { overflow-wrap: break-word; line-height: 1.3; }
.follow__btn { flex-shrink: 0; min-width: 128px; padding-inline: 16px; }
@media (max-width: 420px) { .follow__btn { min-width: 0; } .follow__icon { display: none; } .follow__row { padding-left: 14px; } }
.follow__btn.is-on { --btn-bg: var(--c-primary-soft); --btn-fg: var(--c-primary-ink); --btn-bd: transparent; background: var(--c-primary-soft); box-shadow: none; }
.follow__status { margin-top: -6px; }
.follow__status.is-error { color: var(--s-bad); }
.follow__manage { align-self: flex-start; font-size: var(--fs-sm); font-weight: 600; }
.wf-rail__btn.is-following .wf-rail__icon { background: var(--c-primary); }

/* --- Widok „Obserwowane” (/okazje/obserwowane): przełącznik na telefonie, pusta lista --- */
.wf-tabs { display: none; }
.wf-empty { max-width: 420px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--c-navy-text); }
.wf-empty__icon { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--f-raised); color: #C9B8FF; }
.wf-empty h1 { font-size: var(--fs-xl); color: #fff; }
.wf-empty p { font-size: var(--fs-sm); line-height: 1.6; }
.wf-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
@media (max-width: 900px) {
  .wf-header { gap: 10px; padding: 0 12px; }
  .wf-tabs { display: flex; gap: 2px; margin: 0 auto; }
  .wf-tabs__item { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--f-muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .wf-tabs__item[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
  .wf-tabs + .wf-search + .wf-header__actions { margin-left: 0; }
  .wf-stage:has(.wf-empty) { align-items: center; }
}
@media (max-width: 420px) { .wf-header .logo > span:last-child { display: none; } }
