:root {
  --am-list-purple: #5e4394;
  --am-list-purple-2: #7b4bc6;
  --am-list-purple-soft: #f5f1fb;
  --am-list-border: #ebe4f2;
  --am-list-text: #171321;
  --am-list-muted: #6f687b;
  --am-list-red: #e5384f;
  --am-list-orange: #ff971c;
  --am-list-green: #0b9d45;
  --am-list-bg: #fbfafc;
}

.am-category-compact {
  background: var(--am-list-bg);
}

.am-category-compact .tour-list-content {
  min-width: 0;
}

/* ============================================================
   Góra listy: licznik + sortowanie
   ============================================================ */

.am-results-bar--compact-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.am-results-bar--compact-list .am-results-count,
.am-season-layout__toolbar > .am-results-count {
  color: var(--am-list-muted);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
}

.am-results-bar--compact-list .am-results-count strong,
.am-season-layout__toolbar > .am-results-count strong {
  color: var(--am-list-text);
  font-weight: 950;
}

.am-sort-form--compact-list {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.am-sort-form__label {
  margin: 0;
  color: var(--am-list-muted);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.am-sort-form--compact-list .am-sort-select {
  width: 190px;
  min-height: 42px;
  padding: 0 38px 0 15px;
  border: 1px solid var(--am-list-border);
  border-radius: 999px;
  background-color: #fff;
  color: var(--am-list-text);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(48, 34, 78, 0.04);
}

.am-season-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px 24px;
  padding-block-start: clamp(20px, 3vw, 42px);
}

.am-season-layout > .amx-sidebar-col {
  order: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
}

.am-season-layout__toolbar {
  min-width: 0;
  scroll-margin-top: calc(var(--am-site-header-height, 96px) + 12px);
}

.am-season-layout__toolbar .am-results-bar {
  margin-block-end: 10px;
}

.am-season-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(max-content, 1.1fr) minmax(0, 1fr);
  gap: 2px;
  width: min(100%, 390px);
  min-width: 0;
  padding: 3px;
  border-radius: 999px;
  background: #f0ebf7;
}

.am-season-switch .am-season-switch__link {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 4px;
  border-radius: inherit;
  color: var(--am-list-text);
  font-size: clamp(.75rem, 3.4vw, .85rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.am-season-switch .am-season-switch__link:hover {
  color: var(--am-list-purple);
  background: #ffffffa6;
}

.am-season-switch .am-season-switch__link[aria-current] {
  color: #4f2e91;
  background: #fff;
  box-shadow: 0 2px 7px rgb(48 34 78 / 12%);
}

.am-season-switch .am-season-switch__link:focus-visible {
  outline: 2px solid var(--am-list-purple);
  outline-offset: -2px;
}

@media (min-width: 768px) {
  .am-season-layout {
    grid-template-columns: minmax(205px, 1fr) minmax(0, 2.8fr);
    grid-template-rows: auto 1fr;
  }

  .am-season-layout__toolbar {
    grid-area: 1 / 2;
  }

  .am-season-layout > .amx-sidebar-col {
    grid-area: 1 / 1 / span 2;
  }

  .am-season-layout__results {
    grid-area: 2 / 2;
  }
}

/* ============================================================
   Trustbar
   ============================================================ */

.am-compact-trustbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  border: 1px solid var(--am-list-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(48, 34, 78, 0.045);
  overflow: hidden;
}

.am-compact-trustbar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 13px 17px;
}

.am-compact-trustbar__item + .am-compact-trustbar__item {
  border-left: 1px solid var(--am-list-border);
}

.am-compact-trustbar__item i {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--am-list-purple-soft);
  color: var(--am-list-purple);
  font-size: 19px;
  line-height: 1;
}

.am-compact-trustbar__item span {
  display: block;
  color: var(--am-list-muted);
  font-size: 12px;
  line-height: 1.35;
}

.am-compact-trustbar__item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--am-list-text);
  font-size: 13px;
  line-height: 1.15;
  font-weight: 950;
}

/* ============================================================
   Lista produktów, osobne karty
   ============================================================ */

.am-offer-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.am-offer-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 210px;
  gap: 0;
  align-items: stretch;
  min-height: 190px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--am-list-border);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(48, 34, 78, 0.05);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.am-offer-row + .am-offer-row {
  border-top: 1px solid var(--am-list-border);
}

.am-offer-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(48, 34, 78, 0.08);
  border-color: #dfd3ec;
  background: #fff;
}

.am-offer-row.is-sold-out {
  opacity: 0.78;
}

/* zdjęcie od granicy do granicy */

.am-offer-row__image {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 190px;
  overflow: hidden;
  border-radius: 0;
  background: #eee;
  text-decoration: none;
}

.am-offer-row__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* treść */

.am-offer-row__content {
  min-width: 0;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.am-offer-row__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.am-offer-row__title {
  margin: 0;
  color: var(--am-list-text);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 950;
}

.am-offer-row__title a {
  color: inherit;
  text-decoration: none;
}

.am-offer-row__title a:hover {
  color: var(--am-list-purple);
}

/* statusy */

.am-offer-row__statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.am-offer-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.am-offer-status i {
  font-size: 13px;
  line-height: 1;
}

.am-offer-status--urgent {
  color: #9a5300;
  background: #fff6e6;
  border-color: #ffd99a;
}

.am-offer-status--promo {
  color: #d8233c;
  background: #fff0f2;
  border-color: #ffcbd3;
}

.am-offer-status--confirmed {
  color: #087a3b;
  background: #eefbf4;
  border-color: #bdeccc;
}

.am-offer-status--soldout {
  color: #991b1b;
  background: #fff0f0;
  border-color: #fecaca;
}

.am-offer-status--code {
  color: var(--am-list-purple);
  background: var(--am-list-purple-soft);
  border-color: #e7d9f4;
}

/* meta */

.am-offer-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 14px;
  color: var(--am-list-text);
  font-size: 14px;
  line-height: 1.35;
}

.am-offer-row__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.am-offer-row__meta i {
  color: var(--am-list-purple);
  font-size: 17px;
  line-height: 1;
}

.am-offer-row__meta strong {
  font-weight: 950;
}

/* ukrycie linii: Pierwszy: Turnus... */

.am-offer-row__date {
  display: none !important;
}

/* prawa kolumna: cena i CTA */

.am-offer-row__side {
  min-width: 0;
  padding: 24px 24px 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  border-left: 1px solid #f1ebf6;
}

.am-offer-row__price {
  text-align: right;
}

.am-offer-row__price del {
  display: block;
  margin-bottom: 5px;
  color: #9f97aa;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  text-decoration-thickness: 2px;
}

.am-offer-row__price strong {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 5px;
  color: var(--am-list-red);
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.am-offer-row__price strong span {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.am-offer-row__lowest-price {
  display: block;
  max-width: 190px;
  margin: 5px 0 0 auto;
  color: #756e80;
  font-size: 9.5px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: 0;
  text-align: right;
}

.am-offer-row__lowest-price b {
  color: #3f374c;
  font-weight: 950;
  white-space: nowrap;
}

.am-offer-row__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 170px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--am-list-purple), var(--am-list-purple-2));
  color: #fff !important;
  text-decoration: none !important;
  font-size: 14px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(94, 67, 148, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.am-offer-row__cta:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(94, 67, 148, 0.26);
}

.am-offer-row__cta--secondary {
  background: #6b6475;
  box-shadow: none;
}

.am-compact-pagination {
  margin-top: 22px;
}

/* ============================================================
   Aktywne filtry
   ============================================================ */

.am-category-compact .am-active-filters {
  margin-bottom: 14px;
}

/* ============================================================
   Tablet
   ============================================================ */

@media (max-width: 1199px) {
  .am-compact-trustbar {
    grid-template-columns: 1fr;
  }

  .am-compact-trustbar__item + .am-compact-trustbar__item {
    border-left: 0;
    border-top: 1px solid var(--am-list-border);
  }

  .am-offer-row {
    grid-template-columns: 240px minmax(0, 1fr) 185px;
    min-height: 176px;
  }

  .am-offer-row__image {
    min-height: 176px;
  }

  .am-offer-row__content {
    padding: 22px 22px;
  }

  .am-offer-row__side {
    padding: 22px 20px 22px 12px;
  }

  .am-offer-row__title {
    font-size: 19px;
  }

  .am-offer-row__price strong {
    font-size: 27px;
  }

  .am-offer-row__cta {
    min-width: 150px;
    min-height: 46px;
  }
}

/* ============================================================
   Tablet / mały laptop
   ============================================================ */

@media (max-width: 991px) {
  .am-results-bar--compact-list {
    align-items: flex-start;
    flex-direction: column;
  }

  .am-sort-form--compact-list {
    width: 100%;
    justify-content: space-between;
  }

  .am-sort-form--compact-list .am-sort-select {
    width: 190px;
  }

  .am-offer-row {
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: auto;
  }

  .am-offer-row__image {
    min-height: 100%;
  }

  .am-offer-row__side {
    grid-column: 2;
    padding: 0 22px 22px;
    border-left: 0;
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    gap: 14px;
  }

  .am-offer-row__price {
    text-align: left;
  }

  .am-offer-row__price strong {
    justify-content: flex-start;
  }

  .am-offer-row__lowest-price {
    margin-left: 0;
    text-align: left;
  }
}

/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 767px) {
  .am-compact-trustbar {
    margin: 12px 0 16px;
    border-radius: 14px;
  }

  .am-compact-trustbar__item {
    min-height: auto;
    padding: 11px 13px;
  }

  .am-compact-trustbar__item i {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 18px;
  }

  .am-offer-list {
    gap: 14px;
  }

  .am-offer-row {
    grid-template-columns: 1fr;
    border-radius: 20px;
    min-height: auto;
  }

  .am-offer-row__image {
    min-height: 210px;
    height: 210px;
  }

  .am-offer-row__content {
    padding: 16px 16px 10px;
  }

  .am-offer-row__title {
    font-size: 18px;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .am-offer-row__statuses {
    gap: 6px;
  }

  .am-offer-status {
    min-height: 22px;
    padding: 4px 8px;
    font-size: 10.5px;
  }

  .am-offer-row__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-top: 12px;
    font-size: 12px;
  }

  .am-offer-row__meta span {
    white-space: normal;
  }

  .am-offer-row__meta i {
    font-size: 14px;
  }

  .am-offer-row__side {
    grid-column: auto;
    padding: 0 16px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
    border-left: 0;
    border-top: 1px solid #eee8f5;
    margin-top: 0;
  }

  .am-offer-row__price strong {
    font-size: 24px;
  }

  .am-offer-row__price strong span {
    font-size: 14px;
  }

  .am-offer-row__cta {
    min-width: 140px;
    min-height: 42px;
    padding: 0 16px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .am-sort-form--compact-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .am-sort-form--compact-list .am-sort-select {
    width: 100%;
  }

  .am-season-layout__toolbar .am-sort-form--compact-list {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .am-season-layout__toolbar .am-sort-select {
    min-width: 0;
    padding-inline-end: 24px;
  }

  .am-offer-row__image {
    height: 180px;
    min-height: 180px;
  }

  .am-offer-row__meta {
    grid-template-columns: 1fr;
  }

  .am-offer-row__side {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .am-offer-row__cta {
    width: 100%;
  }
}

/* ============================================================
   FIX: desktop zawsze rozwinięte filtry
   ============================================================ */

@media (min-width: 992px) {
  .amx-filters-toggle {
    display: none !important;
  }

  .amx-filters-static-head {
    display: flex !important;
  }

  .amx-filters-panel,
  .amx-filters-panel[hidden] {
    display: block !important;
  }
}

/* ============================================================
   FIX: mobile zwinięte filtry bez szpary
   ============================================================ */

@media (max-width: 991px) {
  .amx-tour-list-sidebar {
    gap: 10px !important;
  }

  .amx-filters-static-head {
    display: none !important;
  }

  .amx-filters-toggle {
    order: -1;
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--amx-purple), var(--amx-purple-2));
    color: #fff;
    font-size: 14px;
    line-height: 1;
    font-weight: 950;
    box-shadow: 0 12px 24px rgba(94, 67, 148, 0.16);
  }

  .amx-filters-toggle.is-open {
    border-radius: 18px 18px 0 0;
    margin-bottom: -10px;
  }

  .amx-filters-panel {
    order: 0;
    border: 1px solid var(--amx-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(48, 34, 78, 0.045);
    overflow: hidden;
  }

  .amx-filters-toggle.is-open + .amx-filters-static-head + .amx-filters-panel,
  .amx-filters-toggle.is-open ~ .amx-filters-panel {
    border-radius: 0 0 18px 18px;
  }

  .amx-filters-panel[hidden] {
    display: none !important;
  }

  .amx-filters-panel.is-open {
    display: block !important;
  }
}

/* ============================================================
   Mobile: katalog tylko jako sticky bar
   ============================================================ */

@media (max-width: 991px) {
  .amx-widget--katalog-compact {
    display: none !important;
  }

  .amx-katalog-bar {
    display: none;
  }

  .amx-katalog-bar.is-visible {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9999;
    width: auto;
    max-width: none;
    transform: none;
    display: block !important;
  }

  .amx-katalog-bar__inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(48, 34, 78, 0.2);
  }

  .amx-katalog-bar__left {
    min-width: 0;
    flex: 1;
  }

  .amx-katalog-bar__thumb {
    width: 34px;
    height: 44px;
    flex: 0 0 34px;
    border-radius: 8px;
  }

  .amx-katalog-bar__copy {
    min-width: 0;
  }

  .amx-katalog-bar__title {
    max-width: 100%;
    font-size: 12.5px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .amx-katalog-bar__meta {
    font-size: 10.5px;
  }

  .amx-katalog-bar__right {
    flex: 0 0 auto;
    gap: 6px;
  }

  .amx-katalog-bar__btn {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11.5px;
  }

  .amx-katalog-bar__close {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  .amx-katalog-bar.is-visible {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .amx-katalog-bar__inner {
    gap: 8px;
  }

  .amx-katalog-bar__btn {
    padding: 0 10px;
  }
}
