/**
 * KUK Homepage Category Tabs — [kuk_category_tabs]
 *
 * Tab navigation UI. The product grid/cards inherit from archive-product.css
 * (.kuk-products-section). This file only styles the tab bar + panels.
 *
 * Palette: primary #205d2f / hover #174a24 / border #e8e8e8
 * Mobile-first, responsive.
 *
 * @package Avada-Child-Theme
 * @since 2.3.0
 */

.kuk-cat-tabs {
	max-width: 1660px;
	margin: 0 auto;
	padding: 0 50px;
	box-sizing: border-box;
}

/* =========================================================
 * TAB NAV
 * ========================================================= */
.kuk-cat-tabs__nav {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin-bottom: 24px;
	border-bottom: 1px solid #e8e8e8;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.kuk-cat-tabs__nav::-webkit-scrollbar {
	display: none;
}

.kuk-cat-tabs__tab {
	flex: 1 1 0;
	appearance: none;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	padding: 12px 18px;
	font-size: 15px;
	font-weight: 600;
	color: #777;
	cursor: pointer;
	white-space: nowrap;
	text-align: center;
	transition: color 0.2s, border-color 0.2s;
}
.kuk-cat-tabs__tab:hover {
	color: #205d2f;
}
.kuk-cat-tabs__tab.is-active {
	color: #205d2f;
	border-bottom-color: #205d2f;
}
.kuk-cat-tabs__tab:focus-visible {
	outline: 2px solid #205d2f;
	outline-offset: 2px;
	border-radius: 4px;
}

/* =========================================================
 * PANELS
 * ========================================================= */
.kuk-cat-tabs__panel[hidden] {
	display: none;
}
.kuk-cat-tabs__panel {
	animation: kukTabsFade 0.25s ease;
}
@keyframes kukTabsFade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
	.kuk-cat-tabs__panel { animation: none; }
}

/* The grid inside a panel must not re-apply the section side padding
   (the .kuk-cat-tabs wrapper already provides it). */
.kuk-cat-tabs__grid {
	padding: 0 !important;
	max-width: none !important;
}

.kuk-cat-tabs__empty {
	padding: 40px 0;
	text-align: center;
	color: #666;
}

/* =========================================================
 * "TÜMÜNÜ GÖR" BUTTON
 * ========================================================= */
.kuk-cat-tabs__more {
	text-align: center;
	margin-top: 28px;
}
.kuk-cat-tabs__more-btn {
	display: inline-block;
	padding: 12px 32px;
	font-size: 14px;
	font-weight: 600;
	color: #205d2f;
	background: #fff;
	border: 1px solid #205d2f;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}
.kuk-cat-tabs__more-btn:hover {
	background: #205d2f;
	color: #fff;
}

/* =========================================================
 * RESPONSIVE
 * ========================================================= */
.kuk-cat-tabs {
	width: 100%;
	overflow: hidden;
}

@media (max-width: 768px) {
	.kuk-cat-tabs {
		padding: 0 16px;
	}

	/* Tabs become a 2×2 grid of chips so all are visible (no scroll) */
	.kuk-cat-tabs__nav {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
		border-bottom: none;
		margin-bottom: 20px;
		overflow: visible;
	}
	.kuk-cat-tabs__tab {
		flex: none;
		margin-bottom: 0;
		padding: 11px 10px;
		font-size: 13px;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		background: #fff;
		white-space: normal;
		line-height: 1.3;
	}
	.kuk-cat-tabs__tab.is-active {
		color: #fff;
		background: #205d2f;
		border-color: #205d2f;
	}

	/* Force exactly 2 columns on mobile, constrained to viewport */
	.kuk-cat-tabs .kuk-cat-tabs__grid ul.products,
	.kuk-cat-tabs .kuk-cat-tabs__grid ul.products.columns-5 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px !important;
	}
	.kuk-cat-tabs .kuk-cat-tabs__grid ul.products li.product {
		min-width: 0 !important;
		max-width: 100% !important;
		overflow: hidden !important;
	}
}
@media (max-width: 600px) {
	.kuk-cat-tabs__more-btn {
		width: 100%;
		padding: 13px 0;
	}
}
