/* ==========================================================================
   SeedsVision — Variety catalogue (public list/single + org cabinet)
   Builds on news.css + papers.css.
   ========================================================================== */

.catalog-page { padding: 8px 0 90px; }
.catalog-page__title { margin: 24px 0 28px; font-size: 34px; font-weight: 700; letter-spacing: -0.01em; }

/* --------------------------------- Layout -------------------------------- */
.catalog-layout {
	display: grid;
	grid-template-columns: 248px 1fr;
	gap: 48px;
	align-items: start;
}

/* --------------------------------- Sidebar ------------------------------- */
/* The sidebar is the filter <form> itself (results live outside it, so the
   favorite forms on cards aren't nested) — kill the UA form margin. */
.catalog-sidebar { margin: 0; }

.catalog-sidebar__search.search-field {
	display: flex; align-items: center; height: 46px;
	background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 24px;
}
/* Icon (left) and clear button (right) are both absolutely positioned so the
   input keeps the full flex width — long placeholders like "Пошук організацій"
   fit without being clipped. */
.catalog-sidebar__search .search-field__input {
	flex: 1 1 auto; min-width: 0; border: 0; outline: none;
	font-family: inherit; font-size: 15px; background: transparent;
	padding: 12px 38px 12px 40px;
}
.catalog-sidebar__search .search-field__icon { color: var(--color-fg-muted); }
.catalog-sidebar__search .search-field__clear {
	position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
	margin: 0;
}
.catalog-sidebar__heading { margin: 0 0 14px; font-size: 18px; font-weight: 700; }

.filter-group { border-top: 1px solid var(--color-border); padding: 16px 0; }
.filter-group__toggle {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
	background: none; border: 0; padding: 0; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--color-fg); cursor: pointer; text-align: left;
}
.filter-group__chevron { transition: transform var(--transition); flex-shrink: 0; }
.filter-group__toggle[aria-expanded="false"] .filter-group__chevron { transform: rotate(-90deg); }
.filter-group__body { margin-top: 14px; }

.filter-check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--color-fg); cursor: pointer; }
.filter-check input[type="checkbox"] { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--color-yellow); flex-shrink: 0; cursor: pointer; }

.filter-group__search.search-field--mini { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.filter-group__search .search-field__input { border: 0; outline: none; width: 100%; font-family: inherit; font-size: 14px; background: transparent; }
.filter-group__list .is-extra { display: none; }
.filter-group.is-expanded .filter-group__list .is-extra { display: flex; }
.filter-group__more { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0 0; font-family: inherit; font-size: 14px; color: var(--color-fg-muted); cursor: pointer; }

/* Один прапорець без згортання — «Показати виключені з реєстру». */
.filter-group--flat { padding-top: 14px; }
.filter-group--flat .filter-check { padding: 0; }

/* Показники тестувань: підпис + числове поле під ним. Підпис буває довгим
   («Стійкість проти збудників хвороб, бал (1–9): – борошниста роса»), тому
   колонка, а не рядок. */
.filter-group__hint { margin: 0 0 10px; font-size: 13px; color: var(--color-fg-muted); }
.filter-number { display: block; padding: 6px 0; }
.filter-number__label { display: block; font-size: 14px; color: var(--color-fg); margin-bottom: 4px; }
.filter-number__op { font-style: normal; color: var(--color-fg-muted); font-size: 13px; white-space: nowrap; }
.filter-number__op::before { content: '— '; }
.filter-number__input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; background: transparent; }
.filter-number__input:focus { outline: none; border-color: var(--color-fg-muted); }
select.filter-number__input { cursor: pointer; }
.filter-group__apply { margin-top: 12px; }

/* --------------------------------- Main ---------------------------------- */
/* Друга колонка сітки мусить мати право стискатися. Без min-width: 0 grid-елемент
   росте під найширший вміст — і горизонтальний скрол таблиці результатів зʼїжджав
   із .tests-table-wrap на всю сторінку, розтягуючи сайт за межі екрана. */
.catalog-main { min-width: 0; }
.catalog-main__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.catalog-main__bar .news-archive__count { margin: 0; }
/* Кнопка «Таблиця результатів» тулиться до сортування, а не розтягує рядок. */
.catalog-main__view { margin-left: auto; white-space: nowrap; }
.catalog-main__view.is-disabled { opacity: 0.5; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   Таблиця результатів тестувань таксона (?view=table)
   -------------------------------------------------------------------------- */

/* Колонок стільки, скільки показників у шаблоні таксона — до трьох десятків,
   тож таблиця свідомо ширша за екран. Колонку сорту лишаємо приклеєною ліворуч:
   без неї, догортавши до потрібного показника, не видно, чий це рядок.
   Класу .sv-table тут навмисно немає — на вузьких екранах він розкладає рядки
   стовпчиком, а тут потрібен саме горизонтальний скрол. */
.tests-table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.tests-table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 14px; }
.tests-table th,
.tests-table td { padding: 10px 14px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--color-border); }
.tests-table thead th { font-size: 13px; font-weight: 600; color: var(--color-fg-muted); background: var(--color-bg); }
.tests-table tbody tr:last-child th,
.tests-table tbody tr:last-child td { border-bottom: 0; }
.tests-table__variety { position: sticky; left: 0; z-index: 1; background: var(--color-bg); font-weight: 600; box-shadow: 1px 0 0 var(--color-border); }
.tests-table thead th:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--color-border); }
.tests-table__sort { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.tests-table__sort:hover { color: var(--color-fg); text-decoration: none; }
.tests-table__th.is-sorted { color: var(--color-fg); }
.tests-table__arrow.is-desc { transform: rotate(180deg); }
.tests-table__unit { display: block; font-style: normal; font-weight: 400; font-size: 12px; color: var(--color-fg-muted); }
.tests-table__num { text-align: right; font-variant-numeric: tabular-nums; }
.tests-table tbody tr:hover th,
.tests-table tbody tr:hover td { background: var(--color-hover); }

.catalog-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.catalog-chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 13px;
	background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-pill); color: var(--color-fg);
}
.catalog-chip:hover { border-color: #c9c9c9; text-decoration: none; }
.catalog-chip svg { color: var(--color-fg-muted); }
.catalog-chip--clear { border-style: dashed; color: var(--color-fg-muted); }

/* --------------------------------- Grid + card --------------------------- */
.variety-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.variety-card { display: flex; flex-direction: column; background: #f7f7f7; border-radius: 8px; overflow: hidden; }
.variety-card__media { position: relative; display: block; aspect-ratio: 16 / 12; background: var(--color-placeholder); }
.variety-card__media:hover { text-decoration: none; }
.variety-card__img, .variety-card__placeholder {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.variety-card__flag {
	position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 10px; background: #fff; border-radius: var(--radius-pill); font-size: 12px; font-weight: 500; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.variety-card__flag-emoji { font-size: 14px; line-height: 1; }
.variety-card__body { padding: 14px 16px 18px; }
.variety-card__cat { margin: 0 0 6px; font-size: 12px; color: var(--color-fg-muted); }
.variety-card__title { margin: 0 0 10px; font-size: 15px; line-height: 1.4; font-weight: 700; }
.variety-card__title a:hover { color: var(--color-green); text-decoration: none; }
.variety-card__owner { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; color: var(--color-fg-muted); }
.variety-card__owner svg { flex-shrink: 0; color: var(--color-fg-muted); }

/* ==========================================================================
   Single variety
   ========================================================================== */
.variety-single { padding-bottom: 80px; }
.variety-single__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.variety-single__toolbar { display: inline-flex; align-items: center; gap: 12px; margin-top: 10px; }
.variety-single__status { display: inline-flex; }

.variety-reject { margin: 8px 0 22px; padding: 16px 20px; background: #fdecec; border-left: 3px solid #e23a3a; border-radius: var(--radius-sm); }
.variety-reject__title { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.variety-reject__text { margin: 0; color: #7a2020; font-size: 14px; line-height: 1.6; }

.variety-tabs { display: flex; gap: 28px; margin: 18px 0 28px; border-bottom: 1px solid var(--color-border); }
.variety-tab { position: relative; padding: 4px 2px 14px; background: none; border: 0; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--color-fg-muted); cursor: pointer; }
.variety-tab:hover { color: var(--color-fg); }
.variety-tab.is-active { color: var(--color-fg); }
.variety-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--color-yellow); }

/* Ширина лівої колонки й проміжок — змінними: на них рівняється блок
   «Пов’язані сорти», який лежить в окремому .container поза сіткою. */
.variety-single { --variety-aside: 300px; --variety-gap: 56px; }
.variety-single__grid { display: grid; grid-template-columns: var(--variety-aside) 1fr; gap: var(--variety-gap); align-items: start; }

/* Gallery */
.variety-gallery__main { display: block; width: 100%; padding: 0; border: 0; background: var(--color-placeholder); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; aspect-ratio: 1 / 1; }
.variety-gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variety-gallery__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.variety-gallery__thumb { position: relative; padding: 0; border: 0; background: var(--color-placeholder); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; aspect-ratio: 1 / 1; }
.variety-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variety-gallery__more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); color: #fff; font-size: 18px; font-weight: 600; }
.variety-single__placeholder { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); }

/* Lightbox */
.variety-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--color-green-dark); }
.variety-lightbox__bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center; padding: 28px; color: #fff; }
.variety-lightbox__caption { font-size: 18px; font-weight: 600; }
.variety-lightbox__close { position: absolute; right: 24px; top: 24px; background: none; border: 0; color: #fff; cursor: pointer; }
.variety-lightbox__stage { max-width: 460px; width: 90vw; }
.variety-lightbox__stage img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; border-radius: 4px; display: block; }
.variety-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; padding: 16px; }
.variety-lightbox__nav:hover { color: #fff; }
.variety-lightbox__nav--prev { left: 3%; }
.variety-lightbox__nav--next { right: 3%; }
.variety-lightbox__dots { position: absolute; bottom: 40px; display: flex; gap: 10px; }
.variety-lightbox__dot { width: 36px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.3); cursor: pointer; }
.variety-lightbox__dot.is-active { background: #fff; }

/* Info / tooltips */
.variety-info--top { border-top: 0; margin-bottom: 8px; }
.variety-tip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 2px; border: 1px solid #bcbcbc; border-radius: 50%; font-size: 11px; color: var(--color-fg-muted); text-decoration: none; vertical-align: middle; }
.variety-tip:hover { border-color: var(--color-green); color: var(--color-green); text-decoration: none; }
.variety-flag { font-size: 16px; }

/* Обрізаємо по рядках, а не по висоті. Було `max-height: 9.6em`, тобто
   153.6px при рядку 28px (16px × 1.75) — 5.49 рядка, і останній різався
   навпіл. line-clamp рахує саме рядки, тож зріз завжди по межі рядка, а
   багатоабзацний опис не збиває розрахунок відступами між <p>. */
.variety-clamp {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 6;
	line-clamp: 6;
	overflow: hidden;
}
.variety-clamp.is-open {
	display: block;
	-webkit-line-clamp: none;
	line-clamp: none;
	overflow: visible;
}
.variety-clamp__more { background: none; border: 0; padding: 0; margin-top: 8px; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--color-green); text-decoration: underline; cursor: pointer; }

/* Test-results gate */
.variety-gate { text-align: center; padding: 64px 24px; background: #f7f7f7; border-radius: 8px; }
.variety-gate__icon { color: #9a9a9a; }
.variety-gate__title { margin: 18px auto 10px; max-width: 520px; font-size: 20px; font-weight: 700; }
.variety-gate__text { margin: 0 auto 24px; max-width: 520px; color: var(--color-fg-muted); }
.variety-gate__actions { display: inline-flex; gap: 12px; }

/* Related carousel */
/* Блок лежить в окремому .container, але має ще й клас .news-related, який
   задає `max-width: 820px` (ширина статті новини). Разом із `margin: 0 auto`
   це і звужувало його, і зсувало центруванням — лівий край не збігався з
   контентом. Скидаємо ширину й відступаємо рівно на ліву колонку сітки. */
.variety-related {
	margin-top: 60px;
	max-width: var(--container-max);
	padding-left: calc(var(--container-pad) + var(--variety-aside) + var(--variety-gap));
}
.variety-related .carousel { --per-view: 4; }
.variety-related .section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.variety-related .news-related__title { margin: 0; }
.variety-related .carousel__viewport { overflow: hidden; }
.variety-related .carousel__track { display: flex; gap: 24px; transition: transform 350ms ease; }
.variety-related .carousel__slide { flex: 0 0 calc((100% - (var(--per-view) - 1) * 24px) / var(--per-view)); display: flex; }
.variety-related .carousel__slide > article { width: 100%; }
.variety-related .section__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.variety-related .link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--color-green); }

/* ==========================================================================
   Cabinet — table
   ========================================================================== */
/* Cabinet tabs (event-tabs styles aren't loaded on catalogue pages). */
.org-catalog .event-tabs { display: flex; gap: 28px; margin: 0 0 4px; border-bottom: 1px solid var(--color-border); }
.org-catalog .event-tab { position: relative; padding: 4px 2px 14px; font-size: 15px; font-weight: 500; color: var(--color-fg-muted); }
.org-catalog .event-tab:hover { color: var(--color-fg); text-decoration: none; }
.org-catalog .event-tab.is-active { color: var(--color-fg); }
.org-catalog .event-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--color-yellow); }

.org-catalog__lead { max-width: none; margin: 20px 0; color: var(--color-fg-muted); font-size: 15px; line-height: 1.6; }
.org-catalog__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.org-catalog .news-archive__count { margin: 20px 0; }
.org-catalog__filters { flex: 1 1 auto; margin-bottom: 0; }
.org-catalog__reset { font-size: 14px; color: var(--color-fg-muted); white-space: nowrap; }
.org-catalog__add { flex-shrink: 0; }
.org-catalog__hint { margin: 14px 0 0; padding: 12px 16px; background: #fff8e6; border: 1px solid #f3e2b0; border-radius: var(--radius-sm); font-size: 14px; color: #7a5b00; }

/* Multi popover (reuses event-period look) */
.news-multi { position: relative; }
.news-multi__toggle { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; font-family: inherit; font-size: 15px; color: var(--color-fg); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; }
.news-multi__count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--color-yellow); color: #1a1a1a; font-size: 12px; font-weight: 600; }
.news-multi__panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: 280px; padding: 12px 16px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); }

.sv-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.sv-table thead th { text-align: left; padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--color-fg-muted); border-bottom: 1px solid var(--color-border); }
.sv-table tbody td { padding: 14px; border-bottom: 1px solid var(--color-border); font-size: 14px; vertical-align: middle; }
.sv-table__cb { width: 40px; }
.sv-table__cb input { width: 18px; height: 18px; accent-color: var(--color-yellow); }
.sv-table__actions { width: 1%; white-space: nowrap; text-align: right; }
/* У списку результатів тестувань дії — це кнопки різної ширини
   («Опублікувати» / «Приховати»), і по правому краю вони йшли сходинками.
   Тут рівняємо по лівому; в інших таблицях дії — однакові іконки, там правий
   край доречний. */
.org-test-results .sv-table__actions { text-align: left; }
.sv-table__name { display: flex; align-items: center; gap: 12px; }
.sv-table__thumb { flex-shrink: 0; width: 48px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-placeholder); display: block; }
.sv-table__thumb img, .sv-table__thumb .placeholder-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-table__title { display: block; font-weight: 600; color: var(--color-fg); }
.sv-table__title:hover { color: var(--color-green); text-decoration: none; }
.sv-table__sub { display: block; font-size: 12px; color: var(--color-fg-muted); margin-top: 2px; }
.sv-row-actions { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }

.org-catalog__bulk { position: relative; }
.sv-bulk-bar { position: sticky; bottom: 24px; z-index: 5; display: inline-flex; align-items: center; gap: 18px; margin: 18px auto 0; padding: 12px 20px; background: var(--color-green); color: #fff; border-radius: var(--radius-pill); box-shadow: var(--shadow-pop); width: fit-content; left: 0; right: 0; }
.sv-bulk-bar__btn { background: none; border: 0; color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.sv-bulk-bar__btn:hover:not( :disabled ) { text-decoration: underline; }
.sv-bulk-bar__btn:disabled { opacity: .5; cursor: default; }

/* Confirmation dialog for destructive actions (replaces window.confirm). */
.sv-confirm { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.sv-confirm__overlay { position: absolute; inset: 0; background: rgba(20, 28, 22, .45); }
.sv-confirm__dialog { position: relative; width: 100%; max-width: 460px; background: #fff; border-radius: 12px; padding: 28px; box-shadow: var(--shadow-pop, 0 24px 60px rgba(0, 0, 0, .2)); }
.sv-confirm__title { font-size: 22px; font-weight: 700; margin: 0 0 12px; }
.sv-confirm__desc { font-size: 14px; color: var(--color-fg-muted); line-height: 1.6; margin: 0 0 4px; }
.sv-confirm__actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
body.has-sv-confirm { overflow: hidden; }

/* Cabinet empty state */
.org-catalog__empty { text-align: center; padding: 70px 24px; background: #f7f7f7; border-radius: 8px; margin-top: 18px; }
.org-catalog__empty-icon { color: #c4c4c4; }
.org-catalog__empty-title { margin: 16px 0 8px; font-size: 20px; font-weight: 700; }
.org-catalog__empty-text { margin: 0 auto; max-width: 560px; color: var(--color-fg-muted); }

/* ==========================================================================
   Cabinet editor — images
   ========================================================================== */
.variety-images__upload { padding: 16px; background: #f3f3f3; border-radius: var(--radius-sm); margin-bottom: 16px; }
.variety-images__upload .news-form__hint { margin: 8px 0 0; }
.variety-image-row { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.variety-image-row__thumb { flex-shrink: 0; width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-placeholder); }
.variety-image-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variety-image-row__field { flex: 1 1 auto; min-width: 0; }
.variety-image-row__remove { flex-shrink: 0; align-self: center; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; color: #c0392b; cursor: pointer; }
.variety-image-row__remove:hover { background: #fdecec; }

.news-form__hint { margin: 6px 0 0; font-size: 12px; color: var(--color-fg-muted); }
.news-form__textarea { min-height: 130px; padding: 14px 16px; line-height: 1.6; resize: vertical; height: auto; font-family: inherit; }

/* --------------------------------- Responsive ---------------------------- */
@media (max-width: 1000px) {
	.variety-grid { grid-template-columns: repeat(2, 1fr); }
	.variety-related .carousel { --per-view: 3; }
}
@media (max-width: 880px) {
	.catalog-layout { grid-template-columns: 1fr; gap: 24px; }
	.variety-single__grid { grid-template-columns: 1fr; gap: 28px; }
	.variety-single__media { max-width: 360px; }
	/* Сітка стала одноколонковою — рівнятися вже нема на що. */
	.variety-related { padding-left: var(--container-pad); }
	.variety-panel[data-variety-panel="tests"] { padding-left: 0; }
}
@media (max-width: 720px) {
	.variety-grid { grid-template-columns: 1fr; }
	.variety-related .carousel { --per-view: 2; }
	.sv-table thead { display: none; }
	.sv-table tbody td { display: block; border: 0; padding: 4px 14px; }
	.sv-table tbody tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
}

/* Вкладка «Результати тестування» власної сітки не має, тож без відступу її
   вміст centrувався б по всьому контейнеру — а сусідні блоки (контент вкладки
   «Деталі» й «Пов’язані сорти») починаються після лівої колонки. Відступ той
   самий, щоб усе на сторінці мало один лівий край і спільну вісь центру. */
.variety-panel[data-variety-panel="tests"] {
	padding-left: calc(var(--variety-aside) + var(--variety-gap));
}

/* ----------------------- Variety test results (EP-02-US-03) ---------------- */
.variety-tests { max-width: 760px; }
.variety-tests__count { font-size: 14px; color: var(--color-fg-muted); margin: 0 0 18px; }


/* Результат, який вніс власник сорту, а не незалежний виконавець. */
.variety-test-card--own { border-color: #f0b429; }
.variety-test-card__ribbon {
	display: inline-flex; align-items: center; gap: 6px;
	margin-bottom: 12px; padding: 5px 12px;
	background: #fff4e0; border: 1px solid #f0b429; border-radius: var(--radius-pill);
	font-size: 12px; font-weight: 600; color: #8a5a00;
}
.variety-test-card { padding: 20px 22px; border: 1px solid var(--color-border); border-radius: 10px; margin-bottom: 16px; }
.variety-test-card__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--color-border); }
.variety-test-card__exec { font-size: 16px; font-weight: 700; }
.variety-test-card__meta { font-size: 13px; color: var(--color-fg-muted); }
.variety-test-card__ind { margin: 0; }
.variety-test-card__empty { margin: 0; font-size: 14px; color: var(--color-fg-muted); }
/* Картка, на яку перейшли за посиланням «#result-N» із кабінету. */
.variety-test-card.is-target { box-shadow: 0 0 0 2px var(--color-yellow); scroll-margin-top: 90px; }

/* Distributors cabinet + generic table wrap (EP-11) */
.sv-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.sv-distributors {
	min-width: 640px;
}

.account-page__lead {
	margin: 0;
	color: #4b5563;
	max-width: 640px;
}

.news-form__field--wide {
	grid-column: 1 / -1;
}

.btn--danger {
	color: #c0392b;
}

.btn--danger:hover {
	color: #a5281b;
}

/* Favorites / portfolio (EP-10) */
.variety-card { position: relative; }

.variety-fav {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	margin: 0;
}

.variety-fav__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 999px;
	padding: 7px;
	cursor: pointer;
	color: #9aa0a6;
	line-height: 0;
	transition: color 0.15s, background 0.15s;
}

.variety-fav__btn:hover { color: #e0574f; }

.variety-fav.is-active .variety-fav__btn { color: #e0574f; }

.variety-fav--inline {
	position: static;
	margin-top: 6px;
}

.variety-fav--inline .variety-fav__btn {
	padding: 8px 16px;
	line-height: 1.2;
	font-weight: 600;
	color: #2f6b3a;
}

.variety-fav--inline .variety-fav__label { white-space: nowrap; }
