/* Çiçek Kategori - Frontend Styles */

.ck-category-wrap {
	--ck-circle-size: 72px;
	--ck-grid-columns: 6;
	--ck-fade-width: 72px;
	box-sizing: border-box;
	width: 100%;
}

.ck-category-wrap *,
.ck-category-wrap *::before,
.ck-category-wrap *::after {
	box-sizing: border-box;
}

/* ── Carousel Viewport ── */

.ck-carousel-viewport {
	position: relative;
	flex: 1;
	min-width: 0;
	width: 100%;
	overflow: hidden;
}

/* Kenar buzlanma — içeriden dışa: şeffaf → yumuşak buz */
.ck-carousel-viewport::before,
.ck-carousel-viewport::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--ck-fade-width);
	z-index: 2;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.35s ease;
}

.ck-is-scrollable .ck-carousel-viewport::before,
.ck-is-scrollable .ck-carousel-viewport::after {
	opacity: 1;
}

.ck-carousel-viewport::before {
	left: 0;
	background: linear-gradient(
		to right,
		rgba(255, 255, 255, 0.88) 0%,
		rgba(255, 255, 255, 0.55) 18%,
		rgba(255, 255, 255, 0.28) 40%,
		rgba(255, 255, 255, 0.1) 62%,
		rgba(255, 255, 255, 0.03) 82%,
		transparent 100%
	);
	backdrop-filter: blur(10px) saturate(1.15);
	-webkit-backdrop-filter: blur(10px) saturate(1.15);
	mask-image: linear-gradient(
		to right,
		rgba(0, 0, 0, 1) 0%,
		rgba(0, 0, 0, 0.85) 15%,
		rgba(0, 0, 0, 0.55) 35%,
		rgba(0, 0, 0, 0.25) 55%,
		rgba(0, 0, 0, 0.08) 75%,
		transparent 100%
	);
	-webkit-mask-image: linear-gradient(
		to right,
		rgba(0, 0, 0, 1) 0%,
		rgba(0, 0, 0, 0.85) 15%,
		rgba(0, 0, 0, 0.55) 35%,
		rgba(0, 0, 0, 0.25) 55%,
		rgba(0, 0, 0, 0.08) 75%,
		transparent 100%
	);
}

.ck-carousel-viewport::after {
	right: 0;
	background: linear-gradient(
		to left,
		rgba(255, 255, 255, 0.88) 0%,
		rgba(255, 255, 255, 0.55) 18%,
		rgba(255, 255, 255, 0.28) 40%,
		rgba(255, 255, 255, 0.1) 62%,
		rgba(255, 255, 255, 0.03) 82%,
		transparent 100%
	);
	backdrop-filter: blur(10px) saturate(1.15);
	-webkit-backdrop-filter: blur(10px) saturate(1.15);
	mask-image: linear-gradient(
		to left,
		rgba(0, 0, 0, 1) 0%,
		rgba(0, 0, 0, 0.85) 15%,
		rgba(0, 0, 0, 0.55) 35%,
		rgba(0, 0, 0, 0.25) 55%,
		rgba(0, 0, 0, 0.08) 75%,
		transparent 100%
	);
	-webkit-mask-image: linear-gradient(
		to left,
		rgba(0, 0, 0, 1) 0%,
		rgba(0, 0, 0, 0.85) 15%,
		rgba(0, 0, 0, 0.55) 35%,
		rgba(0, 0, 0, 0.25) 55%,
		rgba(0, 0, 0, 0.08) 75%,
		transparent 100%
	);
}

.ck-stories-container,
.ck-grid-carousel {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

/* ── Stories (Dairesel Menü) ── */

.ck-stories-track {
	display: flex;
	flex-wrap: nowrap;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 8px 2px 12px;
	width: 100%;
	-webkit-overflow-scrolling: touch;
	justify-content: flex-start;
}

.ck-stories-track.ck-track-centered {
	justify-content: center;
}

.ck-stories-track::-webkit-scrollbar {
	display: none;
}

.ck-story-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	text-decoration: none;
	color: inherit;
	width: calc(var(--ck-circle-size) + 16px);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.ck-story-item:hover {
	transform: translateY(-2px);
	opacity: 0.85;
}

.ck-story-item:focus-visible {
	outline: 2px solid #833AB4;
	outline-offset: 4px;
	border-radius: 4px;
}

.ck-story-ring {
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--ck-circle-size) + 6px);
	height: calc(var(--ck-circle-size) + 6px);
	border-radius: 50%;
	background: linear-gradient(
		45deg,
		#f09433 0%,
		#e6683c 25%,
		#dc2743 50%,
		#cc2366 75%,
		#bc1888 100%
	);
	padding: 2.5px;
	flex-shrink: 0;
}

.ck-story-image {
	display: block;
	width: var(--ck-circle-size);
	height: var(--ck-circle-size);
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	border: 2.5px solid #fff;
}

.ck-story-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ck-story-label {
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
	color: #222;
	max-width: calc(var(--ck-circle-size) + 20px);
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	word-break: break-word;
}

/* ── Ok butonları (sadece ikon, arka plansız) ── */

.ck-nav-fade {
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--ck-fade-width);
	border: none;
	cursor: pointer;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	color: #555;
	opacity: 1;
	pointer-events: auto;
	transition: opacity 0.35s ease, color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.ck-nav-fade svg {
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}

.ck-nav-prev {
	left: 0;
	justify-content: flex-start;
	padding-left: 8px;
}

.ck-nav-next {
	right: 0;
	justify-content: flex-end;
	padding-right: 8px;
}

.ck-nav-fade:hover {
	color: #222;
}

.ck-nav-fade:active {
	color: #000;
}

.ck-nav-fade:focus-visible {
	outline: 2px solid #833AB4;
	outline-offset: -2px;
	border-radius: 4px;
}

.ck-nav-fade.ck-nav-hidden {
	opacity: 0;
	pointer-events: none;
}

/* Eski nav */
.ck-nav {
	display: none;
}

/* ── Grid Kartları ── */

.ck-grid {
	display: grid;
	grid-template-columns: repeat(var(--ck-grid-columns), 1fr);
	gap: 12px;
	width: 100%;
}

.ck-grid-carousel .ck-grid-track {
	display: flex;
	flex-wrap: nowrap;
	gap: 12px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	width: 100%;
	padding: 4px 2px;
	-webkit-overflow-scrolling: touch;
	justify-content: flex-start;
}

.ck-grid-carousel .ck-grid-track.ck-track-centered {
	justify-content: center;
}

.ck-grid-carousel .ck-grid-track::-webkit-scrollbar {
	display: none;
}

.ck-grid-carousel .ck-grid-item {
	flex-shrink: 0;
	min-width: 140px;
	width: 140px;
	min-height: 100px;
}

.ck-grid-item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100px;
	padding: 20px 16px;
	border-radius: 8px;
	background-color: var(--ck-grid-bg, #E8D5F2);
	text-decoration: none;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ck-grid-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ck-grid-item:focus-visible {
	outline: 2px solid #833AB4;
	outline-offset: 2px;
}

.ck-grid-icon {
	position: absolute;
	right: -10px;
	bottom: -10px;
	width: 80px;
	height: 80px;
	opacity: 0.15;
	color: #fff;
	pointer-events: none;
}

.ck-grid-icon svg {
	width: 100%;
	height: 100%;
}

.ck-grid-label {
	position: relative;
	z-index: 1;
	font-size: 15px;
	font-weight: 700;
	color: #333;
	text-align: center;
	line-height: 1.3;
}

.ck-grid-centered {
	justify-content: center;
	max-width: fit-content;
	margin: 0 auto;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
	.ck-grid:not(.ck-grid-carousel .ck-grid-track) {
		grid-template-columns: repeat(min(var(--ck-grid-columns), 4), 1fr);
	}
}

@media (max-width: 768px) {
	.ck-category-wrap {
		--ck-fade-width: 56px;
	}

	.ck-stories-track,
	.ck-grid-carousel .ck-grid-track {
		gap: 12px;
	}

	.ck-grid:not(.ck-grid-carousel .ck-grid-track) {
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
	}

	.ck-grid-item {
		min-height: 80px;
		padding: 16px 10px;
	}

	.ck-grid-carousel .ck-grid-item {
		min-width: 120px;
		width: 120px;
	}

	.ck-grid-label {
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.ck-category-wrap {
		--ck-fade-width: 48px;
	}

	.ck-grid:not(.ck-grid-carousel .ck-grid-track) {
		grid-template-columns: repeat(2, 1fr);
	}

	.ck-story-label {
		font-size: 10px;
	}

	.ck-grid-carousel .ck-grid-item {
		min-width: 110px;
		width: 110px;
	}

	.ck-nav-fade svg {
		width: 12px;
		height: 12px;
	}
}

/* Koyu arka planlı temalarda buzlanma rengi */
@media (prefers-color-scheme: dark) {
	.ck-category-wrap.ck-on-dark .ck-carousel-viewport::before {
		background: linear-gradient(
			to right,
			rgba(20, 20, 20, 0.9) 0%,
			rgba(20, 20, 20, 0.45) 35%,
			rgba(20, 20, 20, 0.12) 65%,
			transparent 100%
		);
	}

	.ck-category-wrap.ck-on-dark .ck-carousel-viewport::after {
		background: linear-gradient(
			to left,
			rgba(20, 20, 20, 0.9) 0%,
			rgba(20, 20, 20, 0.45) 35%,
			rgba(20, 20, 20, 0.12) 65%,
			transparent 100%
		);
	}

	.ck-category-wrap.ck-on-dark .ck-nav-fade {
		color: #eee;
	}
}
