/* Fieldlot — marketplace home (OLX + Alibaba + борса) */

body {
	font-family: var(--fl-font);
}

/* —— Header marketplace —— */
.site-header--market {
	border-bottom-color: var(--fl-line);
	background: var(--fl-header-bg);
}

.header-inner {
	width: min(1200px, calc(100% - 24px));
	margin: 0 auto;
	padding: 12px 0 10px;
}

.header-row {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.header-search {
	flex: 1;
	min-width: 200px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
	min-height: 44px;
	border: 1px solid var(--fl-line);
	border-radius: 999px;
	background: var(--fl-surface);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.header-search:focus-within {
	border-color: var(--fl-accent);
	box-shadow: 0 0 0 3px var(--fl-accent-soft);
}

.header-search input {
	flex: 1;
	border: 0;
	background: transparent;
	outline: none;
	font-size: 14px;
	color: var(--fl-ink);
}

.header-search input::placeholder {
	color: var(--fl-muted);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.header-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--fl-line);
	font-size: 14px;
	font-weight: 500;
}

.header-nav a {
	text-decoration: none;
	color: var(--fl-muted);
	transition: color 0.15s;
}

.header-nav a:hover {
	color: var(--fl-brand);
}

.btn-publish {
	background: var(--fl-gold) !important;
	color: var(--fl-ink) !important;
	border-color: #a8861f !important;
}

.btn-publish:hover {
	background: #dbb42e !important;
}

.btn-ghost {
	background: transparent;
	color: var(--fl-brand);
	border-color: var(--fl-line);
}

/* —— Hero ecosystem —— */
.hero-eco {
	position: relative;
	min-height: min(88vh, 760px);
	display: flex;
	align-items: stretch;
	overflow: hidden;
	color: #fff;
}

.hero-eco-bg {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			105deg,
			rgba(15, 51, 38, 0.55) 0%,
			rgba(26, 77, 58, 0.4) 45%,
			rgba(15, 26, 20, 0.35) 100%
		),
		var(--hero-bg, url("/images/hero/background.jpg")) center / cover;
}

.hero-eco-inner {
	position: relative;
	z-index: 1;
	width: min(1200px, calc(100% - 24px));
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr minmax(260px, 420px);
	gap: 28px;
	align-items: end;
	padding: 48px 0 56px;
}

.hero-eco-gallery {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-self: end;
	margin-top: 14px;
	width: 100%;
	max-width: 380px;
	justify-self: end;
}

.hero-glass-card {
	padding: 20px 24px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background-color: rgba(255, 255, 255, 0.12);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	gap: 16px;
	transition: transform 0.3s ease, background-color 0.3s ease;
	animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-glass-card:hover {
	transform: translateX(-6px);
	background-color: rgba(255, 255, 255, 0.22);
}

.hero-glass-icon {
	font-size: 28px;
	opacity: 0.95;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-glass-icon svg {
	width: 28px;
	height: 28px;
	stroke: #fff;
}

.hero-glass-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.hero-glass-title {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.75);
	font-weight: 600;
}

.hero-glass-value {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

@keyframes slideInRight {
	from { opacity: 0; transform: translateX(20px); }
	to { opacity: 1; transform: translateX(0); }
}

.hero-eco-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(15, 26, 20, 0.3) 0%, transparent 55%);
	pointer-events: none;
}

.hero-eco-content {
	position: relative;
}

/* Hero е винаги видим — не чака scroll reveal */
.hero-eco .hero-eco-content.reveal,
.hero-eco .hero-eco-gallery.reveal {
	opacity: 1;
	transform: none;
}

.hero-eco-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	backdrop-filter: blur(8px);
}

.hero-eco h1 {
	margin: 16px 0 0;
	max-width: 16ch;
	font-size: clamp(32px, 5.5vw, 52px);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: #fff;
	text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
}

.hero-eco-lead {
	margin: 14px 0 0;
	max-width: 480px;
	font-size: 17px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.88);
}

.hero-eco-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 28px;
}

.hero-eco-cta .btn-primary {
	background: var(--fl-gold);
	color: var(--fl-ink);
	border-color: #a8861f;
}

.hero-eco-cta .btn-primary:hover {
	background: #e8c040;
}

.hero-eco-cta .btn-secondary {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.35);
	backdrop-filter: blur(6px);
}

.hero-eco-cta .btn-secondary:hover {
	background: rgba(255, 255, 255, 0.22);
}

.hero-eco-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-eco-stats div strong {
	display: block;
	font-size: 22px;
	font-weight: 700;
}

.hero-eco-stats div span {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
}

/* —— Sections common —— */
.eco-section {
	padding: 64px 0;
}

.eco-section--alt {
	background: var(--fl-white);
}

.eco-section-head {
	margin-bottom: 28px;
}

.eco-section-head h2 {
	margin: 6px 0 0;
	font-size: clamp(24px, 3.5vw, 32px);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--fl-ink);
}

.eco-section-head p {
	margin: 10px 0 0;
	max-width: 560px;
	color: var(--fl-muted);
	line-height: 1.6;
}

.eco-eyebrow {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--fl-accent);
}

/* —— Categories —— */
.cat-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@media (min-width: 720px) {
	.cat-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.cat-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 8px;
	min-height: 148px;
	padding: 16px;
	border: 1px solid var(--fl-line);
	border-radius: var(--fl-radius-lg);
	background: var(--fl-white);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
	overflow: hidden;
	position: relative;
}

.cat-card--photo {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.12);
}

.cat-card--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, transparent 20%, rgba(15, 26, 20, 0.88) 100%),
		var(--cat-img) center / cover;
	z-index: 0;
	transition: transform 0.35s ease;
}

.cat-card--photo:hover::before {
	transform: scale(1.06);
}

.cat-card--photo > * {
	position: relative;
	z-index: 1;
}

.cat-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--fl-shadow);
	border-color: var(--fl-accent-soft);
}

.cat-card .icon {
	display: block;
	font-size: 28px;
	line-height: 1;
	min-height: 28px;
	margin-bottom: 4px;
	opacity: 0.95;
}

.cat-card--photo .icon {
	display: none;
}

.header-search-icon {
	display: inline-block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	background: currentColor;
	opacity: 0.55;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='black' stroke-width='2'/%3E%3Cpath d='M20 20l-3-3' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='black' stroke-width='2'/%3E%3Cpath d='M20 20l-3-3' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.llm-photo {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1;
}

.cat-card--photo span:last-child {
	color: rgba(255, 255, 255, 0.82);
}

.cat-card strong {
	font-size: 15px;
	font-weight: 600;
}

.cat-card span {
	font-size: 12px;
	color: var(--fl-muted);
}

/* —— Product cards (marketplace) —— */
.product-grid,
#home-listings {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

#home-listings .yp-entry .product-card-actions {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
}

#home-listings .yp-entry .product-card-actions .btn {
	flex: 1;
	min-width: 100px;
	min-height: 36px;
	font-size: 12px;
}

.product-meta {
	margin: 0;
	font-size: 13px;
	color: var(--fl-muted);
	line-height: 1.45;
}

.product-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	font-size: 13px;
}

.product-price {
	font-size: 22px;
	font-weight: 700;
	color: var(--fl-brand);
	letter-spacing: -0.02em;
}

.product-price small {
	font-size: 12px;
	font-weight: 500;
	color: var(--fl-muted);
}

.product-rating {
	color: var(--fl-gold);
	font-size: 13px;
	font-weight: 600;
}

.product-seller {
	font-size: 12px;
	color: var(--fl-muted);
}

.product-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 16px 16px;
}

.product-card-actions .btn {
	flex: 1;
	min-width: 100px;
	min-height: 38px;
	font-size: 13px;
	padding: 0 12px;
}

/* —— Exchange table —— */
.exchange-panel {
	border: 1px solid var(--fl-line);
	border-radius: var(--fl-radius-xl);
	background: var(--fl-white);
	overflow: hidden;
	box-shadow: var(--fl-shadow);
}

.exchange-live-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px;
	background: var(--fl-brand-deep);
	color: #fff;
}

.exchange-live-bar strong {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.exchange-table-wrap {
	overflow-x: auto;
}

.exchange-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.exchange-table th,
.exchange-table td {
	padding: 14px 20px;
	text-align: left;
	border-bottom: 1px solid var(--fl-line);
}

.exchange-table th {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--fl-muted);
	background: var(--fl-surface);
}

.exchange-table tr:last-child td {
	border-bottom: 0;
}

.exchange-table .product-name {
	font-weight: 600;
}

.chg-up {
	color: var(--fl-up);
	font-weight: 600;
}

.chg-down {
	color: var(--fl-down);
	font-weight: 600;
}

.price-trend {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
}

.price-trend.up {
	color: #2b8c4a;
}

.price-trend.down {
	color: #c0392b;
}

.price-trend.neutral {
	color: #7f8c8d;
}

.commodity-price .value {
	font-weight: 600;
}

.hero-ticker .ticker-quote {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cat-card .offer-count {
	margin: 6px 0 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--fl-accent);
	opacity: 0.95;
}

.cat-card--photo .offer-count {
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* —— Logistics —— */
.logistics-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.log-card {
	padding: 24px;
	border: 1px solid var(--fl-line);
	border-radius: var(--fl-radius-lg);
	background: var(--fl-surface);
}

.log-card-photo {
	padding: 0;
	overflow: hidden;
}

.log-card-photo .log-card-img {
	position: relative;
	min-height: 160px;
	height: 160px;
	overflow: hidden;
	background: var(--fl-surface-2) center / cover;
}

[data-log="transport"] .log-card-img {
	display: none;
}

[data-log="warehouse"] .log-card-img {
	display: none;
}

[data-log="tracking"] .log-card-img {
	display: none;
}

#logistics .logistics-grid.reveal {
	opacity: 1;
	transform: none;
}

.log-card-photo .log-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.log-card-photo .log-card-body {
	padding: 18px 20px 22px;
}

.log-card .icon {
	font-size: 32px;
	margin-bottom: 12px;
}

.log-card h3 {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 600;
}

.log-card p {
	margin: 0;
	font-size: 14px;
	color: var(--fl-muted);
	line-height: 1.55;
}

/* —— Farmer profile —— */
.farmer-spotlight {
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: 32px;
	align-items: center;
	padding: 32px;
	border-radius: var(--fl-radius-xl);
	background: linear-gradient(135deg, var(--fl-brand-deep) 0%, var(--fl-brand) 100%);
	color: #fff;
}

.farmer-avatar {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	border: 4px solid rgba(255, 255, 255, 0.35);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.farmer-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* —— Top producers showcase (3 farm slots) —— */
.farm-showcase-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	width: 100%;
}

.farm-showcase-card {
	position: relative;
	display: block;
	min-height: 240px;
	border-radius: var(--fl-radius-lg);
	overflow: hidden;
	border: 1px solid var(--fl-line);
	text-decoration: none;
	color: #fff;
	box-shadow: var(--fl-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.farm-showcase-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--fl-shadow-md);
}

.farm-showcase-img {
	position: absolute;
	inset: 0;
	background: var(--fl-brand-deep) center / cover;
}

[data-farm-img='farm'] {
	background-image: url('/images/hero/farm.jpg');
}

[data-farm-img='field'] {
	background-image: url('/images/hero/background.jpg');
}

[data-farm-img='facility'] {
	background-image: url('/images/farmers/facility.jpg');
}

.farm-showcase-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.farm-showcase-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8, 24, 18, 0.15) 0%, rgba(8, 24, 18, 0.72) 72%);
	pointer-events: none;
}

.farm-showcase-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 18px 16px 16px;
}

.farm-showcase-badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: rgba(232, 185, 35, 0.92);
	color: var(--fl-ink);
}

.farm-showcase-caption p {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.farm-showcase-cta {
	margin-top: 20px;
	text-align: center;
}

.farmers-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: center;
}

.farmer-chip {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 100px;
	text-decoration: none;
	color: inherit;
}

.farmer-chip img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--fl-white);
	box-shadow: var(--fl-shadow-sm);
}

.farmer-chip strong {
	font-size: 14px;
	font-weight: 600;
}

.farmer-chip span {
	font-size: 12px;
	color: var(--fl-muted);
	text-align: center;
}

.farmer-chip em {
	font-style: normal;
	font-size: 12px;
	font-weight: 600;
	color: var(--fl-gold);
}

.farmer-spotlight h2 {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

.farmer-spotlight p {
	margin: 0 0 16px;
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.6;
	font-size: 15px;
}

.farmer-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.farmer-tags span {
	padding: 4px 10px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.12);
	font-size: 12px;
	font-weight: 500;
}

/* —— AI block —— */
.ai-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.ai-card {
	padding: 22px;
	border: 1px solid var(--fl-line);
	border-radius: var(--fl-radius-lg);
	background: var(--fl-white);
}

.ai-card h3 {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
}

.ai-card p {
	margin: 0;
	font-size: 14px;
	color: var(--fl-muted);
	line-height: 1.55;
}

.ai-card .example {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: var(--fl-radius);
	background: var(--fl-brand-soft);
	font-size: 13px;
	font-style: italic;
	color: var(--fl-brand);
}

/* —— Article series (home) —— */
.article-series-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

.article-series-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 20px 18px;
	border-radius: var(--fl-radius);
	border: 1px solid var(--fl-line);
	background: var(--fl-surface);
	box-shadow: 0 8px 28px -18px rgba(0, 0, 0, 0.12);
	transition:
		border-color 0.2s ease,
		box-shadow 0.25s ease,
		transform 0.25s ease;
	text-decoration: none;
	color: inherit;
}

.article-series-card:hover {
	border-color: var(--fl-accent);
	box-shadow: 0 12px 36px -16px rgba(26, 77, 58, 0.22);
	transform: translateY(-3px);
}

.article-series-part {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--fl-accent);
	margin-bottom: 8px;
}

.article-series-card h3 {
	margin: 0 0 10px;
	font-size: 1.1rem;
	line-height: 1.25;
	color: var(--fl-ink);
}

.article-series-card p {
	margin: 0 0 14px;
	flex: 1;
	font-size: 14px;
	line-height: 1.5;
	color: var(--fl-muted);
}

.article-series-meta {
	font-size: 12px;
	color: var(--fl-muted);
	margin-top: auto;
}

.article-series-read {
	font-size: 13px;
	font-weight: 600;
	color: var(--fl-brand);
}

.demo-strip {
	margin-top: 48px;
	padding: 14px 18px;
	border-radius: var(--fl-radius);
	border: 1px dashed var(--fl-gold);
	background: var(--fl-gold-soft);
	font-size: 14px;
	color: var(--fl-ink);
	text-align: center;
}

/* —— Responsive —— */
@media (max-width: 960px) {
	.hero-eco-inner {
		grid-template-columns: 1fr;
		padding-top: 36px;
	}
	.hero-eco-gallery {
		display: none;
	}
	.cat-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.logistics-grid,
	.ai-grid {
		grid-template-columns: 1fr;
	}
	.article-series-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.farmer-spotlight {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.farmer-tags {
		justify-content: center;
	}
}

@media (max-width: 640px) {
	.cat-grid {
		grid-template-columns: 1fr 1fr;
	}
	.article-series-grid {
		grid-template-columns: 1fr;
	}
	.hero-eco {
		min-height: auto;
	}
	.hero-eco-content {
		padding: 36px 0 40px;
	}
	.header-search {
		order: 3;
		flex: 1 1 100%;
	}
}
