/* =============================================================================
 * i18n.css — Çok dillilik katmanı
 *   • 11 dil için yazı tipi yığını (Latin, Kiril, Arapça, Çince)
 *   • Header dil değiştiricisi (masaüstü + mobil)
 *   • Dil seçici açılır listesi
 *   • Erişilebilirlik (focus-visible, skip-link)
 *   • Form durum mesajları
 * premium.css DOSYASINA DOKUNULMAZ — bu dosya onun üzerine eklenir.
 * ========================================================================== */

/* ── 1. Yazı tipi yığınları ──────────────────────────────────────────────
 * Google Fonts her aileyi unicode-range ile alt kümeye böler; tarayıcı sadece
 * o dilin gerektirdiği alt kümeyi indirir. Tek <link> yeterlidir.          */
:root {
  --font-display: 'DM Sans', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

/* Arapça / Farsça: satır aralığı ve harf aralığı Latin'e göre farklıdır */
html[data-lang="ar"] body,
html[data-lang="ar"] .display-xl,
html[data-lang="ar"] .display-lg,
html[data-lang="ar"] .display-md {
  line-height: 1.85;
  letter-spacing: normal;
}
html[data-lang="ar"] .display-xl { line-height: 1.45; }
html[data-lang="ar"] .display-lg { line-height: 1.5; }
html[data-lang="ar"] .display-md { line-height: 1.55; }

/* Çince: kelime aralığı gerekir, negatif harf aralığı bozar */
html[data-lang="zh"] body,
html[data-lang="zh"] .display-xl,
html[data-lang="zh"] .display-lg,
html[data-lang="zh"] .display-md {
  line-height: 1.8;
  letter-spacing: 0.01em;
}
html[data-lang="zh"] .display-xl,
html[data-lang="zh"] .display-lg,
html[data-lang="zh"] .display-md { letter-spacing: 0.02em; }

/* Kiril (ru, bg) */
html[data-lang="ru"] body,
html[data-lang="bg"] body { line-height: 1.72; }

/* Uzun Almanca/Rusça başlıkların taşmasını engelle */
html[data-lang="de"] .display-lg,
html[data-lang="ru"] .display-lg { line-height: 1.18; }

/* ── 2. Skip link ───────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 12px;
  z-index: 10050;
  padding: 12px 20px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }

/* ── 3. Dil değiştirici (header) ───────────────────────────────────────── */
.lang-switch {
  position: relative;
  display: flex;
  align-items: center;
  margin-inline: 8px;
  flex-shrink: 0;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.lang-switch-btn svg { flex-shrink: 0; }

/* Dil rozeti (küre ikonu yerine 2-3 harfli kısaltma) */
.lang-switch-current {
  display: inline-block;
  min-width: 2.4em;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.lang-switch-caret { transition: transform var(--transition); }
.lang-switch.open .lang-switch-caret { transform: rotate(180deg); }

/* Transparan header durumu (hero üzerinde) */
.site-header:not(.scrolled) .lang-switch-btn {
  color: rgba(248, 250, 252, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}
.site-header:not(.scrolled) .lang-switch-btn:hover,
.site-header:not(.scrolled) .lang-switch.open .lang-switch-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

/* Kaydırılmış (açık zemin) header durumu */
.site-header.scrolled .lang-switch-btn {
  color: var(--color-text-secondary);
  background: var(--color-bg-elevated);
  border-color: var(--color-border-strong);
}
.site-header.scrolled .lang-switch-btn:hover,
.site-header.scrolled .lang-switch.open .lang-switch-btn {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(26, 95, 180, 0.06);
}

.lang-switch-btn:focus-visible,
.lang-option:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Mobilde yalnızca dil kısaltması */
@media (max-width: 1023px) {
  .lang-switch-btn { padding: 0 10px; gap: 4px; }
  .lang-switch-current { min-width: 0; font-size: 0.8125rem; }
  .lang-switch-caret { display: none; }
  .lang-switch { margin-inline: 2px; }
}

/* ── 3b. Header sağ aksiyon grubu (dil + CTA + menü butonu) ───────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (min-width: 1024px) {
  .header-actions { gap: 10px; }
}

/* Mobil menü: "Ürünler" başlığı + tam genişlik teklif butonu */
.mobile-menu-label {
  display: block;
  padding: 14px 0 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  pointer-events: none;
}
.mobile-quote { display: block; width: 100%; margin-top: 18px; justify-content: center; }

/* ── 4. Dil listesi ────────────────────────────────────────────────────── */
.lang-switch-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: 232px;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.lang-switch.open .lang-switch-menu,
.lang-switch-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.875rem;
  line-height: 1.35;
  transition: background var(--transition), color var(--transition);
}
.lang-option:hover { background: var(--color-bg-muted); color: var(--color-primary); }
.lang-option[aria-current="true"] {
  background: rgba(26, 95, 180, 0.1);
  color: var(--color-primary);
  font-weight: 600;
}
.lang-native { font-weight: 500; }
.lang-option[aria-current="true"] .lang-native { font-weight: 700; }
.lang-code {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: 5px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.lang-option[aria-current="true"] .lang-code { color: var(--color-primary); border-color: currentColor; }
.lang-option[lang="ar"] .lang-native { font-family: 'Noto Sans Arabic', var(--font-body); }
.lang-option[lang="zh-Hans"] .lang-native { font-family: 'Noto Sans SC', var(--font-body); }

/* Mobil menü içindeki dil bloğu */
.mobile-lang {
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mobile-lang-title {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.55);
  margin-bottom: 12px;
}
.mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 6px;
}
.mobile-lang-grid .lang-option {
  justify-content: center;
  padding: 9px 8px;
  font-size: 0.8125rem;
  color: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}
.mobile-lang-grid .lang-option:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.mobile-lang-grid .lang-option[aria-current="true"] {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}
.mobile-lang-grid .lang-code { display: none; }

/* ── 5. Form durum mesajları ───────────────────────────────────────────── */
.form-status {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.55;
  font-weight: 500;
}
.form-status.show { display: block; }
.form-status.success {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.35);
  color: #15803d;
}
.form-status.error {
  background: rgba(239, 68, 68, 0.09);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #b91c1c;
}
.form-status.loading { background: var(--color-bg-muted); color: var(--color-text-secondary); }
.form-status a { font-weight: 700; text-decoration: underline; }

.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.field-invalid { border-color: #ef4444 !important; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── 6. Minimal iletişim formu (3 alan) ────────────────────── */
.form-mini .form-group { margin-bottom: 14px; }
.form-mini .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}
.form-mini input,
.form-mini textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-mini input:focus,
.form-mini textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.12);
}
.form-mini textarea { resize: vertical; min-height: 84px; }
.form-mini .btn { width: 100%; justify-content: center; }
.form-mini .form-status { margin-top: 12px; }
@media (min-width: 768px) { .form-mini { max-width: 440px; } }

/* ── 7. Sosyal medya (UTM etiketli) ───────────────────────────────────── */
.footer-social,
.header-social {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.footer-social a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(26, 95, 180, 0.06);
}
/* Header'da yalnızca ikon (yer kaplaması az olsun) */
.header-social a {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}
.header-social a span { display: none; }
.site-header:not(.scrolled) .header-social a {
  color: rgba(248, 250, 252, 0.9);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}
.site-header.scrolled .header-social a {
  color: var(--color-text-secondary);
  border-color: var(--color-border-strong);
  background: var(--color-bg-elevated);
}
@media (max-width: 767px) {
  .header-social { display: none; }
  .footer-social { justify-content: center; flex-wrap: wrap; }
}

/* ── 7. Küçük yardımcılar ──────────────────────────────────────────────── */
.text-center { text-align: center; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.no-wrap { white-space: nowrap; }

/* ── 7. Statik dil navigasyonu ───────────────────────────────────────────
 * JavaScript çalışmasa bile dil değiştirilebilsin diye sayfada GERÇEK
 * <a href> bağlantıları bulunur. Arama motoru bunları hreflang ile birlikte
 * kullanarak sitenin 11 dilli yapısını doğrular.
 * JS açıksa görsel olarak gizlenir (header'daki asıl seçici devrede).     */
.lang-sitemap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: -1px;
  padding: 0;
  border: 0;
}
.lang-sitemap a { color: inherit; }

html.js-ready .lang-sitemap { display: none; }

/* JavaScript tamamen kapalıysa (lang-sitemap görünür kalır) sayfa yine
   kullanılabilir olsun diye hafif bir kart olarak göster. */
html.no-js .lang-sitemap,
html:not(.js-ready) .lang-sitemap:not([hidden]) {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0 0 24px;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}
html:not(.js-ready) .lang-sitemap a[aria-current="page"] {
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════════
   8. Ürün kataloğu — model kodu, teknik özellik tablosu, detay modalı
   FİYAT GÖSTERİLMEZ; "Fiyat Sor / Teklif İste" butonları korunur.
   ══════════════════════════════════════════════════════════════════════ */

/* Model kodu rozeti */
.product-model {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.product-meta {
  margin: 6px 0 2px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.product-meta b {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}

/* Kart içi mini teknik tablo */
.product-spec-table {
  width: 100%;
  margin: 10px 0 12px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.product-spec-table th,
.product-spec-table td {
  padding: 4px 0;
  text-align: start;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.product-spec-table th {
  font-weight: 500;
  color: var(--color-text-muted);
  width: 45%;
}
.product-spec-table td {
  font-weight: 600;
  color: var(--color-text);
}

/* Görsel üzerinde "Teknik Özellikler" rozeti */
.product-spec-badge {
  position: absolute;
  inset-inline-start: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
}

/* Detay butonu */
.product-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  min-height: 38px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition);
}
.product-detail-btn:hover,
.product-detail-btn:focus-visible {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(26, 95, 180, 0.06);
}
.product-detail-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Kart eylem satırı */
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.product-actions .quote-link-btn { flex: 1 1 auto; }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.ym-modal[hidden] { display: none; }
.ym-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ym-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 26, 0.62);
  backdrop-filter: blur(2px);
}
.ym-modal-box {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow: auto;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: ymPop 0.18s ease-out;
}
@keyframes ymPop {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}
body.ym-modal-open { overflow: hidden; }

.ym-modal-close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.ym-modal-close:hover { background: rgba(15, 23, 42, 0.12); }

.ym-modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.ym-modal-media {
  background: var(--color-bg-muted);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ym-modal-media img {
  max-width: 100%;
  max-height: 340px;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  object-fit: contain;
}
.ym-modal-info { padding: 24px 26px 28px; }
.ym-modal-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.3;
}
.ym-modal-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0 0 20px;
  font-size: 0.9375rem;
}
.ym-modal-meta dt {
  color: var(--color-text-muted);
  font-weight: 500;
}
.ym-modal-meta dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}
.ym-modal-sub {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
}
.ym-modal-specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.ym-modal-specs th,
.ym-modal-specs td {
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
  text-align: start;
  vertical-align: top;
}
.ym-modal-specs th {
  width: 42%;
  font-weight: 500;
  color: var(--color-text-muted);
}
.ym-modal-specs td { font-weight: 600; }
.ym-modal-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.ym-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.ym-modal-hint {
  margin: 14px 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

@media (min-width: 720px) {
  .ym-modal-body { grid-template-columns: 300px 1fr; }
  .ym-modal-media { padding: 26px; }
  .ym-modal-info { padding: 28px 30px 32px; }
}

/* ── RTL ───────────────────────────────────────────────────────────────── */
html[dir="rtl"] .product-spec-table th,
html[dir="rtl"] .product-spec-table td,
html[dir="rtl"] .ym-modal-specs th,
html[dir="rtl"] .ym-modal-specs td { text-align: right; }
html[dir="rtl"] .ym-modal-meta dd { direction: rtl; }

/* ══════════════════════════════════════════════════════════════════════
   9. Katalog: sınıf kartları + sade ürün kartı
   ══════════════════════════════════════════════════════════════════════ */

.product-card--simple {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.product-card--simple:hover {
  transform: translateY(-6px);
}

/* premium.css: .product-grid .product-image { height:400px } -> iptal */
.product-grid .product-card--simple .product-image {
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  position: relative;
  background: var(--color-bg-muted);
  overflow: hidden;
}
.product-grid .product-card--simple .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}
.product-card--simple:hover .product-image img { transform: scale(1.04); }

/* premium.css: .fiyat-sor-btn mutlak konumlu -> akisa al */
.product-grid .product-card--simple .fiyat-sor-btn--block {
  position: static;
  top: auto;
  left: auto;
  inset: auto;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 20px);
  margin: 0 10px 12px;
  min-height: 40px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  box-shadow: none;
}

.product-card--simple .product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.product-card--simple .product-info {
  display: block;
  padding: 12px 12px 4px;
  text-align: center;
}
.product-card--simple .product-model {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}


/* Sınıf kartları (kategori index sayfası) */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.class-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}
.class-card:hover,
.class-card:focus-visible {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.class-card:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.class-card-name { font-size: 1.125rem; font-weight: 700; }
.class-card-count { font-size: 0.875rem; color: var(--color-text-muted); }
.class-card-go {
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}
@media (min-width: 768px) {
  .class-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Katalog sayfa üstü geri düğmesi */
.product-search-bar { margin-top: 22px; }