/**
 * Karaaslan Tarım — Ürünlerimiz kataloğu (arşiv + tekil): hero, arama, zaman çizelgesi, kart, modal.
 */

/* ---- Kroki hero ---- */

.ka-catalog-hero {
	position: relative;
	height: 390px;
	overflow: hidden;
	background: #5b6080;
}

.ka-catalog-hero-single {
	height: 260px;
}

.ka-catalog-hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .5;
}

.ka-catalog-hero-overlay {
	position: absolute;
	inset: 0;
	background: rgba(83, 88, 120, .35);
}

.ka-catalog-hero-content {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 40px;
}

.ka-catalog-hero-title {
	font-weight: 600;
	font-size: clamp(30px, 4.5vw, 44px);
	color: #fff;
	margin: 0;
	text-align: center;
}

/* ---- Main / toolbar ---- */

.ka-catalog {
	background: #fff;
	padding: 64px 0 110px;
}

.ka-catalog-single {
	padding: 48px 0 90px;
}

.ka-catalog-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.ka-catalog-search {
	position: relative;
	flex: 1;
	max-width: 360px;
	min-width: 230px;
	color: var(--ka-faint);
}

.ka-catalog-search svg {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.ka-catalog-search-input {
	width: 100%;
	border: 1.5px solid #ddd6ca;
	border-radius: 999px;
	padding: 12px 16px 12px 40px;
	font-family: inherit;
	font-size: 14px;
	background: #fff;
	color: var(--ka-ink);
}

.ka-catalog-search-input:focus-visible {
	outline: 2px solid var(--ka-orange);
	outline-offset: 1px;
}

.ka-catalog-timeline-toggle {
	background: var(--ka-orange);
	color: #fff;
	border: none;
	border-radius: 4px 4px 0 0;
	padding: 12px 20px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	transition: background .15s ease;
}

.ka-catalog-timeline-toggle:hover,
.ka-catalog-timeline-toggle.is-active {
	background: var(--ka-orange-hover);
}

/* ---- Zaman çizelgesi paneli ---- */

.ka-catalog-timeline {
	border: 1.5px solid var(--ka-ink);
	border-radius: 16px;
	margin-bottom: 34px;
	padding: 26px 26px 30px;
	overflow-x: auto;
}

.ka-catalog-timeline-title {
	font-weight: 600;
	font-size: 19px;
	color: var(--ka-ink);
	margin: 0 0 18px;
}

.ka-catalog-timeline-grid {
	display: grid;
	grid-template-columns: 150px repeat(12, 1fr);
	gap: 4px;
	min-width: 820px;
	font-size: 12px;
}

.ka-catalog-timeline-head-spacer {
	grid-column: 1;
}

.ka-catalog-timeline-head-month {
	text-align: center;
	font-weight: 600;
	color: var(--ka-ink);
	padding: 4px 0;
}

.ka-catalog-timeline-row-name {
	font-weight: 500;
	color: var(--ka-ink);
	padding: 7px 6px 7px 0;
	border-top: 1px solid #eee;
	grid-column: 1;
}

.ka-catalog-timeline-cell {
	border-top: 1px solid #eee;
	padding: 4px 2px;
}

.ka-catalog-timeline-bar {
	height: 16px;
	border-radius: 2px;
	background: #f5f0e8;
}

.ka-catalog-timeline-bar.is-on {
	background: var(--ka-orange);
}

/* ---- Sekme paneli ---- */

.ka-catalog-panel {
	border: 1.5px solid var(--ka-ink);
	border-radius: 16px;
	overflow: hidden;
}

.ka-catalog-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.ka-catalog-tab {
	border: none;
	padding: 17px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .06em;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: #fff;
	background: var(--ka-orange);
	border-top: 3px solid transparent;
	transition: background .15s ease, color .15s ease;
}

.ka-catalog-tab.is-active {
	color: var(--ka-ink);
	background: #fff;
	border-top-color: var(--ka-orange);
}

/* ---- Ürün ızgarası + kart ---- */

.ka-catalog-grid {
	padding: 26px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 22px;
}

.ka-catalog-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--ka-muted);
	padding: 20px 0;
}

.ka-catalog-card {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 26px rgba(31, 43, 70, .10);
	padding: 26px 20px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	transition: box-shadow .2s ease;
}

.ka-catalog-card:hover {
	box-shadow: 0 14px 34px rgba(31, 43, 70, .16);
}

.ka-catalog-card-media {
	width: 100%;
	height: 225px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ka-catalog-card-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ka-catalog-card-script {
	font-size: 27px;
	line-height: 1;
	color: var(--ka-ink);
	margin-top: 14px;
	min-height: 22px;
}

.ka-catalog-card-name {
	font-size: 29px;
	line-height: 1.05;
	color: var(--ka-ink);
	text-align: center;
	letter-spacing: .02em;
}

.ka-catalog-card-open {
	margin-top: 16px;
	background: var(--ka-orange);
	color: #fff;
	border: none;
	border-radius: 999px;
	width: 64px;
	height: 34px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 5px 14px rgba(241, 138, 35, .32);
	transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.ka-catalog-card-open:hover,
.ka-catalog-card-open:focus-visible {
	background: var(--ka-orange-hover);
	transform: translateY(-1px);
	box-shadow: 0 7px 18px rgba(241, 138, 35, .42);
}

/* ---- Detay modalı (arşivde overlay, tekilde satır içi) ---- */

.ka-catalog-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(18, 14, 20, .55);
	z-index: 120;
	display: flex;
	align-items: center;
	justify-content: center;
}

body.ka-catalog-modal-open {
	overflow: hidden;
}

.ka-catalog-modal-panel {
	position: relative;
	width: min(900px, 94vw);
	max-height: 88vh;
	overflow-y: auto;
	background: #fff;
	box-shadow: 0 30px 90px rgba(0, 0, 0, .4);
	padding: 44px 46px;
}

.ka-catalog-detail {
	position: relative;
}

.ka-catalog-detail-close {
	display: none;
	position: absolute;
	top: -30px;
	right: -32px;
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	color: var(--ka-ink);
	transition: color .15s ease;
}

.ka-catalog-modal-panel .ka-catalog-detail-close {
	display: block;
}

.ka-catalog-detail-close:hover,
.ka-catalog-detail-close:focus-visible {
	color: var(--ka-orange);
}

.ka-catalog-detail-top {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 42px;
	align-items: start;
}

.ka-catalog-detail-media {
	width: 100%;
	height: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ka-catalog-detail-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ka-catalog-detail-script {
	font-size: 30px;
	line-height: 1;
	color: var(--ka-ink);
	min-height: 26px;
}

.ka-catalog-detail-name {
	font-size: 40px;
	line-height: 1.05;
	color: var(--ka-ink);
	letter-spacing: .02em;
	margin-bottom: 18px;
}

.ka-catalog-detail-label {
	font-weight: 600;
	font-size: 13px;
	letter-spacing: .08em;
	color: var(--ka-orange);
	margin-bottom: 8px;
	text-transform: uppercase;
}

.ka-catalog-detail-label-packaging {
	margin: 18px 0 8px;
}

.ka-catalog-detail-fields {
	font-size: 14.5px;
	line-height: 1.85;
	color: var(--ka-muted);
}

.ka-catalog-detail-fields b {
	color: var(--ka-ink);
}

.ka-catalog-detail-paket {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.ka-catalog-detail-paket-row {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--ka-muted);
	border: 1px solid #ece7dd;
	border-radius: 4px;
	padding: 9px 12px;
}

.ka-catalog-detail-calendar {
	margin-top: 30px;
}

.ka-catalog-cal-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 4px;
}

.ka-catalog-cal-cell {
	text-align: center;
}

.ka-catalog-cal-month {
	font-size: 11px;
	font-weight: 600;
	color: var(--ka-ink);
	margin-bottom: 4px;
}

.ka-catalog-cal-bar {
	height: 18px;
	border-radius: 2px;
	background: #f5f0e8;
}

.ka-catalog-cal-bar.is-on {
	background: var(--ka-orange);
}

/* ---- Tekil ürün sayfası ---- */

.ka-catalog-back-link {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	color: var(--ka-ink);
	margin-bottom: 28px;
	transition: color .15s ease;
}

.ka-catalog-back-link:hover,
.ka-catalog-back-link:focus-visible {
	color: var(--ka-orange);
}

.ka-catalog-single-panel {
	border: 1.5px solid var(--ka-ink);
	border-radius: 16px;
	padding: 44px 46px;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
	.ka-catalog-modal-panel {
		padding: 40px 24px 28px;
	}

	.ka-catalog-detail-close {
		top: 8px;
		right: 10px;
	}

	.ka-catalog-single-panel {
		padding: 32px 22px;
	}
}

@media (max-width: 640px) {
	.ka-catalog-hero {
		height: 260px;
	}

	.ka-catalog {
		padding: 44px 0 70px;
	}

	.ka-catalog-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.ka-catalog-search {
		max-width: none;
	}

	.ka-catalog-timeline-toggle {
		border-radius: 4px;
	}

	.ka-catalog-tabs {
		grid-template-columns: 1fr;
	}

	.ka-catalog-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 14px;
		padding: 18px;
	}

	.ka-catalog-cal-grid {
		grid-template-columns: repeat(6, 1fr);
		row-gap: 10px;
	}
}
