/* ============================================================
   SM Hesabım — Hesabım (My Account) ön yüz
   Marka renkleri --smh-brand / --smh-accent inline enjekte edilir.
   Porto vb. temalarla uyumlu; kendi sınıflarımızı kullanır.
   ============================================================ */

:root {
	--smh-brand: #000066;
	--smh-accent: #ff6000;
	--smh-radius: 14px;
	--smh-border: #eceef1;
	--smh-muted: #6b7280;
	/* Primary renginden türetilen tonlar (mavi hardcode yok) */
	--smh-tint: #eef1f9;
	--smh-tint: color-mix(in srgb, var(--smh-brand) 10%, #fff);
	--smh-tint-2: #f5f7fb;
	--smh-tint-2: color-mix(in srgb, var(--smh-brand) 6%, #fff);
	--smh-shadow: color-mix(in srgb, var(--smh-brand) 22%, transparent);
}

/* ---------- Genel yerleşim ---------- */

.woocommerce-account .woocommerce-MyAccount-content {
	background: transparent;
}

.smh-muted { color: var(--smh-muted); }
.smh-ico { vertical-align: middle; }

/* ---------- Sol menü: kart tabanlı + ikonlar ---------- */

.woocommerce-account .woocommerce-MyAccount-navigation {
	background: #fff;
	border: 1px solid var(--smh-border);
	border-radius: var(--smh-radius);
	padding: 14px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	border: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	padding: 11px 14px !important;
	border-radius: 10px;
	text-decoration: none;
	color: #1f2937 !important;
	font-weight: 500;
	line-height: 1.2;
	border: 1px solid transparent;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	background: var(--smh-tint-2);
	color: var(--smh-brand) !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	background: var(--smh-brand) !important;
	color: #fff !important;
	box-shadow: 0 6px 16px var(--smh-shadow);
}

/* Sol menü başlığı (Porto'nun "Hesabım" h5'i) — gizli; ilk menü öğesi zaten "Hesabım". */
.woocommerce-account .woocommerce-MyAccount-navigation > h5,
.woocommerce-account .woocommerce-MyAccount-navigation .widget-title {
	display: none !important;
}

/* Menü ikonları — font bağımsız SVG mask (Dashicons ön yüzde yüklü olmayabilir).
   Her öğe kendi --smh-ic değişkenini verir; tanımlı değilse chevron kullanılır. */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
	content: "" !important;
	display: inline-block !important;
	flex: 0 0 auto !important;
	width: 20px !important;
	height: 20px !important;
	margin: 0 !important;
	vertical-align: middle;
	background: var(--smh-brand);
	-webkit-mask: var(--smh-ic, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>")) center / 20px 20px no-repeat;
	mask: var(--smh-ic, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>")) center / 20px 20px no-repeat;
}
/* Aktif öğede ikon beyaz */
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a::before {
	background: #fff;
}

/* Pano — grid */
.smh-nav--dashboard a { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='7' height='7' rx='1.5'/><rect x='14' y='3' width='7' height='7' rx='1.5'/><rect x='14' y='14' width='7' height='7' rx='1.5'/><rect x='3' y='14' width='7' height='7' rx='1.5'/></svg>"); }

/* Siparişler — alışveriş çantası */
.smh-nav--orders a { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/><line x1='3' y1='6' x2='21' y2='6'/><path d='M16 10a4 4 0 0 1-8 0'/></svg>"); }

/* Kargo Takibim — kamyon */
.smh-nav--kargo-takibim a { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='1' y='3' width='15' height='13' rx='1'/><path d='M16 8h4l3 3v5h-7z'/><circle cx='5.5' cy='18.5' r='2.5'/><circle cx='18.5' cy='18.5' r='2.5'/></svg>"); }

/* İade Taleplerim — geri dönüş oku */
.smh-nav--iade-talebi a,
.woocommerce-account .woocommerce-MyAccount-navigation li a[href*="iade-talebi"] { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 4 1 10 7 10'/><path d='M3.51 15a9 9 0 1 0 2.13-9.36L1 10'/></svg>"); }

/* İndirmeler — indirme oku */
.smh-nav--downloads a { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><polyline points='7 10 12 15 17 10'/><line x1='12' y1='15' x2='12' y2='3'/></svg>"); }

/* Adresler — konum iğnesi */
.smh-nav--edit-address a { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); }

/* Hesap detayları — kullanıcı */
.smh-nav--edit-account a { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>"); }

/* Favoriler / Wishlist — kalp */
.smh-nav--favoriler a,
.smh-nav--wishlist a,
.woocommerce-account .woocommerce-MyAccount-navigation li a[href*="wishlist"] { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/></svg>"); }

/* Oturumu kapat — çıkış */
.smh-nav--customer-logout a,
.woocommerce-account .woocommerce-MyAccount-navigation li a[href*="customer-logout"] { --smh-ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/><polyline points='16 17 21 12 16 7'/><line x1='21' y1='12' x2='9' y2='12'/></svg>"); }

/* ---------- Panel (dashboard) ---------- */

.smh-dash { display: flex; flex-direction: column; gap: 18px; }

.smh-hero {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 22px;
	border-radius: var(--smh-radius);
	background: var(--smh-brand);
	background: linear-gradient(120deg, var(--smh-brand) 0%, color-mix(in srgb, var(--smh-brand) 78%, #4a6cff) 100%);
	color: #fff;
}

.smh-hero__avatar {
	flex: 0 0 auto;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .5px;
}

.smh-hero__text { flex: 1 1 auto; }
.smh-hero .smh-hero__title { margin: 0; color: #fff !important; font-size: 1.35em; font-weight: 700; }
.smh-hero .smh-hero__sub { margin: 4px 0 0; color: rgba(255, 255, 255, .85) !important; font-size: .92em; }

.smh-hero__logout {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	text-decoration: none;
	font-size: .85em;
	padding: 7px 12px;
	border-radius: 9px;
	border: 1px solid rgba(255, 255, 255, .35);
}
.smh-hero__logout:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* Kartlar */
.smh-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
}

.smh-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--smh-border);
	text-decoration: none;
	color: #1f2937;
	transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.smh-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .07);
	border-color: #d9dee6;
	color: var(--smh-brand);
}

.smh-card__icon {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 11px;
	background: var(--smh-tint);
	color: var(--smh-brand);
	display: flex;
	align-items: center;
	justify-content: center;
}
.smh-card__icon .dashicons { font-size: 22px; width: 22px; height: 22px; }
.smh-card__label { flex: 1 1 auto; font-weight: 600; }
.smh-card__arrow { color: #c3c9d4; }

/* Son sipariş */
.smh-lastorder {
	background: #fff;
	border: 1px solid var(--smh-border);
	border-radius: 12px;
	padding: 16px 18px;
}
.smh-lastorder__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.smh-lastorder__title { font-weight: 700; color: #111827; }
.smh-lastorder__view { text-decoration: none; color: var(--smh-brand); font-weight: 600; font-size: .9em; }
.smh-lastorder__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.smh-lastorder__no { font-weight: 700; color: var(--smh-brand); }
.smh-lastorder__date { color: var(--smh-muted); font-size: .9em; }
.smh-lastorder__total { margin-left: auto; font-weight: 700; }

.smh-lastorder__status {
	font-size: .8em;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 20px;
	background: #eef0f2;
	color: #50575e;
}
.smh-status--processing { background: #e6f4ea; color: #1a7f37; }
.smh-status--on-hold    { background: #fcf3e3; color: #a86308; }
.smh-status--completed  { background: var(--smh-tint); color: var(--smh-brand); }
.smh-status--sm-shipped  { background: var(--smh-tint); color: var(--smh-brand); }
.smh-status--cancelled,
.smh-status--refunded,
.smh-status--failed     { background: #fce8e6; color: #b32d2e; }

/* ---------- Butonlar ---------- */
.smh-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 16px;
	border-radius: 10px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1;
	border: 1px solid transparent;
	margin-top: 12px;
}
.smh-btn--primary { background: var(--smh-brand); color: #fff; }
.smh-btn--primary:hover { color: #fff; filter: brightness(1.08); }
.smh-btn--ghost { background: #fff; color: var(--smh-brand); border-color: #d9dee6; }
.smh-btn--ghost:hover { background: var(--smh-tint-2); color: var(--smh-brand); }

/* ---------- Kargo Takibim sekmesi ---------- */
.smh-tab-title { margin: 0 0 14px; font-size: 1.2em; font-weight: 700; }
.smh-cargo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.smh-cargo-card {
	background: #fff;
	border: 1px solid var(--smh-border);
	border-radius: 12px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.smh-cargo-card__head { display: flex; justify-content: space-between; align-items: center; }
.smh-cargo-no { font-weight: 700; color: var(--smh-brand); text-decoration: none; }
.smh-cargo-status { font-size: .78em; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: var(--smh-tint); color: var(--smh-brand); }
.smh-cargo-card__body { display: flex; flex-direction: column; gap: 3px; font-size: .9em; color: #374151; }
.smh-cargo-courier img { max-height: 18px; width: auto; vertical-align: middle; }

.smh-track-link { text-decoration: none; color: var(--smh-brand); font-weight: 600; }

.smh-empty {
	text-align: center;
	padding: 40px 16px;
	color: var(--smh-muted);
	background: #fafbfc;
	border: 1px dashed #dfe3e8;
	border-radius: 12px;
}
.smh-empty .smh-ico--lg { opacity: .5; margin-bottom: 6px; }

/* ---------- Mobil (yalnızca ≤768px; masaüstü görünümü etkilenmez) ---------- */
@media (max-width: 768px) {
	.smh-dash { gap: 12px; }

	/* Karşılama kutusu — kompakt: küçük avatar/başlık, açıklama gizli */
	.smh-hero {
		flex-wrap: nowrap;
		align-items: center;
		gap: 12px;
		padding: 14px 16px;
	}
	.smh-hero__avatar { width: 40px; height: 40px; font-size: 15px; }
	.smh-hero .smh-hero__title { font-size: 1.08em; }
	.smh-hero .smh-hero__sub { display: none; } /* uzun açıklama mobilde gizli */
	.smh-hero__logout {
		margin-left: auto;
		padding: 7px 10px;
		border-radius: 8px;
		font-size: .82em;
	}
	.smh-hero__logout .dashicons { display: none; } /* ön yüzde boş çıkabilen ikonu gizle, "Çıkış" metni kalsın */

	/* Sol menü — tek satır, yatay kaydırılabilir sade çipler (karmaşayı önler) */
	.woocommerce-account .woocommerce-MyAccount-navigation {
		padding: 8px;
		border-radius: 12px;
	}
	.woocommerce-account .woocommerce-MyAccount-navigation ul {
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 6px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}
	.woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
	.woocommerce-account .woocommerce-MyAccount-navigation li { flex: 0 0 auto; }
	.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
		padding: 8px 12px !important;
		gap: 7px !important;
		font-size: .85em;
		white-space: nowrap;
		border: 1px solid var(--smh-border);
		background: #fff;
	}
	.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
		width: 17px !important;
		height: 17px !important;
		-webkit-mask-size: 17px 17px;
		mask-size: 17px 17px;
	}
	.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
		border-color: var(--smh-brand);
	}

	.smh-cards { grid-template-columns: 1fr 1fr; }
	.smh-lastorder__total { margin-left: 0; width: 100%; }
}

@media (max-width: 420px) {
	.smh-cards { grid-template-columns: 1fr; }
}

/* ---------- İade Talebi ---------- */
.smh-note {
	padding: 10px 14px;
	border-radius: 10px;
	margin-bottom: 14px;
	font-size: 14px;
}
.smh-note--ok  { background: #edf7ee; color: #1a7f37; }
.smh-note--err { background: #fdf6f6; color: #b32d2e; border: 1px solid #f6dede; }

.smh-return--requested { background: #fcf3e3; color: #a86308; }
.smh-return--approved  { background: #e6f4ea; color: #1a7f37; }
.smh-return--rejected  { background: #fce8e6; color: #b32d2e; }
.smh-return--completed { background: #e7edf6; color: #2a4b8d; }

.smh-return-details summary { display: inline-flex; }
.smh-return-details summary::-webkit-details-marker { display: none; }
.smh-return-details[open] summary { margin-bottom: 4px; }

/* ============================================================
   Genel cila — tüm Hesabım alt sayfaları (primary color odaklı)
   Standart WC/Porto işaretlemesine dokunmadan, içerik alanı içinde.
   ============================================================ */

/* Başlıklar */
.woocommerce-account .woocommerce-MyAccount-content h2,
.woocommerce-account .woocommerce-MyAccount-content h3 {
	color: #111827;
}

/* Form alanları — odaklanınca primary vurgu */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-input-wrapper input:focus,
.woocommerce-account .woocommerce-MyAccount-content input.input-text:focus,
.woocommerce-account .woocommerce-MyAccount-content textarea:focus,
.woocommerce-account .woocommerce-MyAccount-content select:focus {
	border-color: var(--smh-brand);
	box-shadow: 0 0 0 3px var(--smh-shadow);
	outline: none;
}

/* Zorunlu alan yıldızı */
.woocommerce-account .woocommerce-MyAccount-content .required { color: var(--smh-accent); border: 0; }

/* Adres kutuları — kart görünümü */
.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
	background: #fff;
	border: 1px solid var(--smh-border);
	border-radius: 12px;
	padding: 18px 20px;
}
.woocommerce-account .woocommerce-Address-title h3 { margin: 0; }
.woocommerce-account .woocommerce-Address-title .edit {
	text-decoration: none;
	color: var(--smh-brand);
	font-weight: 600;
	font-size: .85em;
}
.woocommerce-account .woocommerce-Address-title .edit:hover { text-decoration: underline; }

/* Sipariş / genel tablolar — başlık ve satır linkleri */
.woocommerce-account .woocommerce-MyAccount-content table.shop_table thead th {
	background: var(--smh-tint-2);
	color: var(--smh-brand);
	border-bottom: 2px solid var(--smh-border);
}
.woocommerce-account .woocommerce-MyAccount-content table.shop_table a { color: var(--smh-brand); }
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-number a { font-weight: 700; }

/* "Görüntüle" vb. tablo butonları — primary */
.woocommerce-account .woocommerce-MyAccount-content table.shop_table .button {
	background: var(--smh-brand);
	border-color: var(--smh-brand);
	color: #fff;
}
.woocommerce-account .woocommerce-MyAccount-content table.shop_table .button:hover { filter: brightness(1.08); }

/* Bilgi/uyarı mesajları — primary sol şerit */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info {
	border-top-color: var(--smh-brand);
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message::before,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info::before {
	color: var(--smh-brand);
}
