/* === Виджет поиска === */
.ts-wrap {
  background: #c6ef6e;
  border-radius: 24px;
  padding: 28px 32px 22px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 1260px;
  margin: 24px auto;
  box-sizing: border-box;
}
.ts-wrap *, .ts-wrap *::before, .ts-wrap *::after { box-sizing: border-box; }

.ts-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.ts-tab {
  background: rgba(255,255,255,.4); border: 2px solid rgba(0,0,0,.12);
  border-radius: 100px; padding: 7px 20px;
  font-size: 13px; font-weight: 700; cursor: pointer; color: #1a4a00;
  transition: all .15s; line-height: 1; font-family: inherit;
}
.ts-tab:hover { background: rgba(255,255,255,.65); }
.ts-tab.active { background: #1e6b1e; border-color: #1e6b1e; color: #fff; }

/* Единая поисковая строка */
.ts-bar {
  display: flex; align-items: stretch;
  background: #fff; border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.13);
  /* overflow: visible — чтобы кастомные дропдауны выходили за пределы бара */
}
.ts-field {
  flex: 1; display: flex; align-items: center;
  padding: 14px 18px; gap: 12px;
  border-right: 1.5px solid #f0f0f0; min-width: 0;
}
.ts-fi { font-size: 18px; flex-shrink: 0; }
.ts-fl { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 3px; }
.ts-fl-label {
  font-size: 10px; font-weight: 800; color: #bbb;
  text-transform: uppercase; letter-spacing: .6px; line-height: 1;
}
.ts-fl-select {
  border: none; outline: none; appearance: none;
  background: transparent; width: 100%; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #1a1a1a;
  font-family: inherit; padding: 0;
}
.ts-btn-find {
  background: #1e6b1e; color: #fff; border: none;
  border-radius: 0 16px 16px 0;
  padding: 0 28px; font-size: 15px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
  font-family: inherit; transition: background .15s; flex-shrink: 0;
}
.ts-field:first-of-type { border-radius: 16px 0 0 16px; }

/* === Кастомные дропдауны === */
.ts-cs { position: relative; flex: 1; min-width: 0; }
.ts-cs select {
  position: absolute; opacity: 0; pointer-events: none;
  width: 100%; height: 100%; top: 0; left: 0;
}
.ts-cs__display {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600; color: #1a1a1a;
}
.ts-cs__value {
  flex: 1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ts-cs__arrow {
  color: #999; font-size: 11px; margin-left: 10px;
  transition: transform .2s;
}
.ts-cs.open .ts-cs__arrow { transform: rotate(180deg); }
.ts-cs__menu {
  display: none; position: absolute;
  top: calc(100% + 18px); left: -18px; right: -18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.18);
  max-height: 340px; overflow-y: auto;
  z-index: 100; padding: 6px 0;
}
.ts-cs.open .ts-cs__menu { display: block; }
.ts-cs__opt {
  padding: 10px 18px; cursor: pointer;
  font-size: 14px; color: #292d32;
  transition: background .12s;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ts-cs__opt:hover { background: #f4f9f0; color: #1e6b1e; }
.ts-cs__opt.selected {
  background: #c6ef6e; color: #1a4a00; font-weight: 700;
}
.ts-cs__menu::-webkit-scrollbar { width: 8px; }
.ts-cs__menu::-webkit-scrollbar-thumb { background: #c8d8c8; border-radius: 4px; }
.ts-btn-find:hover { background: #155015; }

.ts-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 12px; flex-wrap: wrap; }
.ts-archive-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #1a4a00;
  cursor: pointer; user-select: none;
  font-family: inherit;
}
.ts-archive-toggle input {
  width: 16px; height: 16px; accent-color: #1e6b1e;
  cursor: pointer; margin: 0;
}
.ts-archive-toggle:hover { opacity: .8; }
.ts-link {
  background: none; border: none; padding: 0;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; color: #555; transition: opacity .15s;
}
.ts-link:hover { opacity: .7; }
.ts-status { font-size: 13px; font-weight: 600; color: #2a5a00; margin-top: 8px; min-height: 14px; }

/* === Каталог === */
.ts-catalog { padding: 32px 0 48px; font-family: 'Poppins', sans-serif; }
.ts-catalog-top {
  max-width: 1260px; margin: 0 auto 20px;
  display: flex; align-items: center; padding: 0 20px;
}
.ts-count { font-size: 14px; font-weight: 600; color: #888; }
.ts-grid {
  max-width: 1260px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

/* Карточка */
.ts-card {
  background: #fff; border-radius: 14px; border: 1.5px solid #e2ede2;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.ts-card:hover { box-shadow: 0 8px 28px rgba(0,80,0,.12); transform: translateY(-3px); border-color: #afd8af; }
.ts-card__img {
  aspect-ratio: 16/10;
  overflow: hidden;
  flex-shrink: 0;
  background: #f4f6f4;          /* подложка, если картинка уже соотношения 16:10 */
  display: flex; align-items: center; justify-content: center;
}
.ts-card__img img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;           /* картинка влезает целиком, без обрезания */
  display: block;
}
.ts-card__img--empty { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); display: flex; align-items: center; justify-content: center; }
.ts-card__img--empty::after { content: '✈'; font-size: 42px; opacity: .35; }
.ts-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.ts-card__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 2px; }
.ts-card__tag { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 20px; }
.ts-tag-archived { background: #ffe7d0; color: #b85c00; }
.ts-card--archived { opacity: .72; }
.ts-card--archived:hover { opacity: 1; }
.ts-card--archived .ts-card__img img { filter: grayscale(.4); }
.ts-card__title { font-size: 14px !important; font-weight: 700 !important; color: #111 !important; line-height: 1.35 !important; margin: 0 !important; }
.ts-card__desc {
  font-size: 12px; color: #666; line-height: 1.5; flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.ts-card__desc p { margin: 0; }
.ts-card__price { font-size: 18px; font-weight: 800; color: #1a5e1a; margin-top: 4px; }
.ts-card__btn {
  display: block; width: 100%; margin-top: 10px; box-sizing: border-box;
  background: #2a7a2a; color: #fff !important; border: none; border-radius: 9px;
  padding: 10px 18px; font-size: 13px; font-weight: 700;
  text-align: center; cursor: pointer; text-decoration: none !important;
  font-family: inherit; transition: background .15s;
}
.ts-card__btn:hover { background: #1d5e1d; color: #fff !important; }

.ts-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; }
.ts-empty__icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.ts-empty__title { font-size: 18px; font-weight: 700; color: #555; margin-bottom: 6px; }
.ts-empty__text { font-size: 14px; color: #999; }

.ts-more-wrap { max-width: 1260px; margin: 28px auto 0; text-align: center; padding: 0 20px; }
.ts-btn-load {
  background: #fff; color: #1e6b1e; border: 2px solid #1e6b1e; border-radius: 12px;
  padding: 12px 40px; font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.ts-btn-load:hover { background: #1e6b1e; color: #fff; }
.ts-btn-load.hidden { display: none; }

@media (max-width: 960px) {
  .ts-wrap { padding: 20px 16px 18px; border-radius: 16px; margin: 16px; }
  .ts-bar { flex-direction: column; border-radius: 14px; }
  .ts-field { border-right: none !important; border-bottom: 1.5px solid #f0f0f0; }
  .ts-btn-find { padding: 16px; justify-content: center; }
  .ts-grid { grid-template-columns: repeat(2, 1fr); }
  .ts-catalog { padding: 24px 0 36px; }
}
@media (max-width: 580px) {
  .ts-grid { grid-template-columns: 1fr; }
}
