/* Baltic Agro Koduaed – home page (design section A): hero, category strip, favourites, theme modules.
   front-page.php; handle ba-home (depends on ba-core). Breakpoints: 1024 (tablet), 760 (mobile), 480 (small). */

/* ---------- Split hero ---------- */
.ba-home-hero {
	background: radial-gradient(120% 140% at 85% 30%, #2f4a12 0%, var(--ba-green-deep) 60%);
	color: #fff;
	--ba-focus: #fff;
}
.ba-home-hero__inner {
	display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px;
	padding-top: 72px; padding-bottom: 120px;
}
.ba-home-hero__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.ba-home-hero__badge { margin: 0; }
.ba-design-new .ba-home-hero__title { color: #fff; max-width: 560px; }
.ba-home-hero__sub { font-size: 19px; line-height: 1.6; color: rgba(255, 255, 255, .88); max-width: 500px; margin: 0; }
.ba-home-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.ba-home-hero__actions .ba-btn { padding: 16px 30px; }
.ba-home-hero__media {
	flex: 1 1 380px; min-width: 0; max-width: 560px; aspect-ratio: 4 / 3;
	border-radius: var(--ba-r-xl); overflow: hidden; background: #2f3d17;
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.ba-site .ba-home-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

/* ---------- Category strip (overlaps the hero; no product counts) ---------- */
.ba-home-strip-wrap { position: relative; z-index: 2; margin-top: -52px; }
.ba-home-strip {
	border: 1px solid var(--ba-border); border-radius: var(--ba-r-lg); overflow: hidden;
	box-shadow: 0 28px 48px -32px rgba(20, 30, 8, .4); background: var(--ba-divider);
}
.ba-home-strip__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; list-style: none; margin: 0; padding: 0; }
.ba-home-strip__list > li { margin: 0; display: flex; }
.ba-design-new .ba-home-strip__item {
	flex: 1; display: flex; align-items: center; gap: 14px; padding: 18px 22px; min-width: 0;
	background: #fff; color: var(--ba-text-strong); transition: background-color var(--ba-ease), color var(--ba-ease);
}
.ba-design-new .ba-home-strip__item:hover { background: var(--ba-surface); color: var(--ba-green-deep); }
.ba-design-new .ba-home-strip__item:focus-visible { outline-offset: -3px; }
.ba-home-strip__img { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--ba-divider); background: #f4f4ee; overflow: hidden; }
.ba-site .ba-home-strip__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-home-strip__text { display: flex; flex-direction: column; min-width: 0; }
.ba-home-strip__name { font-size: 15.5px; font-weight: 800; line-height: 1.2; }
.ba-home-strip__hint { font-size: 13.5px; line-height: 1.35; color: var(--ba-text-muted); margin-top: 3px; }

/* ---------- "Hooaja lemmikud" ---------- */
.ba-home-favs { padding-top: 88px; padding-bottom: var(--ba-section); }
.ba-home-favs__grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(172px, 100%), 1fr)); gap: 20px;
	list-style: none; margin: 0; padding: 0;
}
.ba-home-favs__grid > li { display: flex; margin: 0; min-width: 0; }
.ba-pcard { flex: 1; }
.ba-pcard .ba-card__body { padding: 14px 16px 16px; gap: 4px; }
.ba-pcard__title { font-size: 15.5px; }
.ba-pcard .ba-card__cta { margin-top: 6px; }
.ba-pcard .ba-card__meta { font-size: 13px; }

/* Missing product photo: pack-size tile (design "Known prototype simplifications") */
.ba-pack-tile {
	width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center;
	background: var(--ba-surface-chip); color: var(--ba-green); font-size: 22px; font-weight: 800; line-height: 1.1; padding: 8px;
}
.ba-pack-tile--sm { font-size: 13px; padding: 4px; }

/* ---------- Theme modules (same layout every time; backgrounds alternate) ---------- */
.ba-theme { padding: 88px 0; border-top: 1px solid var(--ba-divider); background: #fff; }
.ba-theme--alt { background: var(--ba-surface); }
.ba-theme__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px 56px; margin-bottom: 48px; }
.ba-theme__intro { flex: 1 1 420px; min-width: 0; max-width: 620px; }
.ba-theme__lead { font-size: 18px; line-height: 1.55; color: var(--ba-text-2); margin: 12px 0 0; }
.ba-theme__cta { margin-top: 24px; }
.ba-theme__media { flex: 1 1 360px; min-width: 0; max-width: 480px; aspect-ratio: 2 / 1; border-radius: var(--ba-r-lg); overflow: hidden; background: #eef0e4; }
.ba-site .ba-theme__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ba-theme__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 40px 56px; align-items: start; }
.ba-theme__cols--one { grid-template-columns: minmax(0, 1fr); }
.ba-theme__col { min-width: 0; }
.ba-theme__label {
	font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; line-height: 1.4; color: var(--ba-text-muted);
	padding-bottom: 10px; border-bottom: 2px solid #e4e6d8; margin: 0 0 4px;
}
.ba-theme__list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.ba-theme__list--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); column-gap: 56px; }
.ba-theme__list > li { margin: 0; }

/* Rows (component .ba-row from core): product 64 px thumb + packs, article 88×64 thumb */
.ba-theme .ba-row:hover, .ba-theme .ba-row:has(.ba-card__link:hover) { color: var(--ba-green-hover); }
.ba-design-new .ba-row .ba-card__link { color: inherit; }
.ba-row:has(.ba-card__link:focus-visible) { outline: 3px solid var(--ba-green); outline-offset: 2px; }
.ba-row .ba-card__link:focus-visible { outline: none; }
.ba-prow__thumb { display: flex; align-items: center; justify-content: center; }
.ba-prow__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ba-prow__packs { font-size: 13px; color: var(--ba-text-muted); margin-top: 2px; }
.ba-arow .ba-row__thumb--wide { height: 64px; border: 0; border-radius: var(--ba-r-sm); background: #eef0e4; }
.ba-arow .ba-row__title { line-height: 1.35; }

/* ---------- Tablet / mobile (section L) ---------- */
@media (max-width: 1024px) {
	.ba-theme__media { max-width: none; flex-basis: 100%; }
}
@media (max-width: 760px) {
	/* Shorter hero on phones (regressions #4): tighter spacing, buttons side by side, a 16:9 photo crop. */
	.ba-home-hero__inner { padding-top: 26px; padding-bottom: 76px; gap: 22px; }
	.ba-home-hero__text { gap: 12px; }
	.ba-home-hero__sub { font-size: 16.5px; line-height: 1.5; }
	.ba-home-hero__actions { margin-top: 4px; gap: 10px; }
	.ba-home-hero__actions .ba-btn { padding: 12px 18px; font-size: 15.5px; }
	.ba-home-hero__media { flex-basis: 100%; aspect-ratio: 16 / 9; }
	.ba-home-strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ba-home-strip__item { padding: 16px; }
	.ba-home-favs { padding-top: var(--ba-section); }
	.ba-theme { padding: var(--ba-section) 0; }
	.ba-theme__head { margin-bottom: 32px; }
	.ba-theme__lead { font-size: 17px; }
}
@media (max-width: 480px) {
	.ba-home-strip__list { grid-template-columns: minmax(0, 1fr); }
	.ba-home-hero__actions { width: 100%; }
	.ba-home-hero__actions .ba-btn { flex: 1 1 auto; }
}

/* .ba-view keeps transform: matrix(…) with fill-mode "both", which makes <main> the containing block of fixed
   descendants (e.g. the reCAPTCHA badge → horizontal overflow). Only the start state is needed. (Reported to A.) */
.ba-main.ba-view { animation-fill-mode: backwards; }
