/* Baltic Agro Koduaed – shop templates (redesign C): sidebar layout, category sidebar, product archive, product page,
   search. Loaded on archive/product/search pages only (handle ba-shop, after ba-core). Tokens: tokens.css. */

/* ---------- Sidebar layout (category, product, search) ---------- */
.ba-shop__layout {
	display: grid;
	grid-template-columns: var(--ba-sidebar) minmax(0, 1fr);
	gap: var(--ba-gap-lg);
	align-items: start;
	padding-top: var(--ba-section-inner-top);
	padding-bottom: var(--ba-section-inner-bottom);
}
.ba-shop__content { min-width: 0; }
.ba-shop__title { margin: 0 0 12px; }

/* ---------- Category sidebar: plugin balticagro-category-nav markup in the design's box ---------- */
/* The column spans the whole row (the layout has align-items: start), so the sticky panel has room to stick. */
.ba-side { position: relative; min-width: 0; align-self: stretch; }
.ba-side__skip {
	position: absolute; left: 0; top: 0; z-index: 3; transform: translateY(-120%); opacity: 0;
	background: #fff; padding: 8px 12px; border-radius: var(--ba-r-sm); box-shadow: var(--ba-shadow-pop); font-weight: 700; font-size: 14px;
}
.ba-side__skip:focus { transform: none; opacity: 1; }
.ba-shop__content:focus { outline: none; }
.ba-side__toggle { display: none; }
.ba-side__panel {
	position: sticky;
	top: var(--ba-sticky-top);
	max-height: calc(100vh - var(--ba-sticky-top) - 24px);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	background: #fff;
	border: 1px solid var(--ba-border);
	border-radius: var(--ba-r-card);
	padding: 20px 0;
}
/* Taller than the viewport (a long branch is open): scrolls with the page instead (shop.js). */
.ba-side__panel.is-tall { position: relative; top: 0; max-height: none; overflow: visible; }
.ba-side .ba-catnav { font-size: 15px; line-height: 1.35; }
.ba-side .ba-catnav [hidden] { display: none !important; }
.ba-side .ba-catnav ul { list-style: none; margin: 0; padding: 0; }
.ba-side .ba-catnav__item { margin: 0; padding: 0; }
.ba-side .ba-catnav__title {
	font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase;
	color: var(--ba-text-muted); margin: 0; padding: 0 20px 12px;
}
.ba-side .ba-catnav__sr {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ba-side .ba-catnav__row { display: flex; align-items: stretch; border-left: 3px solid transparent; }
.ba-design-new .ba-side .ba-catnav__link {
	flex: 1 1 auto; min-width: 0; display: block;
	padding: 10px 6px 10px 17px;
	font-size: 15px; font-weight: 700; color: var(--ba-text-2);
	overflow-wrap: break-word; hyphens: auto;
}
.ba-design-new .ba-side .ba-catnav__link:hover { color: var(--ba-green-hover); }
.ba-side .ba-catnav__link:focus-visible { outline-offset: -3px; }
/* Active top level (current category or the branch of the current one): 3px green bar, light background, ▾ */
.ba-side .ba-catnav__list > .is-current > .ba-catnav__row,
.ba-side .ba-catnav__list > .is-ancestor > .ba-catnav__row {
	border-left-color: var(--ba-green);
	background: var(--ba-surface);
}
.ba-design-new .ba-side .ba-catnav__list > .is-current > .ba-catnav__row > .ba-catnav__link,
.ba-design-new .ba-side .ba-catnav__list > .is-ancestor > .ba-catnav__row > .ba-catnav__link { color: var(--ba-green-deep); }
/* Subcategories (level 2, 3) */
.ba-side .ba-catnav__list > .ba-catnav__item > .ba-catnav__sub { padding: 2px 0 8px; }
.ba-design-new .ba-side .ba-catnav__sub .ba-catnav__link {
	padding: 8px 6px 8px 33px; font-size: 14px; font-weight: 500; color: var(--ba-text-muted);
}
.ba-design-new .ba-side .ba-catnav__sub .ba-catnav__sub .ba-catnav__link { padding-left: 49px; font-size: 13.5px; }
.ba-design-new .ba-side .ba-catnav__sub .is-current > .ba-catnav__row > .ba-catnav__link,
.ba-design-new .ba-side .ba-catnav__sub .is-ancestor > .ba-catnav__row > .ba-catnav__link { font-weight: 700; color: var(--ba-green); }
/* Show/hide subcategories: chevron ▸ / ▾ */
.ba-side button.ba-catnav__toggle {
	position: relative; flex: 0 0 36px; width: 36px; min-height: 36px; margin: 0 6px 0 0; padding: 0;
	border: 0; border-radius: var(--ba-r-xs); background: none; color: #7c7c72; cursor: pointer;
}
.ba-side button.ba-catnav__toggle:hover { color: var(--ba-green); background: rgba(66, 103, 22, .06); }
.ba-side .ba-catnav__toggle::before {
	content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -5px 0 0 -5px;
	border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg);
}
.ba-side .ba-catnav__toggle[aria-expanded="true"]::before { margin: -6px 0 0 -4px; transform: rotate(45deg); }
.ba-side .ba-catnav__sub button.ba-catnav__toggle { min-height: 32px; }

/* ---------- Product archive ---------- */
.ba-archive__desc { font-size: 16px; line-height: 1.65; color: var(--ba-text-2); max-width: 640px; margin: 0 0 28px; }
.ba-archive__desc p { margin: 0 0 12px; }
.ba-archive__desc > :last-child { margin-bottom: 0; }
.ba-archive__desc a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ba-archive__chips { margin: 0 0 22px; }
/* Chip counts: solid colours instead of the component's 65 % opacity (3.3:1 → AA 4.5:1+). */
.ba-shop .ba-chip__count { opacity: 1; color: var(--ba-text-muted); }
.ba-design-new .ba-shop .ba-chip[aria-current] .ba-chip__count,
.ba-design-new .ba-shop .ba-chip[aria-pressed="true"] .ba-chip__count { color: rgba(255, 255, 255, .85); }
.ba-archive__toolbar {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px;
	margin: 0 0 26px; padding-bottom: 16px; border-bottom: 1px solid var(--ba-divider);
}
.ba-archive__count { margin: 0; font-size: 14px; color: var(--ba-text-muted); }
.ba-archive__empty { text-align: center; padding: 56px 0; margin: 0; color: var(--ba-text-muted); font-size: 15.5px; }
.ba-archive__empty a { font-weight: 700; }

/* Sort: native select + button without JavaScript; the design's dropdown with JavaScript (no layout shift: ba-js is set in <head>). */
.ba-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ba-text-muted); }
.ba-sort__form { display: flex; align-items: center; gap: 10px; margin: 0; }
.ba-sort__label { white-space: nowrap; }
.ba-sort__dd { display: none; }
.ba-js .ba-sort__form { display: none; }
.ba-js .ba-sort__dd { display: block; }
.ba-sort__dd .ba-dropdown__btn .ba-icon { transition: transform var(--ba-ease); }
.ba-sort__dd .ba-dropdown__btn[aria-expanded="true"] .ba-icon { transform: rotate(180deg); }
.ba-sort__list { max-width: calc(100vw - 32px); }
/* When the toolbar wraps on a narrow phone the button sits at the left edge: the list opens to the right (shop.js). */
.ba-sort__list.is-start { left: 0; right: auto; }
.ba-sort__list li { margin: 0; }
.ba-design-new .ba-sort__list .ba-listbox__option { color: var(--ba-text-strong); text-decoration: none; }
.ba-design-new .ba-sort__list .ba-listbox__option[aria-current] { font-weight: 700; color: var(--ba-green-deep); background: var(--ba-surface-chip); }
.ba-sort__list .ba-listbox__option .ba-icon { color: var(--ba-green); visibility: hidden; }
.ba-sort__list .ba-listbox__option[aria-current] .ba-icon { visibility: visible; }
.ba-sort__list .ba-listbox__option:focus-visible { outline-offset: -3px; }

/* Grid + product card (A's .ba-card) */
.ba-shop__grid, .ba-search__grid { list-style: none; margin: 0; padding: 0; }
.ba-pcard { margin: 0; }
.ba-pcard__media { position: relative; }
.ba-pcard__noimg {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	background: var(--ba-surface-chip); color: var(--ba-green); font-weight: 800; font-size: 15px;
}
.ba-pcard__title { font-size: 16px; }
.ba-pcard__packs { margin: 0; }
.ba-pcard__cta { margin: 0; }
.ba-pcard__cat {
	margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ba-green);
}

/* Pagination */
.ba-pager { margin-top: 48px; }
.ba-pager__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.ba-pager .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
	border: 1px solid var(--ba-control); border-radius: var(--ba-r-xs); background: #fff;
	font-size: 15px; font-weight: 700; color: var(--ba-text-strong);
}
.ba-design-new .ba-pager a.page-numbers { color: var(--ba-text-strong); }
.ba-design-new .ba-pager a.page-numbers:hover { border-color: var(--ba-green); color: var(--ba-green-deep); }
.ba-pager .page-numbers.current { background: var(--ba-green); border-color: var(--ba-green); color: #fff; }
.ba-pager .page-numbers.dots { border-color: transparent; background: none; min-width: 24px; padding: 0; }

/* ---------- Product page ---------- */
/* Title, image, info: one column on phones (title above the image, so it is in the first screen), image | title + info
   from 688px (= two 300px columns + 48px gap of content width, as the former auto-fit grid). */
.ba-product__top {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "title" "media" "info";
	gap: 0 48px;
	align-items: start;
	margin-bottom: 64px;
}
.ba-product__top > .ba-product__title { grid-area: title; }
.ba-product__top > .ba-gallery { grid-area: media; margin: 0 0 24px; }
.ba-product__top > .ba-product__info { grid-area: info; }
@media (min-width: 688px) {
	.ba-product__top { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr; grid-template-areas: "media title" "media info"; }
	.ba-product__top > .ba-gallery { margin-bottom: 0; }
}
.ba-gallery { min-width: 0; }
.ba-gallery__main {
	margin: 0; aspect-ratio: 1 / 1; width: 100%;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
	background: #fff; border: 1px solid var(--ba-border); border-radius: var(--ba-r-lg);
}
.ba-gallery__img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Large image = zoom link (lightbox, inc/lightbox.php) with a magnifier badge in the corner. */
.ba-gallery__zoom { position: relative; display: block; width: 100%; height: 100%; cursor: zoom-in; border-radius: inherit; }
.ba-gallery__zoom:focus-visible { outline-offset: -4px; }
.ba-gallery__zoombtn {
	position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%; pointer-events: none;
	background: rgba(255, 255, 255, .94); border: 1px solid var(--ba-control); color: var(--ba-green);
	box-shadow: 0 6px 16px -8px rgba(20, 30, 8, .45); transition: background-color var(--ba-ease), color var(--ba-ease), border-color var(--ba-ease);
}
.ba-gallery__zoom:hover .ba-gallery__zoombtn, .ba-gallery__zoom:focus-visible .ba-gallery__zoombtn { background: var(--ba-green); border-color: var(--ba-green); color: #fff; }
.ba-gallery__thumb[data-ba-lb] { cursor: zoom-in; }
/* gallery.css (article galleries; loaded when a product's extra content has one) styles .ba-gallery__img as a square
   crop: the pack shot stays contained. */
.ba-product__top .ba-gallery__main .ba-gallery__img { aspect-ratio: auto; object-fit: contain; border-radius: 0; transform: none; filter: none; }
.ba-gallery__none { color: var(--ba-text-muted); font-size: 14px; }
.ba-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 12px 0 0; padding: 0; }
.ba-gallery__thumb {
	display: block; width: 64px; height: 64px; padding: 2px; overflow: hidden;
	background: #fff; border: 1px solid var(--ba-divider); border-radius: var(--ba-r-md);
}
.ba-gallery__thumb:hover { border-color: var(--ba-green); }
.ba-gallery__thumb[aria-current="true"] { border: 2px solid var(--ba-green); padding: 1px; }
.ba-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }

.ba-product__info { min-width: 0; }
.ba-product__title { line-height: 1.2; margin: 0 0 18px; }
.ba-product__facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 22px; padding: 0; }
.ba-product__desc { font-size: 16px; line-height: 1.75; color: var(--ba-text); margin: 0 0 18px; text-wrap: pretty; overflow-wrap: break-word; }
.ba-product__desc p { margin: 0 0 12px; }
.ba-product__desc > :last-child, .ba-product__notes > :last-child, .ba-product__usage-text > :last-child { margin-bottom: 0; }
.ba-product__notes { font-size: 14px; line-height: 1.65; color: var(--ba-text-2); margin: 0 0 22px; }
.ba-product__notes p { margin: 0 0 8px; }
.ba-product__extra { margin: 0 0 22px; font-size: 15px; }
.ba-product__usage {
	background: var(--ba-surface); border: 1px solid var(--ba-divider); border-radius: var(--ba-r-md);
	padding: 18px 22px; margin: 0 0 24px;
}
.ba-design-new .ba-product__usage-title {
	display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
	font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: var(--ba-green);
}
.ba-product__usage-text { font-size: 15px; line-height: 1.7; color: var(--ba-text); overflow-wrap: break-word; }
.ba-product__usage-text p { margin: 0 0 10px; }
.ba-product__usage-text--attr + .ba-product__usage-text { margin-top: 10px; }
.ba-product__packs { margin: 0 0 26px; }
.ba-product__label {
	font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ba-text-muted); margin: 0 0 10px;
}
.ba-packs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ba-pack {
	display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 10px 18px;
	border: 2px solid var(--ba-control); border-radius: var(--ba-r-xs); background: #fff;
	font-size: 15.5px; font-weight: 700; line-height: 1.3; text-align: center;
	transition: border-color var(--ba-ease), background-color var(--ba-ease);
}
.ba-design-new a.ba-pack { color: var(--ba-text-strong); }
.ba-design-new a.ba-pack:hover { border-color: var(--ba-green); color: var(--ba-green-deep); }
.ba-design-new a.ba-pack.is-current { background: var(--ba-green); border-color: var(--ba-green); color: #fff; cursor: default; }
.ba-product__pack { margin: 0; font-size: 17px; font-weight: 700; color: var(--ba-text-strong); }
.ba-product__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }
.ba-product__actions .ba-btn--outline { padding-left: 24px; padding-right: 24px; }
/* P-26: this pack has no store list, other packs of the product have one – links to them under "Küsi saadavust". */
.ba-product__storepacks { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ba-product__storepacks-text { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ba-text-2); }
.ba-product__storepacks-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ba-product__storepacks .ba-pack { gap: 6px; min-width: 0; padding: 7px 14px; font-size: 14.5px; border-width: 1px; }

.ba-pmeta {
	display: flex; flex-direction: column; gap: 10px; margin: 0; padding-top: 20px;
	border-top: 1px solid var(--ba-divider); font-size: 13.5px; line-height: 1.5; color: var(--ba-text-muted);
}
.ba-pmeta__row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.ba-pmeta dt { font-weight: 700; color: var(--ba-text-2); }
.ba-pmeta dd { margin: 0; min-width: 0; }
.ba-pmeta__list { display: flex; flex-wrap: wrap; gap: 6px 12px; list-style: none; margin: 0; padding: 0; }
.ba-pmeta__list a { font-weight: 600; }
.ba-pmeta__muted { color: var(--ba-text-muted); }
.ba-pmeta__row--tags { align-items: center; }
.ba-pmeta__row--tags .ba-pmeta__list { gap: 8px; }

/* Tabs (A's .ba-tabs/.ba-tab); without JavaScript all panels are shown one after another with their headings. */
/* The page already has scroll-padding-top (base.css); no extra scroll-margin on the tabs (it would double the offset). */
.ba-ptabs, .ba-ptabs .ba-tabs, .ba-tabpanel { scroll-margin-top: 0; }
.ba-ptabs .ba-tab:focus-visible { outline-offset: -3px; }
/* One row of tabs on phones too (en/ru labels are longer): the bar scrolls sideways instead of wrapping. Its 2px line
   is an inset shadow, so the overflow does not clip the active tab's 3px underline. */
.ba-ptabs .ba-tabs {
	flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
	border-bottom: 0; box-shadow: inset 0 -2px 0 var(--ba-divider);
}
.ba-ptabs .ba-tabs::-webkit-scrollbar { display: none; }
.ba-ptabs .ba-tab { flex: 0 0 auto; white-space: nowrap; margin-bottom: 0; }
/* More tabs off to the side: fade that edge (classes set by shop.js). */
.ba-ptabs .ba-tabs.is-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.ba-ptabs .ba-tabs.is-less { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.ba-ptabs .ba-tabs.is-less.is-more {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
/* Deep links (#juhendid …) target a panel: the tab bar above it (its height + 32px margin) stays in view under the
   sticky header. shop.js sets the exact value. */
.ba-js .ba-ptabs .ba-tabpanel { scroll-margin-top: var(--ba-ptabs-offset, 81px); }
html:not(.ba-js) .ba-ptabs .ba-tabs { display: none; }
.ba-tabpanel + .ba-tabpanel { margin-top: 32px; }
.ba-js .ba-tabpanel + .ba-tabpanel { margin-top: 0; }
.ba-js .ba-tabpanel:not(.is-active) { display: none; }
.ba-tabpanel:focus-visible { outline-offset: 4px; }
.ba-tabpanel__title { font-size: 20px; font-weight: 800; color: var(--ba-text-strong); margin: 0 0 16px; }
.ba-js .ba-tabpanel__title {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.ba-specs {
	width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed;
	border: 1px solid var(--ba-border); border-radius: var(--ba-r-card); overflow: hidden; font-size: 14.5px;
}
.ba-specs th, .ba-specs td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ba-divider-soft); overflow-wrap: anywhere; }
.ba-specs th { width: 220px; background: var(--ba-surface); font-weight: 700; color: var(--ba-text-2); }
.ba-specs td { color: var(--ba-text-strong); }
.ba-specs tr:last-child > * { border-bottom: 0; }

.ba-wherebuy {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 32px;
	background: var(--ba-surface); border: 1px solid var(--ba-divider); border-radius: var(--ba-r-lg); padding: 32px 36px;
}
.ba-wherebuy__text { flex: 1 1 320px; min-width: 0; }
.ba-wherebuy__count { margin: 0 0 6px; font-size: 24px; font-weight: 800; line-height: 1.25; color: var(--ba-green-deep); }
.ba-wherebuy__count--sm { font-size: 20px; line-height: 1.35; }
.ba-wherebuy--none .ba-wherebuy__lead { margin-bottom: 0; }
.ba-wherebuy__lead { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--ba-text-2); }
.ba-wherebuy__chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
/* Chain chips are links: open the store drawer for this product, pre-filtered by the chain. */
.ba-wherebuy__chip {
	display: inline-block; font-size: 14px; font-weight: 700; color: var(--ba-text-strong); background: #fff;
	border: 1px solid #e0e2d4; border-radius: var(--ba-r-xs); padding: 6px 12px; text-decoration: none;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.ba-design-new a.ba-wherebuy__chip { color: var(--ba-text-strong); }
.ba-design-new a.ba-wherebuy__chip:hover,
.ba-design-new a.ba-wherebuy__chip:focus-visible { border-color: var(--ba-green); color: var(--ba-green-deep); background: var(--ba-surface-chip); }
.ba-wherebuy__btn { white-space: nowrap; }

.ba-docs { display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 0; padding: 0; }
.ba-doc {
	display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: #fff;
	border: 1px solid var(--ba-border); border-radius: var(--ba-r-md); transition: border-color var(--ba-ease);
}
.ba-doc:hover { border-color: var(--ba-green); }
.ba-doc__label { flex: 1; min-width: 0; font-weight: 600; color: var(--ba-text-strong); overflow-wrap: break-word; }
.ba-doc__meta { font-weight: 400; font-size: 13.5px; color: var(--ba-text-muted); white-space: nowrap; }
.ba-doc__open { font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--ba-green); }

/* Related panel: advice rows + "Samast kategooriast" rows */
.ba-related {
	display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px 56px; align-items: start;
	margin-top: 72px; padding: 32px 36px 28px;
	background: var(--ba-surface); border: 1px solid var(--ba-divider); border-radius: var(--ba-r-xl);
}
.ba-related--two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.ba-related__col { min-width: 0; }
.ba-related__title {
	font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--ba-text-strong);
	margin: 0 0 10px; padding-bottom: 12px; border-bottom: 2px solid var(--ba-border-green);
}
.ba-related__list { list-style: none; margin: 0; padding: 0; }
.ba-related:not(.ba-related--two) .ba-related__list--products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); column-gap: 28px; }
.ba-related .ba-row { margin: 0; }
.ba-related .ba-row:hover, .ba-related .ba-row:has(.ba-card__link:hover) { background: #fff; }
.ba-related__thumb { width: 120px; height: 80px; }
.ba-related__thumb img { object-fit: cover; }
.ba-row__thumb img { display: block; width: 100%; height: 100%; }
.ba-related__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ba-design-new .ba-related__name { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--ba-text-strong); }
.ba-design-new .ba-related .ba-row:hover .ba-related__name { color: var(--ba-green-hover); }
.ba-related__excerpt {
	font-size: 14px; line-height: 1.5; color: var(--ba-text-muted);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ba-related__cat { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ba-green); }
.ba-related__packs { font-size: 13.5px; color: var(--ba-text-muted); }
.ba-row:has(.ba-card__link:focus-visible), .ba-spost:has(.ba-card__link:focus-visible) { outline: 3px solid var(--ba-green); outline-offset: 2px; }

/* ---------- Search ---------- */
.ba-search__title { margin: 0 0 12px; }
.ba-search__form { position: relative; margin: 0 0 18px; }
.ba-design-new .ba-search__input {
	max-width: none; width: 100%; padding: 17px 60px 17px 54px; font-size: 17px;
	border: 2px solid var(--ba-green); border-radius: var(--ba-r-md); -webkit-appearance: none; appearance: none;
}
.ba-search__input::-webkit-search-cancel-button, .ba-search__input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.ba-search__icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--ba-green); pointer-events: none; }
.ba-search__clear {
	position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
	border: 0; border-radius: 50%; background: var(--ba-surface-icon); color: var(--ba-green-deep); cursor: pointer;
}
.ba-search__clear:hover { background: #e4e7d6; }
.ba-search__clear[hidden], html:not(.ba-js) .ba-search__clear { display: none; }
.ba-search__bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
	margin: 0 0 32px; padding-bottom: 18px; border-bottom: 1px solid var(--ba-divider);
}
.ba-search__summary { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ba-text); }
.ba-search__filters { display: none; flex-wrap: wrap; gap: 8px; }
.ba-js .ba-search__filters:not([hidden]) { display: flex; }
.ba-search__group[hidden], .ba-search__none[hidden] { display: none; }
.ba-search__heading { font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--ba-text-strong); margin: 0 0 18px; }
.ba-search__n { color: var(--ba-text-muted); font-weight: 600; }
.ba-search__grid { margin-bottom: 56px; }
.ba-search__grid .ba-card__body { padding: 14px 18px 18px; gap: 6px; }
.ba-search__grid .ba-pcard__title { font-size: 15.5px; flex: 0 0 auto; }
.ba-search__results[aria-busy="true"] { opacity: .6; transition: opacity .2s ease .15s; }
.ba-search__posts { display: flex; flex-direction: column; gap: 14px; max-width: 760px; list-style: none; margin: 0 0 24px; padding: 0; }
.ba-spost {
	position: relative; display: flex; gap: 18px; align-items: center; margin: 0; padding: 14px;
	background: #fff; border: 1px solid var(--ba-border); border-radius: var(--ba-r-card); transition: border-color .12s ease;
}
.ba-spost:hover, .ba-spost:has(.ba-card__link:hover) { border-color: var(--ba-green); }
.ba-spost__thumb { width: 76px; height: 56px; flex-shrink: 0; overflow: hidden; border-radius: var(--ba-r-sm); background: #eef0e4; }
.ba-spost__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ba-spost__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ba-design-new .ba-spost__title { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ba-text-strong); }
.ba-spost__tag { font-size: 13.5px; color: var(--ba-text-muted); }
/* Below a group (P-25): "Näidatud 48 toodet 72-st." + "Näita rohkem" + the best category link; in the "Kõik" view
   (both groups, JS) only the first 8 cards / 4 rows and "Näita kõiki …" (search.js). */
.ba-search__more { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: -32px 0 56px; }
.ba-search__more[hidden], .ba-search__more [hidden], .ba-search__all[hidden], .ba-search__cats[hidden], .ba-search__help[hidden] { display: none; }
.ba-search__count { flex: 1 1 100%; margin: 0; font-size: 14px; color: var(--ba-text-muted); }
.ba-design-new .ba-search__catlink { font-size: 15px; font-weight: 700; color: var(--ba-green); }
.ba-design-new .ba-search__catlink:hover { color: var(--ba-green-hover); }
.ba-search__posts + .ba-search__all, .ba-search__posts ~ .ba-search__more { margin-top: -8px; margin-bottom: 32px; }
.ba-search__all { margin: -32px 0 56px; }
.ba-js .ba-search__group.is-preview .ba-search__grid > li:nth-child(n+9),
.ba-js .ba-search__group.is-preview .ba-search__posts > li:nth-child(n+5) { display: none; }
.ba-search__heading:focus { outline: none; }
.ba-search__heading:focus-visible { outline: 3px solid var(--ba-green); outline-offset: 4px; }
/* "Kategooriad" (P-25): matching product categories as chips with their card counts. */
.ba-search__cats { margin: 0 0 36px; }
.ba-search__cats .ba-search__heading { margin-bottom: 12px; }
/* Nothing found (P-24): help instead of one grey line. */
.ba-search__help { max-width: 760px; padding: 8px 0 24px; }
.ba-search__help-title { margin: 0 0 8px; font-size: 22px; font-weight: 800; line-height: 1.3; color: var(--ba-text-strong); }
.ba-search__help-none { margin: 0 0 6px; font-size: 16px; color: var(--ba-text); }
.ba-search__help-tip { margin: 0 0 24px; font-size: 15.5px; line-height: 1.55; color: var(--ba-text-2); }
.ba-search__help-label { margin: 0 0 10px; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ba-text-muted); }
.ba-search__help-list { margin-bottom: 24px; }
.ba-search__help-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 4px 0 0; font-size: 15.5px; font-weight: 700; }

/* Search (P-81): the sidebar follows the results in the document (phones: field and results first); ≥1025px it keeps
   the left column. */
@media (min-width: 1025px) {
	.ba-search__layout > .ba-side { grid-column: 1; grid-row: 1; }
	.ba-search__layout > .ba-shop__content { grid-column: 2; grid-row: 1; }
}

/* ---------- Tablet (≤1024px): one column, "Kategooriad ▾" toggle above the content ---------- */
@media (max-width: 1024px) {
	.ba-shop__layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.ba-side__panel { position: static; max-height: none; overflow: visible; }
	.ba-js .ba-side__toggle {
		display: flex; align-items: center; justify-content: space-between; width: 100%;
		padding: 14px 16px; background: #fff; border: 1px solid var(--ba-control); border-radius: var(--ba-r-md);
		font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--ba-text-strong); cursor: pointer; text-align: left;
	}
	.ba-js .ba-side__toggle:hover { border-color: var(--ba-green); }
	.ba-side__chev { width: 9px; height: 9px; margin: -5px 4px 0 12px; border: solid var(--ba-green); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); transition: transform var(--ba-ease); }
	.ba-side__toggle[aria-expanded="true"] .ba-side__chev { margin-top: 4px; transform: rotate(-135deg); }
	.ba-js .ba-side__panel { display: none; margin-top: 8px; }
	.ba-js .ba-side.is-open .ba-side__panel { display: block; }
	.ba-js .ba-side .ba-catnav__title {
		position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
		clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
	}
	.ba-js .ba-side__panel { padding: 8px 0; }
}

@media (hover: none), (pointer: coarse), (max-width: 1024px) {
	.ba-sort .ba-select { font-size: 16px; } /* no iOS zoom on focus (P-42) */
}

/* ---------- Mobile (≤760px) ---------- */
/* First screen on phones (regressions #4): compact toggle, H1, one swipeable row of subcategory chips and one toolbar
   row, so the first product card / the product title start high (live had them at ~316 / ~200 px). */
/* Also low landscape windows (phones turned sideways, 844×390; panel P-82, package A): compact top. */
@media (max-width: 760px), (max-height: 500px) and (max-width: 1024px) {
	.ba-shop__layout { padding-top: 14px; gap: 14px; }
	.ba-js .ba-side__toggle { padding: 10px 14px; font-size: 15px; }
	.ba-shop__title { margin-bottom: 10px; }
	.ba-product__title { margin-bottom: 14px; }
}
@media (max-width: 760px) {
	.ba-archive__desc { font-size: 15px; margin-bottom: 14px; }
	.ba-archive__chips { margin: 0 calc(-1 * var(--ba-gutter)) 10px; }
	.ba-archive__chips .ba-chips {
		flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
		padding: 3px var(--ba-gutter); scroll-padding-inline: var(--ba-gutter);
	}
	.ba-archive__chips .ba-chips::-webkit-scrollbar { display: none; }
	.ba-archive__chips .ba-chips > li { flex: 0 0 auto; margin: 0; }
	.ba-archive__chips .ba-chip { padding: 6px 12px; font-size: 14px; white-space: nowrap; }
	/* More chips off to the side: fade that edge (classes set by shop.js). */
	.ba-archive__chips .ba-chips.is-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
	.ba-archive__chips .ba-chips.is-less { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); }
	.ba-archive__chips .ba-chips.is-less.is-more {
		-webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
		mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
	}
	/* Search on phones (P-81): a compact result bar and the category chips in one swipeable row, so results start
	   above the on-screen keyboard. */
	.ba-search__form { margin-bottom: 12px; }
	.ba-search__bar { gap: 8px 12px; margin-bottom: 16px; padding-bottom: 12px; }
	.ba-search__filters { gap: 6px; }
	.ba-search__filters .ba-chip { padding: 5px 10px; font-size: 14px; }
	.ba-search__cats { margin: 0 calc(-1 * var(--ba-gutter)) 24px; }
	.ba-search__cats .ba-search__heading { margin: 0 var(--ba-gutter) 8px; font-size: 15px; }
	.ba-search__cats .ba-chips {
		flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
		padding: 3px var(--ba-gutter); scroll-padding-inline: var(--ba-gutter);
	}
	.ba-search__cats .ba-chips::-webkit-scrollbar { display: none; }
	.ba-search__cats .ba-chips > li { flex: 0 0 auto; margin: 0; }
	.ba-search__cats .ba-chip { padding: 6px 12px; font-size: 14px; white-space: nowrap; }
	.ba-archive__toolbar { flex-wrap: nowrap; gap: 10px; margin-bottom: 16px; padding-bottom: 10px; }
	.ba-archive__count { flex: 1 1 auto; min-width: 0; }
	.ba-sort { flex: 0 0 auto; gap: 8px; }
	.ba-sort .ba-dropdown__btn { padding-top: 8px; padding-bottom: 8px; }
	.ba-product__top { margin-bottom: 48px; }
	.ba-wherebuy { padding: 22px 18px; }
	.ba-related { padding: 22px 18px; margin-top: 56px; }
	.ba-related__thumb { width: 88px; height: 64px; }
	.ba-specs th { width: 42%; }
	.ba-specs th, .ba-specs td { padding: 12px 14px; }
	.ba-doc { padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
	.ba-archive__toolbar { align-items: center; }
	.ba-pager .page-numbers { min-width: 40px; height: 40px; }
}
@media (max-width: 480px) {
	/* Count and sort stay on one row (regressions #4): "Järjesta" is read to screen readers only (it still names the
	   dropdown via aria-labelledby and the no-JS select via <label for>). */
	.ba-archive__count { white-space: nowrap; }
	.ba-sort__label {
		position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
		clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
	}
	.ba-ptabs .ba-tabs { gap: 0; }
	.ba-ptabs .ba-tab { padding-left: 10px; padding-right: 10px; font-size: 15px; }
	.ba-search__summary { flex: 1 1 100%; }
	.ba-product__actions .ba-btn { flex: 1 1 100%; }
	.ba-wherebuy__btn { width: 100%; }
}
