/* RTL overrides — geladen ausschliesslich für lang=ar (siehe admin/head-common.php).
 * style.css nutzt an den meisten Stellen bereits Flexbox (`flex-direction: row`), das
 * über die Inline-Achse automatisch mit dem `dir`-Attribut mitspiegelt — dafür ist keine
 * Anpassung nötig. Diese Datei patcht ausschliesslich die physischen (nicht-logischen)
 * left/right-, margin-left/right-, padding-left/right- und text-align:left/right-Regeln,
 * die der Browser nicht automatisch spiegelt. Neue Selektoren zuerst gegen style.css
 * abgleichen, bevor hier etwas ergänzt wird — sonst laufen beide Dateien auseinander.
 */

[dir="rtl"] body { direction: rtl; }

/* Arabische Schrift: 'Barlow Condensed' (Überschriften) und 'Inter' (Fließtext) decken keine
 * arabischen Glyphen ab (siehe fonts.css unicode-range: nur Latin/Latin-ext/Vietnamese/Cyrillic).
 * Cairo wird nur für lang=ar via head-common.php geladen. !important ist hier bewusst und
 * unkritisch: betrifft ausschliesslich [dir="rtl"]-Seiten (aktuell nur /ar/) und ersetzt gezielt
 * eine Schrift ohne arabische Glyphen durch eine mit passenden Glyphen — keine Kollision mit
 * sonstigen Stilregeln. .logo-text bleibt ausgenommen: der Markenname "Reifen-Onlineshops.de"
 * bleibt auch auf Arabisch lateinisch/unübersetzt, wie in allen anderen 7 Sprachen. */
[dir="rtl"] body,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] button, [dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea {
  font-family: 'Cairo', 'Inter', sans-serif !important;
}
[dir="rtl"] .logo-text { font-family: 'Barlow Condensed', sans-serif !important; }

/* ── Kopfzeile ── */
[dir="rtl"] .site-nav      { margin-right: 0; margin-left: auto; }
[dir="rtl"] .header-search { margin-left: 0; margin-right: auto; }
[dir="rtl"] .lang-sel      { margin-left: 0; margin-right: auto; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .lang-opt svg[style*="margin-left"] { margin-left: 0 !important; margin-right: auto !important; }

@media (max-width: 640px) {
  [dir="rtl"] .lang-sel-btn svg { margin-left: 0; margin-right: 2px; }
}

/* ── Chatbot-Widget ── */
[dir="rtl"] .chatbot       { right: auto; left: 24px; }
[dir="rtl"] .chatbot-close { right: auto; left: 12px; }
[dir="rtl"] .chatbot-opt   { text-align: right; }

/* ── Cookie-Banner ── */
[dir="rtl"] .cookie-text a { margin-left: 0; margin-right: 6px; }

/* ── Marken-/Ergebnislisten ── */
[dir="rtl"] .brand-toggle    { text-align: right; }
[dir="rtl"] .brand-ms-toggle { text-align: right; }
[dir="rtl"] .size-tooltip    { left: auto; right: 0; }

/* Select-Pfeil (Größen-Dropdowns): SVG-Hintergrundpfeil + Padding spiegeln */
[dir="rtl"] .quick-size-row select {
  background-position: left 12px center;
  padding-right: 14px;
  padding-left: 36px;
}

/* ── Preis-/Merkzettel-Elemente ── */
[dir="rtl"] .price-approx { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .best-badge   { left: auto; right: 16px; }
[dir="rtl"] .fav-float    { right: auto; left: 16px; }

@media (max-width: 640px) {
  [dir="rtl"] .fav-float { right: auto; left: 12px; }
  [dir="rtl"] .buy-row   { margin-left: 0; margin-right: auto; }
  [dir="rtl"] .feat      { text-align: right; }
}
