/*
 * ===========================================================================
 * ÜST KAYAN BANT VE BAŞLIK İLETİŞİM DÜĞMELERİ
 * ===========================================================================
 * - Kayan bant rengini değiştirmek için .soft-site-ticker içindeki background
 *   değerini düzenleyin.
 * - WhatsApp düğmesinin ana rengi #1a9b4f, üzerine gelme rengi #14833f'tir.
 * - Instagram düğmesi kendi marka renklerinden oluşan bir geçiş kullanır.
 * - 700 piksel altındaki kurallar telefon görünümünü düzenler.
 * ===========================================================================
 */

/* Blocksy'de daha önce kullanılan sabit üst duyuru satırını gizle. */
#header [data-row="top"],
header [data-row="top"],
body .ct-header [data-row="top"],
[data-device="desktop"] > [data-row="top"],
[data-device="mobile"] > [data-row="top"] {
	display: none !important;
}

.soft-site-ticker {
	position: relative;
	z-index: 20;
	width: 100%;
	height: 54px;
	overflow: hidden;
	background: #ec7b2f;
	color: #fff;
	user-select: none;
}

/* Üst menüdeki WhatsApp düğmesini marka rengine eşitle. */
#header .ct-button {
	display: inline-flex !important;
	width: 172px;
	min-width: 172px;
	max-width: 172px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding-right: 10px !important;
	padding-left: 10px !important;
	border-color: #1a9b4f !important;
	background: #1a9b4f !important;
	color: #fff !important;
	font-size: 12px !important;
	line-height: 1.15 !important;
	text-align: center;
	white-space: nowrap;
	box-shadow: 0 8px 20px rgba(26, 155, 79, .2) !important;
}

#header .ct-button:hover {
	border-color: #14833f !important;
	background: #14833f !important;
	color: #fff !important;
}

#header .ct-button.soft-header-instagram {
	margin-inline-start: 8px;
	border-color: #d92d78 !important;
	background: linear-gradient(135deg, #f58529, #dd2a7b 52%, #8134af) !important;
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(221, 42, 123, .2) !important;
}

#header .ct-button.soft-header-instagram:hover {
	border-color: #c6266d !important;
	background: linear-gradient(135deg, #ed7823, #cf276f 52%, #73309e) !important;
	color: #fff !important;
}

/* Ürün sayfasındaki iletişim düğmelerini geniş ekranda yan yana göster. */
body.single-product .soft-atolye-showcase-action.soft-contact-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

body.single-product .soft-atolye-showcase-action.soft-contact-pair .soft-atolye-whatsapp-order,
body.single-product .soft-atolye-showcase-action.soft-contact-pair .soft-atolye-instagram-link {
	width: 100%;
	min-height: 58px;
	margin: 0;
	padding: 12px 18px;
	border-radius: 13px;
	font-size: 16px;
	font-weight: 800;
}

body.single-product .soft-atolye-showcase-action.soft-contact-pair .soft-atolye-whatsapp-order {
	background: #1a9b4f;
	box-shadow: 0 8px 22px rgba(26, 155, 79, .2);
}

body.single-product .soft-atolye-showcase-action.soft-contact-pair .soft-atolye-whatsapp-order:not(.is-disabled):hover {
	background: #14833f;
}

body.single-product .soft-atolye-showcase-action.soft-contact-pair .soft-atolye-instagram-link {
	border-color: #d92d78;
	background: linear-gradient(135deg, #f58529, #dd2a7b 52%, #8134af);
	color: #fff !important;
	box-shadow: 0 8px 22px rgba(221, 42, 123, .2);
}

body.single-product .soft-atolye-showcase-action.soft-contact-pair .soft-atolye-instagram-link:hover {
	border-color: #c6266d;
	background: linear-gradient(135deg, #ed7823, #cf276f 52%, #73309e);
}

body.single-product .soft-atolye-showcase-action.soft-contact-pair .soft-atolye-showcase-help,
body.single-product .soft-atolye-showcase-action.soft-contact-pair .soft-atolye-instagram-admin-note {
	grid-column: 1 / -1;
}

.soft-site-ticker-track {
	position: relative;
	z-index: 2;
	display: flex !important;
	width: max-content;
	min-width: max-content;
	padding-top: 7px;
	transform: translate3d(0, 0, 0);
	will-change: transform;
	animation: soft-site-ticker-move 34s linear infinite !important;
	animation-play-state: running !important;
}

.soft-site-ticker-group {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	white-space: nowrap;
}

.soft-site-ticker-item {
	display: inline-flex;
	align-items: center;
	gap: 20px;
	margin-right: 20px;
	font-size: 17px;
	font-style: italic;
	font-weight: 850;
	line-height: 1.2;
	letter-spacing: .045em;
	text-transform: uppercase;
}

.soft-site-ticker-item::after {
	content: "•";
	font-style: normal;
	opacity: .72;
}

.soft-site-ticker-wave {
	position: absolute;
	z-index: 1;
	right: 0;
	bottom: -1px;
	left: 0;
	display: block;
	width: 100%;
	height: 15px;
	pointer-events: none;
}

.soft-site-ticker-wave path {
	fill: #fff;
}

/* Bant, fare üzerine geldiğinde de akmaya devam eder. */
.soft-site-ticker:hover .soft-site-ticker-track {
	animation-play-state: running !important;
}

@keyframes soft-site-ticker-move {
	from {
		transform: translate3d(0, 0, 0);
	}

	to {
		transform: translate3d(-50%, 0, 0);
	}
}

/* MAĞAZA VE ÜRÜN KATEGORİLERİ: Ana sayfadaki dinamik fiyat ve indirim görünümü. */
body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product figure {
	position: relative;
}

/* Ürün ana görseli ve WooCommerce galerisini kart içinde değiştiren ortak alan. */
.soft-card-gallery {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.soft-card-gallery-slide {
	display: block;
	width: 100%;
	height: 100%;
}

.soft-card-gallery-slide[hidden] {
	display: none !important;
}

.soft-card-gallery-arrow {
	position: absolute;
	z-index: 3;
	top: 0 !important;
	bottom: 0 !important;
	display: flex;
	width: 34px;
	height: 34px;
	margin: auto 0 !important;
	align-items: center;
	justify-content: center;
	padding: 0;
	text-align: center;
	border: 1px solid rgba(31, 42, 61, .12);
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #1f2a3d;
	font-size: 0 !important;
	font-weight: 700;
	line-height: 0 !important;
	cursor: pointer;
	transform: none !important;
	box-shadow: 0 4px 14px rgba(31, 42, 61, .14);
	user-select: none;
}

.soft-card-gallery-arrow::before {
	content: "";
	position: absolute;
	width: 7px;
	height: 7px;
	top: 50%;
	left: 50%;
	border-top: 2px solid #1d2a3d;
	border-right: 2px solid #1d2a3d;
	transform-origin: center;
}

.soft-card-gallery-arrow.is-next::before {
	transform: translate(-60%, -50%) rotate(45deg);
}

.soft-card-gallery-arrow.is-prev::before {
	transform: translate(-40%, -50%) rotate(-135deg);
}

.soft-card-gallery-arrow.is-prev {
	left: 8px;
}

.soft-card-gallery-arrow.is-next {
	right: 8px;
}

.soft-card-gallery-arrow:hover,
.soft-card-gallery-arrow:focus-visible {
	border-color: rgba(236, 123, 47, .55);
	color: #ec7b2f;
	outline: none;
}

/* Arşivlerde dikey tasarımları kırpmadan, tutarlı 4:3 kart alanında göster. */
body:is(.tax-product_cat, .post-type-archive-product) .soft-card-gallery-archive {
	aspect-ratio: 4 / 3;
	background: #fff;
}

body:is(.tax-product_cat, .post-type-archive-product) .soft-card-gallery-archive img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: contain !important;
	object-position: center !important;
	transform: none !important;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .onsale {
	display: none !important;
}

body:is(.tax-product_cat, .post-type-archive-product) .soft-category-product-badge {
	position: absolute;
	z-index: 2;
	bottom: 12px;
	inset-inline-start: 0;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 11px;
	border-radius: 0 7px 7px 0;
	background: #ef2f24;
	color: #fff;
	font-size: 10px;
	font-weight: 850;
	letter-spacing: .02em;
	pointer-events: none;
	box-shadow: 0 5px 14px rgba(120, 20, 15, .18);
}

body:is(.tax-product_cat, .post-type-archive-product) .soft-category-discount-icon {
	position: relative;
	display: inline-block;
	width: 12px;
	height: 9px;
	flex: 0 0 12px;
	background: currentColor;
	clip-path: polygon(0 50%, 35% 0, 100% 0, 100% 100%, 35% 100%);
}

body:is(.tax-product_cat, .post-type-archive-product) .soft-category-discount-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 3px;
	width: 2px;
	height: 2px;
	border-radius: 50%;
	background: #ef2f24;
	transform: translateY(-50%);
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .soft-category-product-starting {
	display: flex;
	min-width: 0;
	flex-wrap: nowrap;
	align-items: baseline;
	justify-content: center;
	gap: 2px 5px;
	white-space: nowrap;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .soft-category-product-pricing {
	display: flex;
	width: 100%;
	min-height: 44px;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .soft-category-product-regular {
	display: block;
	margin: 0 0 4px;
	color: #9da4b0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	text-decoration: line-through;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .soft-category-product-starting strong {
	color: #cf8d4d;
	font-size: 17px;
	font-weight: 850;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .soft-category-product-starting small {
	color: #6d7788;
	font-size: 10px;
	font-weight: 500;
	line-height: 1.25;
}

/* Ürün kartlarındaki bütün metin ve butonları ortak hizada tutar. */
body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product {
	align-items: stretch;
	text-align: center;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .woocommerce-loop-product__title {
	display: grid;
	height: 45px;
	min-height: 45px;
	place-items: center;
	overflow: hidden;
	text-align: center;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .woocommerce-loop-product__title a {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* Kart altında kategori adını göstermeye gerek yoktur. */
body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .entry-meta[data-id="default"] {
	display: none !important;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product > .price {
	display: flex;
	width: 100%;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	text-align: center;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .ct-woo-card-actions {
	width: 100%;
	justify-content: center;
	margin-top: auto;
}

body:is(.tax-product_cat, .post-type-archive-product) [data-products] .product .ct-woo-card-actions .button {
	min-width: 160px;
	justify-content: center;
	text-align: center;
}

/* Mağaza ve kategori arşivlerinde masaüstü boşluklarını sıkılaştırır. */
@media (min-width: 1000px) {
	body:is(.tax-product_cat, .post-type-archive-product) .hero-section[data-type="type-2"] > [class*="ct-container"] {
		--container-padding: 18px 0;
		--min-height: 100px;
	}

	body:is(.tax-product_cat, .post-type-archive-product) #main > .ct-container {
		padding-top: 20px !important;
	}

	body:is(.tax-product_cat, .post-type-archive-product) .woo-listing-top {
		align-items: center;
		margin-bottom: 16px;
	}

	body:is(.tax-product_cat, .post-type-archive-product) .woo-listing-top .woocommerce-result-count,
	body:is(.tax-product_cat, .post-type-archive-product) .woo-listing-top .woocommerce-ordering {
		margin-top: 0;
		margin-bottom: 0;
	}
}

/* Tablet ve mobil mağaza/kategori arşivlerinde gereksiz dikey boşlukları azaltır. */
@media (max-width: 999.98px) {
	body:is(.tax-product_cat, .post-type-archive-product) .hero-section[data-type="type-2"] > [class*="ct-container"] {
		--container-padding: 13px 0;
		--min-height: 82px;
	}

	body:is(.tax-product_cat, .post-type-archive-product) #main > .ct-container {
		padding-top: 14px !important;
	}

	body:is(.tax-product_cat, .post-type-archive-product) .woo-listing-top:not(:empty) {
		align-items: center;
		margin-bottom: 12px;
	}

	body:is(.tax-product_cat, .post-type-archive-product) .woo-listing-top .woocommerce-result-count,
	body:is(.tax-product_cat, .post-type-archive-product) .woo-listing-top .woocommerce-ordering {
		margin-top: 0;
		margin-bottom: 0;
	}
}

@media (max-width: 700px) {
	.soft-card-gallery-arrow {
		width: 29px;
		height: 29px;
		font-size: 22px;
	}

	.soft-card-gallery-arrow.is-prev {
		left: 5px;
	}

	.soft-card-gallery-arrow.is-next {
		right: 5px;
	}

	body:is(.tax-product_cat, .post-type-archive-product) .hero-section[data-type="type-2"] > [class*="ct-container"] {
		--container-padding: 9px 0;
		--min-height: 68px;
	}

	body:is(.tax-product_cat, .post-type-archive-product) #main > .ct-container {
		padding-top: 10px !important;
	}

	body:is(.tax-product_cat, .post-type-archive-product) .woo-listing-top:not(:empty) {
		margin-bottom: 10px;
	}

	body.single-product .soft-atolye-showcase-action.soft-contact-pair {
		grid-template-columns: 1fr;
	}

	.soft-site-ticker {
		height: 45px;
	}

	.soft-site-ticker-track {
		padding-top: 6px;
		animation-duration: 25s;
	}

	.soft-site-ticker-item {
		gap: 15px;
		margin-right: 15px;
		font-size: 13px;
		letter-spacing: .035em;
	}

	.soft-site-ticker-wave {
		height: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	/*
	 * Cihazda "hareketi azalt" açık olsa da duyuru tamamen kaybolmasın.
	 * Daha yavaş bir hız kullanarak hareketi yumuşatıyoruz.
	 */
	.soft-site-ticker-track {
		animation: soft-site-ticker-move 48s linear infinite !important;
		animation-play-state: running !important;
	}
}
