/* ============================================================
   SM Product Options — Ürün sayfası (frontend)
   Sade, ürün temasına uyumlu.
   ============================================================ */

/* Tema "Sepete Ekle" formunu flex ile diziyorsa (çoğu tema), varsayılan
   flex-wrap:nowrap yüzünden seçenekler adet/buton ile aynı satıra sıkışır.
   Formu sarmaya (wrap) zorlayarak seçenekleri kendi satırına indiriyoruz.
   flex-wrap, flex olmayan formları etkilemez; güvenlidir. */
form.cart {
	flex-wrap: wrap;
}

.sm-po-options {
	margin: 0 0 1.25em;
	padding: 1.1em 1.2em;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	background: #fafafa;
	/* Tam genişlik; yanına tema öğeleri (adet/buton) gelmesin. */
	width: 100%;
	float: none;
	clear: both;
	box-sizing: border-box;
	/* Flex formda kendi satırını tümüyle kapla. */
	flex: 0 0 100%;
}

/* Her alan kendi satırında, tam genişlik. */
.sm-po-field {
	display: block;
	width: 100%;
	float: none;
	clear: both;
	margin-bottom: 1em;
}

.sm-po-field:last-of-type {
	margin-bottom: 0;
}

.sm-po-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.sm-po-required {
	color: #d63638;
}

.sm-po-desc {
	display: block;
	font-size: 0.85em;
	color: #666;
	margin-bottom: 0.4em;
}

.sm-po-input,
textarea.sm-po-input,
select.sm-po-input {
	width: 100%;
	max-width: 440px;
	box-sizing: border-box;
}

textarea.sm-po-input {
	min-height: 80px;
}

/* ---------- Radyo / Checkbox ---------- */

.sm-po-choice-group {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
}

.sm-po-choice {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	font-weight: normal;
	cursor: pointer;
}

/* ---------- Resimli seçim kutucukları (radio/checkbox + resim) ---------- */

.sm-po-imgtile-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
}

.sm-po-imgtile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 96px;
	cursor: pointer;
	border: 2px solid #dcdcde;
	border-radius: 8px;
	padding: 6px;
	text-align: center;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
	background: #fff;
}

.sm-po-imgtile input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sm-po-imgtile__img {
	width: 100%;
	height: 80px;
	border-radius: 5px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	margin-bottom: 5px;
}

.sm-po-imgtile__img--empty {
	background: #f2f2f2;
}

.sm-po-imgtile__label {
	font-size: 0.82em;
	line-height: 1.25;
	font-weight: normal;
	color: #333;
}

.sm-po-imgtile input:checked ~ .sm-po-imgtile__label {
	font-weight: 600;
}

.sm-po-imgtile:has( input:checked ) {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba( 34, 113, 177, 0.2 );
}

/* :has desteklemeyen tarayıcılar için JS ile eklenen sınıf yedeği. */
.sm-po-imgtile.is-selected {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba( 34, 113, 177, 0.2 );
}

/* ---------- Renk / Görsel kutucuk ---------- */

.sm-po-swatch-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.sm-po-swatch {
	cursor: pointer;
	position: relative;
	display: inline-block;
}

.sm-po-swatch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sm-po-swatch-box {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 6px;
	border: 2px solid #d5d5d5;
	border-radius: 6px;
	background-size: cover;
	background-position: center;
	font-size: 0.8em;
	color: #333;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.sm-po-swatch input:checked + .sm-po-swatch-box {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba( 34, 113, 177, 0.25 );
}

.sm-po-swatch input:focus + .sm-po-swatch-box {
	border-color: #2271b1;
}

/* ---------- Tasarım şablonu indirme ---------- */

.sm-po-template-download__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

.sm-po-template-download__icon {
	font-size: 0.9em;
}

/* ---------- Görsel / bilgi tipleri ---------- */

.sm-po-heading {
	margin: 0.2em 0 0.3em;
	font-size: 1.05em;
}

.sm-po-content {
	font-size: 0.9em;
	color: #555;
}

.sm-po-content p {
	margin: 0 0 0.5em;
}

.sm-po-divider {
	border: none;
	border-top: 1px solid #e0e0e0;
	margin: 0.5em 0;
}

/* ---------- Ek ücret satırı ---------- */

.sm-po-price-extra-row {
	margin-top: 0.75em;
	padding-top: 0.6em;
	border-top: 1px solid #e6e6e6;
	font-size: 0.95em;
}

.sm-po-price-extra-label {
	font-weight: 600;
}

.sm-po-price-extra {
	font-weight: 700;
}
