/* ==================================================================
   Ana sayfa ürün kartları — yeni görünüm
   index.php içindeki .ot-products listesi ve onur_urun_karti()
   ================================================================== */

:root {
	--ot-accent: #c6323a;      /* temanın kırmızısı */
	--ot-ink: #1c1c1e;
	--ot-muted: #5e5e5e;
	--ot-line: #e6e3dc;
	--ot-media-bg: #f3f1ec;
	--ot-radius: 14px;
}

.ot-products {
	list-style: none;
	margin: 0 0 40px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.ot-products li.ot-card {
	/* eski .products-4 li kurallarını etkisiz bırak */
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
	list-style: none;

	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--ot-line);
	border-radius: var(--ot-radius);
	overflow: hidden;
	font-family: "DM Sans", "Open Sans", Arial, sans-serif;
	transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ot-products li.ot-card:hover {
	border-color: var(--ot-ink);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
}

/* Görsel alanı */
.ot-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--ot-media-bg);
	overflow: hidden;
}

.ot-card__media img,
.ot-card__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .35s ease;
}

.ot-products li.ot-card:hover .ot-card__img {
	transform: scale(1.04);
}

/* Eski tarayıcılar için (aspect-ratio desteği yoksa) */
@supports not (aspect-ratio: 4 / 3) {
	.ot-card__media { height: 0; padding-top: 75%; }
	.ot-card__media img { position: absolute; inset: 0; }
}

/* Kategori etiketi */
.ot-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	padding: 5px 9px;
	border-radius: 999px;
	background: #fff;
	color: #3a3a3a;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .08em;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

/* Alt bilgi satırı */
.ot-card__body {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px;
	padding: 16px 18px 18px;
	color: var(--ot-ink);
	flex: 1 1 auto;
}

.ot-card__link,
.ot-card__link:hover,
.ot-card__link:focus {
	color: var(--ot-ink);
	text-decoration: none;
	min-width: 0;
}

/* Alt satırın tamamı ürün sayfasına gider (WhatsApp butonu hariç) */
.ot-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ot-card__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ot-card__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.ot-card__meta {
	font-size: 13px;
	line-height: 1.35;
	color: var(--ot-muted);
}

.ot-card__arrow {
	position: relative;
	pointer-events: none;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	border: 1px solid var(--ot-line);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ot-ink);
	transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.ot-products li.ot-card:hover .ot-card__arrow {
	background: var(--ot-accent);
	border-color: var(--ot-accent);
	color: #fff;
}

/* Klavye ile gezinme */
.ot-card__media:focus-visible,
.ot-card__link:focus-visible {
	outline: 2px solid var(--ot-accent);
	outline-offset: -2px;
}

/* ------------------------------------------------------------------
   WhatsApp butonu (kategori kartları, ürün galerisi, Diğer Modeller)
   ------------------------------------------------------------------ */
.ot-wa {
	position: relative;
	z-index: 2;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: #25D366;          /* WhatsApp kurumsal yeşil */
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: 0 2px 6px rgba(37, 211, 102, .35);
	transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ot-wa:hover,
.ot-wa:focus {
	background: #1EBE5A;
	color: #fff;
	transform: scale(1.06);
	box-shadow: 0 4px 12px rgba(37, 211, 102, .45);
}

.ot-wa:focus-visible {
	outline: 2px solid #128C7E;
	outline-offset: 2px;
}

.ot-wa svg {
	display: block;
	width: 20px;
	height: 20px;
}

/* Galeri altyazısı: model kodu solda, WhatsApp sağda */
.product-main .gallery .gallery-caption.ot-cap--wa {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 10px;
	padding-bottom: 10px;
}

.product-main .gallery .ot-cap-text {
	min-width: 0;
}

/* ------------------------------------------------------------------
   Kategori sayfası: boş durum
   ------------------------------------------------------------------ */
.ot-empty {
	padding: 40px 0;
	color: var(--ot-muted);
	font-family: "DM Sans", "Open Sans", Arial, sans-serif;
}

/* ------------------------------------------------------------------
   Ürün sayfası (single.php)
   ------------------------------------------------------------------ */
/* Ürün sayfasında yan sütun olmadığı için içerik tam genişlik */
.main-content.product-main {
	width: 100%;
	float: none;
	margin: 0;
}

/* WordPress klasik galerisi → kart görünümü */
.product-main .gallery {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	width: 100%;
	margin: 0 0 40px !important;
}

.product-main .gallery br {
	display: none;
}

.product-main .gallery .gallery-item {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--ot-line);
	border-radius: var(--ot-radius);
	overflow: hidden;
	line-height: normal;
	text-align: left !important;
	font-family: "DM Sans", "Open Sans", Arial, sans-serif;
	transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.product-main .gallery .gallery-item:hover {
	border-color: var(--ot-ink);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
}

.product-main .gallery .gallery-icon {
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	background: var(--ot-media-bg) !important;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.product-main .gallery .gallery-icon a {
	display: block;
	width: 100%;
	height: 100%;
}

.product-main .gallery .gallery-icon img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	border: 0 !important;
	transition: transform .35s ease;
}

.product-main .gallery .gallery-item:hover .gallery-icon img {
	transform: scale(1.04);
}

.product-main .gallery .gallery-caption {
	margin: 0;
	padding: 14px 18px 16px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ot-ink);
	text-align: left;
}

.product-main .gallery .gallery-caption:empty {
	display: none;
}

/* Blok düzenleyici (Gutenberg) galerisi */
.product-main .wp-block-gallery .wp-block-image {
	border: 1px solid var(--ot-line);
	border-radius: var(--ot-radius);
	overflow: hidden;
	background: var(--ot-media-bg);
}

/* Diğer Modeller bölümü */
.ot-related {
	margin-top: 20px;
	margin-bottom: 40px;
}

.ot-related__head {
	position: relative;
}

.ot-related__all {
	position: absolute;
	right: 0;
	top: 4px;
	font-family: "DM Sans", "Open Sans", Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: var(--ot-accent);
}

.ot-related__all:hover {
	color: var(--ot-ink);
}

/* Duyarlı yerleşim */
@media only screen and (max-width: 830px) {
	.ot-products,
	.product-main .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media only screen and (max-width: 640px) {
	.ot-products,
	.product-main .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.product-main .gallery .gallery-caption { padding: 12px; font-size: 14px; }
	.ot-card__body { padding: 12px 12px 14px; gap: 8px; }
	.ot-card__title { font-size: 14px; }
	.ot-card__meta { font-size: 12px; }
	.ot-card__arrow { width: 30px; height: 30px; }
	.ot-wa { width: 36px; height: 36px; }
	.ot-wa svg { width: 18px; height: 18px; }
	.ot-card__badge { top: 8px; left: 8px; font-size: 10px; padding: 4px 7px; }
}

@media (prefers-reduced-motion: reduce) {
	.ot-products li.ot-card,
	.ot-card__img,
	.product-main .gallery .gallery-item,
	.product-main .gallery .gallery-icon img,
	.ot-wa { transition: none; }
	.ot-products li.ot-card:hover,
	.ot-products li.ot-card:hover .ot-card__img,
	.product-main .gallery .gallery-item:hover,
	.product-main .gallery .gallery-item:hover .gallery-icon img { transform: none; }
}
