/* ==========================================================================
   АгроКомфорт: основні стилі
   ========================================================================== */

:root {
	--navy: #0a1a33;
	--navy-2: #11264a;
	--orange: #ff8f5a;
	--orange-deep: #f0773d;
	--amber: #ffa21f;
	--cream: #fff3e4;
	--cream-2: #fdecd6;
	--ink: #14171c;
	--ink-soft: #3b4048;
	--green: #98ff98;
	--lime: #b9cc00;
	--line: #e9e4dc;
	--radius: 24px;
	--radius-sm: 14px;
	--container: 1240px;
	--gutter: 24px;
	--font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ink);
	background: #fff;
	-webkit-tap-highlight-color: transparent;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1,
h2,
h3,
p {
	margin: 0;
}

button {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 3px solid var(--navy);
	outline-offset: 3px;
	border-radius: 6px;
}

.ac-container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.ac-icon {
	flex: none;
	width: 1.25em;
	height: 1.25em;
}

.ac-h2 {
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 500;
	letter-spacing: -0.01em;
	margin-bottom: 18px;
}

.ac-prose {
	padding-block: 40px;
}

/* ---------- Кнопки ---------- */

.ac-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-radius: 999px;
	border: 1.5px solid transparent;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.ac-btn:active {
	transform: scale(0.97);
}

.ac-btn--contact {
	background: var(--amber);
	color: #fff;
	padding: 8px 14px;
	gap: 6px;
	font-size: 14px;
}

.ac-btn--contact .ac-icon {
	width: 16px;
	height: 16px;
	color: #7a4300;
}

.ac-btn--primary {
	background: var(--orange);
	color: #3a1d0b;
	padding: 8px 8px 8px 20px;
	font-size: 17px;
}

.ac-btn--sm {
	font-size: 12px;
	padding: 6px 7px 6px 12px;
	gap: 6px;
}

.ac-btn__dot {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #0c0c0f;
	color: #fff;
}

.ac-btn--sm .ac-btn__dot {
	width: 20px;
	height: 20px;
}

.ac-btn__dot .ac-icon {
	width: 16px;
	height: 16px;
}

.ac-btn--sm .ac-btn__dot .ac-icon {
	width: 12px;
	height: 12px;
}

@media (hover: hover) {
	.ac-btn--primary:hover {
		background: var(--orange-deep);
	}

	.ac-btn--contact:hover {
		background: #e68f0e;
	}
}

/* ---------- Шапка ---------- */

.ac-header {
	padding-top: 16px;
	background: #fff;
}

.ac-topbar {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 52px;
}

.ac-logo {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: none;
}

.ac-logo__emblem {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.ac-logo__text {
	width: 127px;
	height: auto;
}

.ac-phone {
	font-size: 17px;
	font-weight: 500;
	white-space: nowrap;
}

.ac-topnav {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
	font-size: 14px;
	font-weight: 500;
}

.ac-topnav > a:not(.ac-btn) {
	padding: 6px 2px;
}

.ac-topnav__contact {
	display: none;
}

.ac-topbar__contact {
	margin-left: 4px;
}

.ac-burger,
.ac-cart--mobile,
.ac-call {
	display: none;
}

.ac-phone {
	transition: color 0.15s ease;
}

@media (hover: hover) {
	.ac-phone:hover {
		color: var(--orange-deep);
	}
}

.ac-catbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
}

.ac-catnav {
	position: relative;
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	background: var(--navy);
	color: #fff;
	border-radius: 14px;
	padding: 8px 10px 8px 12px;
}

.ac-catnav__list {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 4px 10px;
	flex-wrap: wrap;
}

.ac-catnav__item {
	position: relative;
}

.ac-catnav__item > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 4px;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.ac-catnav__item .ac-icon--chevron {
	width: 14px;
	height: 14px;
}

.ac-catnav__sub {
	position: absolute;
	top: calc(100% + 10px);
	left: -8px;
	z-index: 30;
	min-width: 220px;
	padding: 8px;
	background: var(--navy);
	border-radius: 14px;
	box-shadow: 0 12px 28px rgba(10, 26, 51, 0.28);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.ac-catnav__sub::before {
	content: "";
	position: absolute;
	inset: -12px 0 auto 0;
	height: 12px;
}

.ac-catnav__sub a {
	display: block;
	padding: 9px 12px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
}

.ac-catnav__item.has-children:hover > .ac-catnav__sub,
.ac-catnav__item.has-children:focus-within > .ac-catnav__sub,
.ac-catnav__item.is-open > .ac-catnav__sub {
	opacity: 1;
	visibility: visible;
	transform: none;
}

@media (hover: hover) {
	.ac-catnav__sub a:hover {
		background: rgba(255, 255, 255, 0.1);
	}
}

.ac-catnav__all {
	flex: none;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--cream);
	color: var(--ink);
	margin-left: 8px;
}

.ac-cart--desktop {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex: none;
	font-weight: 500;
	font-size: 14px;
}

.ac-cart__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #2a1a10;
	color: #fff;
}

.ac-cart__count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--orange);
	color: #3a1d0b;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.ac-cart__count[hidden] {
	display: none;
}

/* ---------- Топові товари ---------- */

.ac-top {
	padding-top: 28px;
}

.ac-carousel__track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 4px 4px 14px;
	margin: -4px -4px 0;
	overscroll-behavior-x: contain;
}

.ac-carousel__track::-webkit-scrollbar {
	display: none;
}

.ac-topcard {
	flex: 0 0 calc((100% - 14px * 3) / 4);
	min-width: 220px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	background: var(--cream);
	border-radius: 20px;
	box-shadow: 0 6px 14px rgba(40, 24, 8, 0.14);
	overflow: hidden;
}

.ac-topcard__link {
	display: block;
	aspect-ratio: 279 / 288;
	overflow: hidden;
}

.ac-topcard__link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ac-topcard__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 14px 14px;
	margin-top: auto;
}

.ac-topcard__name {
	font-size: 14px;
	font-weight: 500;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ac-carousel__bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 24px;
	margin-top: 4px;
}

.ac-dots {
	display: inline-flex;
	gap: 6px;
	padding: 5px 9px;
	border-radius: 999px;
	background: #d6d6d6;
}

.ac-dots i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #f4f4f4;
	transition: background-color 0.18s ease;
}

.ac-dots i.is-active {
	background: #8d8d8d;
}

.ac-carousel__next {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	padding: 6px 4px;
	background: none;
	border: 0;
	color: #9a9a9a;
	cursor: pointer;
}

.ac-carousel[data-static] .ac-carousel__bar {
	display: none;
}

/* ---------- Банер ---------- */

.ac-banner {
	margin-top: 22px;
}

.ac-banner img {
	width: 100%;
	height: auto;
	border-radius: var(--radius);
}

/* ---------- Плитки категорій ---------- */

.ac-tiles {
	margin-top: 22px;
	display: grid;
	gap: 14px;
}

.ac-tiles__row {
	display: grid;
	gap: 14px;
}

.ac-tiles__row--1 {
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.05fr) minmax(0, 1.05fr);
}

.ac-tiles__row--2 {
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.8fr) minmax(0, 1.15fr);
}

.ac-tiles__row--2 .ac-tile:first-child {
	grid-column: 1;
}

.ac-tiles__row--2 .ac-tile:nth-child(2) {
	grid-column: 2;
}

.ac-tiles__intro {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 18px;
	padding: 6px 4px 0 0;
}

.ac-tiles__intro h2 {
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -0.01em;
}

.ac-tiles__intro h2 span {
	color: #0a4a66;
	font-weight: 700;
}

.ac-tiles__intro .ac-btn {
	align-self: flex-start;
}

.ac-tile {
	position: relative;
	display: block;
	min-height: 240px;
	border-radius: var(--radius);
	overflow: hidden;
	isolation: isolate;
}

.ac-tile--cream {
	background: var(--cream);
	color: var(--ink);
}

.ac-tile--navy {
	background: var(--navy);
	color: #fff;
}

.ac-tile__text {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px;
	max-width: 80%;
}

.ac-tile__title {
	font-size: clamp(18px, 1.7vw, 22px);
	font-weight: 600;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.ac-tile__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	opacity: 0.75;
}

.ac-tile__go {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--orange);
	color: #3a1d0b;
}

.ac-tile__go .ac-icon {
	width: 14px;
	height: 14px;
}

.ac-tile > img {
	position: absolute;
	right: -4%;
	bottom: -6%;
	width: 62%;
	height: 92%;
	object-fit: contain;
	object-position: right bottom;
	z-index: 1;
	transition: transform 0.3s ease;
}

@media (hover: hover) {
	.ac-tile:hover > img {
		transform: scale(1.04) rotate(-1deg);
	}
}

/* ---------- Чому обирають нас ---------- */

.ac-why {
	padding-block: 36px 56px;
}

.ac-why__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	text-align: center;
}

.ac-reason__art {
	position: relative;
	width: 240px;
	height: 168px;
	margin: 0 auto 12px;
}

.ac-reason__num {
	position: absolute;
	left: 0;
	top: 6px;
	z-index: 2;
	display: grid;
	place-items: start;
	width: 74px;
	height: 72px;
	padding: 8px 0 0 14px;
	background: #2b2b2b;
	color: #fff;
	font-weight: 700;
	font-size: 26px;
	line-height: 1.2;
	border-radius: 14px;
	clip-path: polygon(0 0, 100% 0, 100% 30%, 38% 100%, 0 100%);
}

.ac-reason__blob {
	position: absolute;
	left: 80px;
	top: 0;
	width: 156px;
	height: 168px;
}

.ac-reason__art--green .ac-reason__blob {
	fill: #c6ffa8;
}

.ac-reason__art--orange .ac-reason__blob {
	fill: #ffa869;
}

.ac-reason__art--yellow .ac-reason__blob {
	fill: #ffe38e;
}

.ac-reason__icon {
	position: absolute;
	left: 80px;
	top: 0;
	width: 156px;
	height: 168px;
	display: grid;
	place-items: center;
	padding: 62px 22px 0 0;
	color: #2b5e34;
}

.ac-reason__art--orange .ac-reason__icon {
	color: #3d3a38;
}

.ac-reason__art--yellow .ac-reason__icon {
	color: #3d3a38;
}

.ac-reason__icon .ac-icon {
	width: 46px;
	height: 46px;
	stroke-width: 2.4;
}

.ac-reason h3 {
	font-size: 22px;
	font-weight: 600;
	margin-bottom: 8px;
}

.ac-reason p {
	max-width: 300px;
	margin-inline: auto;
	font-size: 15px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/* ---------- Сторінка «Про компанію» ---------- */

.ac-about {
	display: grid;
	grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	padding-block: 18px 64px;
}

.ac-about__col {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.ac-about__title {
	font-size: clamp(24px, 2.4vw, 34px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.ac-callout {
	margin: 0;
	padding: 16px 24px;
	background: #e6e6e6;
	border-radius: 20px;
	font-size: clamp(19px, 1.95vw, 28px);
	line-height: 1.4;
}

.ac-about__text {
	font-size: clamp(19px, 1.95vw, 28px);
	line-height: 1.42;
	overflow-wrap: anywhere;
}

.ac-callout strong,
.ac-about__text strong {
	font-weight: 600;
}

.ac-about__rule {
	width: 100%;
	height: 1px;
	margin: 0;
	border: 0;
	background: #3a3a3a;
}

.ac-about__photo {
	margin: 0;
	border-radius: 20px;
	overflow: hidden;
	background: var(--cream);
}

.ac-about__photo img {
	width: 100%;
	height: auto;
	aspect-ratio: 573 / 382;
	object-fit: cover;
}

@media (max-width: 900px) {
	.ac-about {
		grid-template-columns: 1fr;
		gap: 18px;
		padding-bottom: 40px;
	}

	.ac-callout,
	.ac-about__text {
		font-size: 19px;
	}

	.ac-callout {
		padding: 14px 18px;
		border-radius: 16px;
	}
}

/* ---------- Підвал ---------- */

.ac-footer {
	background: var(--cream);
	padding-block: 40px 20px;
}

.ac-footer__inner {
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr;
	gap: 32px;
	align-items: start;
}

.ac-logo--big .ac-logo__emblem {
	width: 48px;
	height: 48px;
}

.ac-logo--big .ac-logo__text {
	width: 152px;
}

.ac-footer__brand p {
	margin-top: 10px;
	color: var(--ink-soft);
	font-size: 17px;
}

.ac-footer__nav {
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 17px;
}

.ac-footer__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	text-align: right;
}

.ac-footer__side p {
	color: var(--ink-soft);
	font-size: 16px;
}

.ac-social {
	display: flex;
	gap: 14px;
}

.ac-social a {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
}

.ac-footer__copy {
	margin-top: 36px;
	font-size: 11px;
	color: var(--ink-soft);
}

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
	.ac-topnav {
		gap: 10px;
		font-size: 13px;
	}

	.ac-topcard {
		flex-basis: calc((100% - 14px * 2) / 3);
	}

	.ac-catnav__list {
		gap: 2px 14px;
	}
}

@media (max-width: 900px) {
	:root {
		--gutter: 16px;
	}

	.ac-header {
		padding-top: 12px;
	}

	.ac-topbar {
		gap: 12px;
	}

	.ac-phone {
		display: none;
	}

	.ac-topbar__contact {
		display: none;
	}

	.ac-burger {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin-left: 0;
		border-radius: 50%;
		border: 0;
		background: var(--cream);
		cursor: pointer;
	}

	.ac-call {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin-left: auto;
		border-radius: 50%;
		background: var(--amber);
		color: #fff;
	}

	.ac-call .ac-icon {
		width: 22px;
		height: 22px;
	}

	.ac-cart--mobile {
		position: relative;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		border-radius: 50%;
		background: #2a1a10;
		color: #fff;
	}

	.ac-cart--desktop {
		display: none;
	}

	.ac-topnav {
		position: absolute;
		left: var(--gutter);
		right: var(--gutter);
		top: 70px;
		z-index: 40;
		margin: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px;
		font-size: 16px;
		background: #fff;
		border-radius: 18px;
		box-shadow: 0 16px 40px rgba(10, 26, 51, 0.22);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
	}

	.ac-topnav.is-open {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.ac-topnav > a:not(.ac-btn) {
		padding: 12px 14px;
		border-radius: 10px;
	}

	.ac-topnav__contact {
		display: inline-flex;
		justify-content: center;
		margin: 8px 6px 6px;
	}

	.ac-header > .ac-container {
		position: relative;
	}

	.ac-catbar {
		margin-top: 10px;
	}

	.ac-catnav {
		padding: 8px 8px 8px 12px;
	}

	.ac-catnav__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 18px;
		scrollbar-width: none;
		padding-block: 2px;
	}

	.ac-catnav__list::-webkit-scrollbar {
		display: none;
	}

	.ac-catnav__sub {
		display: none;
	}

	.ac-topcard {
		flex-basis: min(78%, 300px);
	}

	.ac-carousel__next {
		display: none;
	}

	.ac-tiles__row--1,
	.ac-tiles__row--2 {
		grid-template-columns: 1fr 1fr;
	}

	.ac-tiles__intro {
		grid-column: 1 / -1;
	}

	.ac-tiles__row--2 .ac-tile:first-child,
	.ac-tiles__row--2 .ac-tile:nth-child(2) {
		grid-column: auto;
	}

	.ac-why__list {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.ac-footer__inner {
		grid-template-columns: 1fr;
	}

	.ac-footer__side {
		align-items: flex-start;
		text-align: left;
	}
}

@media (max-width: 560px) {
	.ac-tiles__row--1,
	.ac-tiles__row--2 {
		grid-template-columns: 1fr;
	}

	.ac-tile {
		min-height: 210px;
	}

	.ac-banner img {
		border-radius: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}
