/*
RTL styles for Agiva (Arabic / Hebrew / Persian locales).

Loaded IN ADDITION to style.css (wp_style_add_data 'rtl' => 'addon').
Most of the layout already uses CSS logical properties, so this file only
handles direction-sensitive leftovers and Arabic typography.
*/

/* ============================================================
   BASE
   ============================================================ */
body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: 0;
}

/* Arabic headings: Cairo instead of Fraunces (no Arabic glyphs). */
h1, h2, h3, h4, h5, h6,
.hero__title,
.section-title,
.site-logo__text,
.site-logo__icon,
.stat-card__value,
.brand-card__title,
.brand-card__logo,
.site-footer__brand-name,
.site-footer__brand-icon,
.error-404__code {
    font-family: 'Cairo', system-ui, sans-serif;
    letter-spacing: 0;
}

/* Letter-spacing looks broken on Arabic script — neutralize it. */
.section-label,
.brand-card__badge,
.product-card__brand,
.product-card__meta,
.post-card__meta,
.site-footer__heading,
.site-logo__subtext,
.product-detail__badge,
.product-detail__feature-label {
    letter-spacing: 0.02em;
    text-transform: none;
}

/* ============================================================
   COMPONENTS NEEDING DIRECTION FIXES
   ============================================================ */

/* Sub-menus */
.main-nav__list .sub-menu {
    left: auto;
    right: 0;
}

/* Breadcrumb separator reads correctly in RTL */
.breadcrumb__list li + li::before {
    content: "\\";
}

/* Card "Details" arrow points the other way */
.product-card__link svg {
    transform: scaleX(-1);
}
.product-card__link:hover svg {
    transform: scaleX(-1) translateX(3px);
}

/* Floats */
.alignleft {
    float: right;
}
.alignright {
    float: left;
}

/* Comments threading */
.comment-list .children {
    margin-inline-start: 0;
    margin-inline-end: 2rem;
}

/* Search form */
.search-form__row {
    flex-direction: row;
}

/* Login form (hardcoded text-align: start handles it, keep for safety) */
.login-shell form {
    text-align: right;
}

/* Product tabs border offset */
.product-detail__tab-headers {
    direction: rtl;
}

/* Map legend stays readable */
.distributors-map__legend {
    direction: rtl;
}

/* Honeypot */
.agiva-form__hp {
    left: auto;
    right: -9999px;
}

/* Screen-reader focus chip */
.screen-reader-text:focus {
    left: auto;
    right: 0.5rem;
}
/* Keep international phone numbers visually stable inside RTL copy. */
.agiva-phone,
input[type="tel"] {
	direction: ltr;
	unicode-bidi: isolate;
	text-align: left;
}
