:root {
  --ar-preview-navy: #071f32;
  --ar-preview-green: #8fba45;
  --ar-preview-font: Tahoma, Arial, "Noto Sans Arabic", sans-serif;
}

html[lang="ar"] {
  scroll-behavior: smooth;
  direction: rtl;
}

html[lang="ar"] body {
  overflow-x: clip;
  font-family: var(--ar-preview-font);
  text-rendering: optimizeLegibility;
}

html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
  letter-spacing: 0;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .hero h1,
html[lang="ar"] .catalog-hero h1,
html[lang="ar"] .pdp-info__title,
html[lang="ar"] .about-hero h1,
html[lang="ar"] .about-team__copy h2,
html[lang="ar"] .contact-hero h1,
html[lang="ar"] .contact-copy h2,
html[lang="ar"] .blog-hero h1 {
  font-family: var(--ar-preview-font);
  letter-spacing: 0;
}

html[lang="ar"] p,
html[lang="ar"] li,
html[lang="ar"] td,
html[lang="ar"] th,
html[lang="ar"] label,
html[lang="ar"] small {
  hyphens: none;
  overflow-wrap: break-word;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

html[lang="ar"] a,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
  font: inherit;
}

.language-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  line-height: 1;
}

.language-select__control {
  min-width: 92px;
  margin: 0;
  padding-block: 2px;
  padding-inline: 0 18px;
  border: 0;
  border-radius: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.language-select__control:focus-visible {
  outline: 2px solid #8ab83f;
  outline-offset: 3px;
  border-radius: 2px;
}

.language-select__control option {
  background: #ffffff;
  color: #071f32;
}

.language-select .language-select__chevron {
  position: absolute;
  right: auto;
  left: auto;
  inset-inline-end: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  pointer-events: none;
}

.language-select--mobile {
  display: none;
  color: #071f32;
}

@media (max-width: 1279.98px) {
  .language-select--mobile {
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
  }

  .language-select--mobile > svg:first-child {
    width: 18px;
    height: 18px;
    margin: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }

  .language-select--mobile .language-select__control {
    min-width: 86px;
  }
}

@media (max-width: 767.98px) {
  .language-select--mobile > svg:first-child {
    display: none;
  }

  .language-select--mobile .language-select__control {
    width: 82px;
    min-width: 82px;
    padding-inline: 0 16px;
    font-size: 12px;
  }
}

/* Keep the localized home hero on the same responsive image and crop system as English. */
@media (min-width: 768px) {
  html[lang="ar"] .hero--figma-crop {
    --hero-bg-url: url("assets/hero/home-hero-responsive-normal-v2-2400.webp?v=20260713a");
    --hero-bg-position: center center;
    --hero-stat-height: min(100px, 5.2083vw);
    --hero-stat-bottom: 0px;
    --hero-side-pad: max(24px, 16.6667vw);
    --hero-image-extra: 0px !important;
    --hero-image-shift: 0px !important;
    height: clamp(600px, 48.75vw, 936px) !important;
    background: #071f36 !important;
  }

  html[lang="ar"] .hero--figma-crop::before {
    display: block !important;
    z-index: 1 !important;
    background: linear-gradient(74.376deg, rgba(6, 32, 59, 0.84) 9.4605%, rgba(6, 32, 59, 0.72) 40.475%, rgba(6, 32, 59, 0) 72.758%) !important;
  }

  html[lang="ar"] .hero--figma-crop::after {
    display: block !important;
    z-index: 1 !important;
    top: auto !important;
    height: 28% !important;
    background: linear-gradient(180deg, rgba(6, 32, 59, 0), rgba(6, 32, 59, 0.34)) !important;
  }

  html[lang="ar"] .hero--figma-crop .hero__bg {
    inset: 0 !important;
    overflow: hidden !important;
    background-image: var(--hero-bg-url) !important;
    background-position: var(--hero-bg-position) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
  }

  html[lang="ar"] .hero--figma-crop .hero__bg::before,
  html[lang="ar"] .hero--figma-crop .hero__bg::after {
    content: none !important;
  }

  html[lang="ar"] .hero--figma-crop .hero__content {
    display: flex !important;
    align-items: center !important;
    width: min(1440px, calc(100% - 48px)) !important;
    height: calc(100% - var(--hero-stat-height)) !important;
  }

  html[lang="ar"] .hero--figma-crop .hero__copy {
    padding-top: 0 !important;
    transform: translateY(5%) !important;
  }

  html[lang="ar"] .hero--figma-crop .hero-stats {
    right: 0 !important;
    bottom: var(--hero-stat-bottom) !important;
    left: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center !important;
    width: auto !important;
    height: var(--hero-stat-height) !important;
    padding: 0 var(--hero-side-pad) !important;
    transform: none !important;
    background: rgba(6, 32, 59, 0.18) !important;
    backdrop-filter: blur(4px) !important;
  }

  html[lang="ar"] .hero--figma-crop .hero-stats div,
  html[lang="ar"] .hero--figma-crop .hero-stats div:nth-child(1),
  html[lang="ar"] .hero--figma-crop .hero-stats div:nth-child(2),
  html[lang="ar"] .hero--figma-crop .hero-stats div:nth-child(3),
  html[lang="ar"] .hero--figma-crop .hero-stats div:nth-child(4) {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding-block: 0 !important;
    padding-inline: min(48px, 2.5vw) 0 !important;
  }

  html[lang="ar"] .hero--figma-crop .hero-stats div:not(:first-child)::before {
    top: 50% !important;
    right: auto !important;
    left: auto !important;
    inset-inline-start: 0 !important;
    width: 1px !important;
    height: min(40px, 2.0833vw) !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.18) !important;
  }

  html[lang="ar"] .hero--figma-crop .hero-stats span {
    white-space: nowrap !important;
  }
}

@media (min-width: 1280px) and (max-width: 1919.98px) {
  html[lang="ar"] .hero--figma-crop .hero__content {
    width: min(1440px, calc(100% - clamp(192px, 20vw, 360px))) !important;
  }
}

@media (min-width: 1920px) {
  html[lang="ar"] .hero--figma-crop {
    --hero-bg-url: url("assets/hero/home-hero-responsive-wide-v2-3200.webp?v=20260713a");
    --hero-bg-position: center center;
  }

  html[lang="ar"] .hero--figma-crop .hero__content {
    width: min(75vw, 1920px) !important;
  }
}

html[lang="ar"] a[class*="button"],
html[lang="ar"] .pdp-cta,
html[lang="ar"] .whatsapp-pill,
html[lang="ar"] .contact-actions a,
html[lang="ar"] .catalog-detail-button,
html[lang="ar"] .catalog-promise__button {
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

html[lang="ar"] .product-card,
html[lang="ar"] .catalog-card,
html[lang="ar"] .proof-card,
html[lang="ar"] .pdp-payment-card {
  min-width: 0;
}

html[lang="ar"] .pdp-info__title,
html[lang="ar"] .catalog-card__title,
html[lang="ar"] .product-card__title,
html[lang="ar"] .pdp-quick-spec__value,
html[lang="ar"] .pdp-price-box__amount,
html[lang="ar"] [class*="price"],
html[lang="ar"] a[href^="tel:"],
html[lang="ar"] a[href^="mailto:"],
html[lang="ar"] bdi {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

html[lang="ar"] .catalog-meta,
html[lang="ar"] .catalog-price,
html[lang="ar"] .pdp-quick-spec__label,
html[lang="ar"] .pdp-cert-row__body,
html[lang="ar"] .pdp-trust-item {
  white-space: normal;
}

html[lang="ar"] .catalog-results,
html[lang="ar"] .catalog-card__body,
html[lang="ar"] .catalog-meta,
html[lang="ar"] .catalog-price,
html[lang="ar"] .product-main__body,
html[lang="ar"] .product-card__body,
html[lang="ar"] .pdp-info,
html[lang="ar"] .pdp-price-box__left,
html[lang="ar"] .pdp-cert-row__body,
html[lang="ar"] .about-overview__copy,
html[lang="ar"] .about-team__copy,
html[lang="ar"] .about-contact__copy,
html[lang="ar"] .contact-copy,
html[lang="ar"] .contact-item > div,
html[lang="ar"] .contact-map__caption > div,
html[lang="ar"] .blog-card__body {
  min-width: 0;
}

.ar-preview-banner {
  position: fixed;
  z-index: 100000;
  left: 16px;
  bottom: 16px;
  display: grid;
  gap: 2px;
  max-width: min(340px, calc(100vw - 32px));
  padding: 10px 14px;
  color: #fff;
  background: rgba(7, 31, 50, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(7, 31, 50, 0.25);
  font: 500 12px/1.35 var(--ar-preview-font);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.ar-preview-banner strong {
  color: #b8dd74;
  font-weight: 800;
}

.ar-preview-toast {
  position: fixed;
  z-index: 100001;
  left: 50%;
  bottom: 24px;
  width: min(520px, calc(100vw - 32px));
  padding: 14px 18px;
  color: #fff;
  background: #071f32;
  border-radius: 12px;
  box-shadow: 0 16px 45px rgba(7, 31, 50, 0.32);
  transform: translate(-50%, 24px);
  opacity: 0;
  transition: 180ms ease;
  text-align: center;
  pointer-events: none;
}

.ar-preview-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 767.98px) {
  html[lang="ar"] p,
  html[lang="ar"] li,
  html[lang="ar"] label,
  html[lang="ar"] small {
    hyphens: none;
  }

  html[lang="ar"] h1,
  html[lang="ar"] h2,
  html[lang="ar"] h3,
  html[lang="ar"] h4 {
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
  }

  html[lang="ar"] .brand,
  html[lang="ar"] .icon-button,
  html[lang="ar"] .menu-button {
    min-width: 44px;
  }

  html[lang="ar"] .nav-links a,
  html[lang="ar"] .nav-submenu a {
    white-space: normal;
  }

  html[lang="ar"] .hero,
  html[lang="ar"] .home-hero,
  html[lang="ar"] .about-hero,
  html[lang="ar"] .catalog-hero {
    height: auto;
  }

  html[lang="ar"] .hero--figma-crop {
    height: 732px !important;
  }

  html[lang="ar"] .hero--figma-crop .hero__bg {
    background: none;
  }

  html[lang="ar"] .hero--figma-crop .hero__copy,
  html[lang="ar"] .hero--figma-crop .hero__copy p:not(.eyebrow),
  html[lang="ar"] .hero--figma-crop .hero__actions {
    width: 100%;
    max-width: 100%;
  }

  html[lang="ar"] .hero--figma-crop h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(29px, 8.2vw, 32px);
    line-height: 1.08;
  }

  html[lang="ar"] .hero__actions,
  html[lang="ar"] .cta-actions,
  html[lang="ar"] .contact-actions,
  html[lang="ar"] .pdp-ctas,
  html[lang="ar"] .inquiry-actions,
  html[lang="ar"] .form-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  html[lang="ar"] .proof-metrics,
  html[lang="ar"] .company-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[lang="ar"] .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 20px;
  }

  html[lang="ar"] .pdp-quick-spec {
    min-width: 0;
  }

  html[lang="ar"] .pdp-cert-row,
  html[lang="ar"] .pdp-trust-item {
    align-items: flex-start;
  }

  html[lang="ar"] .blog-detail__table-wrap,
  html[lang="ar"] .article-table-wrap,
  html[lang="ar"] .ar-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  html[lang="ar"] .ar-table-scroll {
    width: 100%;
    margin-block: 18px;
    padding-bottom: 4px;
    border-radius: 8px;
    overscroll-behavior-inline: contain;
  }

  html[lang="ar"] .ar-table-scroll table {
    min-width: 720px;
    margin: 0;
  }

  html[lang="ar"] .product-card .price-row a,
  html[lang="ar"] .proof-card a,
  html[lang="ar"] .catalog-detail-button,
  html[lang="ar"] .hero__actions .button,
  html[lang="ar"] .story-actions .button,
  html[lang="ar"] .catalog-promise__button {
    min-height: 44px;
  }
}

@media (max-width: 430px) {
  html[lang="ar"] h1 {
    font-size: clamp(29px, 8.2vw, 32px);
    line-height: 1.08;
  }

  html[lang="ar"] h2 {
    font-size: clamp(27px, 7.7vw, 30px);
    line-height: 1.12;
  }

  html[lang="ar"] .hero__actions,
  html[lang="ar"] .cta-actions,
  html[lang="ar"] .contact-actions,
  html[lang="ar"] .pdp-ctas,
  html[lang="ar"] .inquiry-actions,
  html[lang="ar"] .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }

  html[lang="ar"] .hero__actions > *,
  html[lang="ar"] .cta-actions > *,
  html[lang="ar"] .contact-actions > *,
  html[lang="ar"] .pdp-ctas > *,
  html[lang="ar"] .inquiry-actions > *,
  html[lang="ar"] .form-actions > * {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  html[lang="ar"] .pdp-form .form-row,
  html[lang="ar"] .inquiry-form .form-row,
  html[lang="ar"] .contact-inquiry__form .form-row,
  html[lang="ar"] form .form-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  html[lang="ar"] .catalog-card__price-row,
  html[lang="ar"] .price-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  html[lang="ar"] .product-main .price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  html[lang="ar"] .product-main .price-row > div,
  html[lang="ar"] .product-main .price-row > a {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    align-self: stretch;
  }

  html[lang="ar"] .catalog-price b {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  html[lang="ar"] .pdp-cert-row__body {
    min-width: 0;
  }

  .ar-preview-banner {
    left: 10px;
    bottom: 10px;
    max-width: 250px;
    padding: 8px 10px;
    font-size: 10px;
  }
}

html[lang="ar"] .product-card .price-row span::before {
  content: "السعر";
}

/* RTL is applied to language and layout, never to equipment photography. */
html[lang="ar"] img,
html[lang="ar"] video,
html[lang="ar"] picture {
  direction: ltr;
}

html[lang="ar"] .hero__copy,
html[lang="ar"] .section-head,
html[lang="ar"] .catalog-hero__inner,
html[lang="ar"] .catalog-sidebar,
html[lang="ar"] .catalog-results,
html[lang="ar"] .contact-copy,
html[lang="ar"] .contact-hero__inner,
html[lang="ar"] .about-hero__inner,
html[lang="ar"] .about-overview__copy,
html[lang="ar"] .about-team__copy,
html[lang="ar"] .about-contact__copy,
html[lang="ar"] .pdp-info,
html[lang="ar"] .catalog-card__body,
html[lang="ar"] .blog-hero__inner,
html[lang="ar"] .blog-card__body,
html[lang="ar"] .footer-newsletter,
html[lang="ar"] .footer-main {
  text-align: start;
}

html[lang="ar"] .about-section-head,
html[lang="ar"] .about-cta__panel {
  text-align: center;
}

html[lang="ar"] .brand,
html[lang="ar"] .brand img,
html[lang="ar"] bdi,
html[lang="ar"] [dir="ltr"],
html[lang="ar"] .technical-ltr,
html[lang="ar"] a[href^="tel:"],
html[lang="ar"] a[href^="mailto:"],
html[lang="ar"] .catalog-price b,
html[lang="ar"] .pdp-price-box__amount,
html[lang="ar"] .pdp-info__subtitle bdi,
html[lang="ar"] .product-main .price-row strong,
html[lang="ar"] .product-card .price-row > span,
html[lang="ar"] .catalog-card__body strong {
  direction: ltr;
  unicode-bidi: isolate;
}

html[lang="ar"] a[href^="tel:"],
html[lang="ar"] a[href^="mailto:"] {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
}

/* Keep the shared header phone icon and number on the same baseline.
   The generic technical-link rule above must not replace the header's
   flex layout on Arabic pages. */
html[lang="ar"] .topbar__tool[href^="tel:"] {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: none;
  white-space: nowrap;
  overflow-wrap: normal;
}

html[lang="ar"] .topbar__tool[href^="tel:"] svg {
  flex: 0 0 auto;
}

/* A mailto URL does not make its visible Arabic CTA label LTR. */
html[lang="ar"] .inquiry__actions a.button[href^="mailto:"] {
  display: inline-flex;
  direction: rtl;
  unicode-bidi: normal;
  text-align: center;
}

html[lang="ar"] .inquiry__actions .button--primary {
  padding-right: min(28px, 1.4583vw);
  padding-left: min(62px, 3.2292vw);
}

html[lang="ar"] .inquiry__actions .button--primary::after {
  right: auto;
  left: min(10px, 0.5208vw);
  content: "←";
}

html[lang="ar"] .inquiry__actions .button--primary:hover::after,
html[lang="ar"] .inquiry__actions .button--primary:focus-visible::after {
  transform: translate(-2px, -50%);
}

@media (max-width: 767.98px) {
  html[lang="ar"] .inquiry__actions .button--primary {
    padding-right: 14px;
    padding-left: 48px;
  }

  html[lang="ar"] .inquiry__actions .button--primary::after {
    right: auto;
    left: 6px;
  }
}

html[lang="ar"] .catalog-price b,
html[lang="ar"] .pdp-price-box__amount,
html[lang="ar"] .product-main .price-row strong,
html[lang="ar"] .product-card .price-row > span {
  white-space: nowrap;
}

html[lang="ar"] .product-main .price-row strong,
html[lang="ar"] .product-card .price-row > span {
  text-align: right;
}

html[lang="ar"] .catalog-meta,
html[lang="ar"] .product-card p,
html[lang="ar"] .pdp-spec-row dd,
html[lang="ar"] .about-contact__item strong,
html[lang="ar"] .about-contact__item em,
html[lang="ar"] .contact-item strong,
html[lang="ar"] .contact-item div > span,
html[lang="ar"] .contact-map__caption strong,
html[lang="ar"] .blog-card__meta {
  unicode-bidi: plaintext;
}

html[lang="ar"] .pdp-quick-spec__value {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

html[lang="ar"] input:not([type="email"]):not([type="tel"]):not([type="url"]),
html[lang="ar"] textarea {
  direction: rtl;
  text-align: start;
}

html[lang="ar"] input[type="email"],
html[lang="ar"] input[type="tel"],
html[lang="ar"] input[type="url"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

html[lang="ar"] input[type="email"]::placeholder,
html[lang="ar"] input[type="tel"]::placeholder,
html[lang="ar"] input[type="url"]::placeholder {
  direction: rtl;
  text-align: right;
}

/* Keep the home hero copy inside the artwork's established left-side safe area. */
html[lang="ar"] .hero--figma-crop .hero__content {
  direction: ltr;
}

html[lang="ar"] .hero--figma-crop .hero__copy {
  direction: rtl;
  text-align: right;
}

html[lang="ar"] .hero--figma-crop .hero__copy h1,
html[lang="ar"] .hero--figma-crop .hero__copy p:not(.eyebrow) {
  margin-inline: 0 auto;
}

/* Keep the physical art direction: imagery left, Arabic copy right. */
html[lang="ar"] .story__grid,
html[lang="ar"] body.product-detail-preview .pdp-overview,
html[lang="ar"] body.about-page .about-overview__grid {
  direction: ltr;
}

html[lang="ar"] .story-gallery,
html[lang="ar"] body.product-detail-preview .pdp-gallery,
html[lang="ar"] body.product-detail-preview .pdp-gallery__thumbs,
html[lang="ar"] body.about-page .about-collage,
html[lang="ar"] body.about-page .about-team__photos {
  direction: ltr;
}

html[lang="ar"] .story-copy,
html[lang="ar"] body.product-detail-preview .pdp-overview > *,
html[lang="ar"] body.about-page .about-overview__grid > * {
  direction: rtl;
}

html[lang="ar"] body.product-detail-preview .pdp-gallery,
html[lang="ar"] body.about-page .about-collage {
  direction: ltr;
}

html[lang="ar"] .contact-item__icon {
  justify-self: center;
}

html[lang="ar"] .topbar svg {
  margin-right: 0;
  margin-inline-end: min(4px, 0.2083vw);
}

html[lang="ar"] .nav-parent::after {
  margin-right: 0;
  margin-left: 0;
  margin-inline-start: 2px;
}

html[lang="ar"] .specs div + div {
  padding-left: 0;
  padding-inline-start: min(12px, 0.625vw);
}

html[lang="ar"] .specs div + div::before {
  right: auto;
  left: auto;
  inset-inline-start: 0;
}

html[lang="ar"] .button--details::after {
  margin-left: 0;
  margin-inline-start: min(18px, 0.9375vw);
  content: "←";
}

html[lang="ar"] .button--details:hover::after,
html[lang="ar"] .button--details:focus-visible::after,
html[lang="ar"] .button--details:active::after,
html[lang="ar"] .button--details.is-active::after,
html[lang="ar"] .product-main.is-active .button--details::after {
  content: "↖";
}

html[lang="ar"] .text-link::after,
html[lang="ar"] .proof-card a::after {
  content: "←";
}

html[lang="ar"] .product-card .price-row a::after {
  content: "←";
}

html[lang="ar"] .product-card .price-row a:hover::after,
html[lang="ar"] .product-card .price-row a:focus-visible::after,
html[lang="ar"] .product-card .price-row a:active::after,
html[lang="ar"] .product-card .price-row a.is-active::after,
html[lang="ar"] .product-card.is-active .price-row a::after {
  content: "↖";
}

html[lang="ar"] .catalog-detail-button svg,
html[lang="ar"] .button--details svg,
html[lang="ar"] .pdp-cta svg,
html[lang="ar"] .hero__actions .button svg,
html[lang="ar"] .about-button svg,
html[lang="ar"] .about-card--dark a svg,
html[lang="ar"] .contact-button__arrow svg {
  transform: scaleX(-1);
}

html[lang="ar"] .catalog-detail-button:hover svg,
html[lang="ar"] .catalog-card__link:focus-visible .catalog-detail-button svg,
html[lang="ar"] .catalog-card__link:active .catalog-detail-button svg,
html[lang="ar"] .catalog-card__link.is-active .catalog-detail-button svg,
html[lang="ar"] .hero__actions .button.button--primary:hover svg,
html[lang="ar"] .hero__actions .button.button--primary:focus-visible svg,
html[lang="ar"] .hero__actions .button.button--primary:active svg,
html[lang="ar"] .hero__actions .button.button--primary.is-active svg {
  transform: scaleX(-1) rotate(-45deg);
}

html[lang="ar"] .catalog-promise__button::after {
  margin-left: 0;
  margin-inline-start: 18px;
  content: "←";
}

html[lang="ar"] .blog-card__read > [aria-hidden="true"] {
  font-size: 0;
}

html[lang="ar"] .blog-card__read > [aria-hidden="true"]::before {
  content: "←";
  font-size: 12px;
  line-height: 1;
}

html[lang="ar"] .about-process i {
  font-size: 0;
}

html[lang="ar"] .about-process i::before {
  content: "←";
  font-size: 16px;
  line-height: 1;
}

/* Shared navigation and footer use logical spacing without changing their dimensions. */
html[lang="ar"] .nav-submenu,
html[lang="ar"] .nav-submenu a,
html[lang="ar"] .footer-col,
html[lang="ar"] .footer-brand {
  text-align: start;
}

/* Home sample: retain every English media box and only localize flow and copy. */
html[lang="ar"] .product-main__body,
html[lang="ar"] .product-card__body,
html[lang="ar"] .proof-metrics > div,
html[lang="ar"] .story-copy {
  text-align: start;
}

html[lang="ar"] .tags,
html[lang="ar"] .specs,
html[lang="ar"] .product-card p {
  flex-wrap: wrap;
}

html[lang="ar"] .product-main h3,
html[lang="ar"] .product-card h3,
html[lang="ar"] .product-main h3 bdi,
html[lang="ar"] .product-card h3 bdi {
  max-width: 100%;
}

html[lang="ar"] .proof-metrics > div,
html[lang="ar"] .proof-metrics > div > * {
  min-width: 0;
  overflow-wrap: break-word;
}

/* Products index: sidebar remains right, results remain left under the root RTL flow. */
html[lang="ar"] .filter-option {
  text-align: start;
}

html[lang="ar"] .filter-option span:nth-child(2),
html[lang="ar"] .filter-option--bar span:first-child {
  min-width: 0;
}

html[lang="ar"] .catalog-promise dd {
  text-align: end;
}

html[lang="ar"] .catalog-card__body > strong {
  max-width: 100%;
  text-align: right;
}

html[lang="ar"] .catalog-meta {
  flex-wrap: wrap;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

html[lang="ar"] .catalog-price {
  flex-wrap: wrap;
}

html[lang="ar"] .catalog-mobile-toolbar > * {
  min-width: 0;
}

html[lang="ar"] .catalog-mobile-toolbar > span {
  white-space: normal;
  text-align: end;
}

/* Reserve two metadata lines so every desktop/tablet card keeps its price
   and CTA on the same baseline without changing the media dimensions. */
@media (min-width: 768px) {
  html[lang="ar"] body.products-page .catalog-card,
  html[lang="ar"] body.products-page .catalog-card__link {
    height: 100%;
  }

  html[lang="ar"] body.products-page .catalog-card__body {
    flex: 1 1 auto;
    grid-template-rows: auto minmax(40px, 1fr) auto auto;
    align-content: stretch;
  }
}

/* PDP sample: gallery and thumbnails keep English size/order; information stays on the right. */
html[lang="ar"] body.product-detail-preview .pdp-gallery,
html[lang="ar"] body.product-detail-preview .pdp-gallery__main,
html[lang="ar"] body.product-detail-preview .pdp-gallery__thumb-row,
html[lang="ar"] body.product-detail-preview .pdp-gallery__thumbs {
  text-align: left;
}

html[lang="ar"] .pdp-info__badges,
html[lang="ar"] .pdp-quick-spec,
html[lang="ar"] .pdp-price-box,
html[lang="ar"] .pdp-price-box__meta,
html[lang="ar"] .pdp-ctas,
html[lang="ar"] .pdp-trust,
html[lang="ar"] .pdp-spec-row {
  direction: rtl;
}

html[lang="ar"] .pdp-price-box__left {
  text-align: start;
}

html[lang="ar"] .pdp-price-box__amount {
  display: inline-block;
  max-width: 100%;
}

html[lang="ar"] .pdp-quick-spec__label,
html[lang="ar"] .pdp-quick-spec__value,
html[lang="ar"] .pdp-spec-row dt,
html[lang="ar"] .pdp-spec-row dd {
  min-width: 0;
}

html[lang="ar"] .pdp-spec-row dd {
  text-align: left;
}

html[lang="ar"] .pdp-spec-group:nth-child(1) .pdp-spec-row:nth-child(-n + 5) dd,
html[lang="ar"] .pdp-spec-group:nth-child(2) .pdp-spec-row:nth-child(-n + 6) dd,
html[lang="ar"] .pdp-condition-card strong {
  direction: ltr;
  unicode-bidi: isolate;
}

html[lang="ar"] .pdp-info__title bdi {
  max-width: 100%;
}

/* About sample: collage left/copy right; team and contact grids follow RTL naturally. */
html[lang="ar"] .about-founder__label {
  text-align: end;
}

html[lang="ar"] .about-process div {
  direction: rtl;
  flex-wrap: wrap;
}

html[lang="ar"] .about-card,
html[lang="ar"] .about-team__facts span,
html[lang="ar"] .about-qualification,
html[lang="ar"] .about-contact__item,
html[lang="ar"] .about-contact__item > div {
  min-width: 0;
  text-align: start;
}

html[lang="ar"] .about-contact__item strong,
html[lang="ar"] .about-contact__item em {
  max-width: 100%;
  overflow-wrap: anywhere;
}

html[lang="ar"] .about-contact__item:nth-child(3) strong,
html[lang="ar"] .about-contact__item:nth-child(4) em {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

/* Contact sample: copy stays right and the original map card stays left and unchanged. */
html[lang="ar"] body.contact-page .contact-grid {
  align-items: start;
}

html[lang="ar"] .contact-button--primary {
  padding-right: 0;
  padding-left: 0;
  padding-inline: 24px 10px;
}

html[lang="ar"] .contact-item > div,
html[lang="ar"] .contact-map__caption > div {
  text-align: start;
}

html[lang="ar"] .contact-item strong,
html[lang="ar"] .contact-item div > span,
html[lang="ar"] .contact-map__caption strong,
html[lang="ar"] .contact-map__caption span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Blog index: text can grow vertically while all media keeps the English crop and height. */
html[lang="ar"] .blog-card__tag {
  right: 12px;
  left: auto;
  max-width: calc(100% - 24px);
  text-align: start;
}

html[lang="ar"] .blog-card__body {
  height: auto;
  min-height: 188px;
}

html[lang="ar"] .blog-card h2,
html[lang="ar"] .blog-card__source,
html[lang="ar"] .blog-card__excerpt,
html[lang="ar"] .blog-card__read {
  max-width: 100%;
  overflow-wrap: break-word;
}

html[lang="ar"] .blog-filters {
  max-width: 100%;
}

.ar-preview-banner {
  right: 16px;
  left: auto;
  text-align: right;
}

@media (min-width: 1280px) and (max-width: 1599.98px) {
  html[lang="ar"] .catalog-promise {
    padding-block: 12px;
  }

  html[lang="ar"] .catalog-promise h2 {
    margin-bottom: 10px;
  }

  html[lang="ar"] .catalog-promise dl {
    gap: 6px;
  }

  html[lang="ar"] .catalog-promise__button {
    margin-top: 6px;
  }
}

@media (max-width: 1279.98px) {
  html[lang="ar"] .nav-submenu {
    padding-right: 0;
    padding-left: 0;
    padding-block: 0 8px;
    padding-inline-start: 16px;
  }
}

@media (max-width: 767.98px) {
  html[lang="ar"] body {
    max-width: 100%;
  }

  html[lang="ar"] h1,
  html[lang="ar"] h2,
  html[lang="ar"] h3,
  html[lang="ar"] h4 {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  html[lang="ar"] .hero--figma-crop .hero__copy {
    box-sizing: border-box;
    direction: rtl;
  }

  html[lang="ar"] .hero--figma-crop .hero-stats div {
    padding: 8px 4px 0;
    border-right: 0;
    border-inline-end: 0;
    text-align: center;
  }

  html[lang="ar"] .hero--figma-crop .hero-stats div:not(:last-child) {
    border-inline-end: 1px solid rgba(255, 255, 255, 0.18);
  }

  html[lang="ar"] .hero--figma-crop .hero-stats strong {
    font-family: var(--ar-preview-font);
    font-size: 18px;
    line-height: 22px;
    unicode-bidi: plaintext;
  }

  html[lang="ar"] .hero--figma-crop .hero-stats span {
    margin-top: 2px;
    overflow: visible;
    font-size: 10px;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  html[lang="ar"] .product-main {
    height: auto;
    min-height: 368.5px;
  }

  html[lang="ar"] .product-card {
    height: auto;
    min-height: 332px;
  }

  html[lang="ar"] .product-card__body {
    min-height: 166px;
  }

  html[lang="ar"] .product-main .price-row,
  html[lang="ar"] .product-card .price-row,
  html[lang="ar"] .catalog-price,
  html[lang="ar"] .pdp-price-box,
  html[lang="ar"] .pdp-quick-spec {
    min-width: 0;
  }

  html[lang="ar"] .product-main .price-row strong,
  html[lang="ar"] .product-card .price-row > span,
  html[lang="ar"] .catalog-price b {
    max-width: 100%;
  }

  html[lang="ar"] .catalog-card__link,
  html[lang="ar"] .catalog-card__body,
  html[lang="ar"] .catalog-meta,
  html[lang="ar"] .catalog-price {
    width: 100%;
    min-width: 0;
  }

  html[lang="ar"] .pdp-quick-spec {
    gap: 8px;
  }

  html[lang="ar"] .pdp-quick-spec__label {
    flex: 1 1 auto;
    white-space: normal;
  }

  html[lang="ar"] .pdp-quick-spec__value {
    flex: 0 1 auto;
    max-width: 48%;
    white-space: normal;
  }

  html[lang="ar"] .pdp-cta,
  html[lang="ar"] .contact-button,
  html[lang="ar"] .about-button,
  html[lang="ar"] .about-contact__actions .whatsapp-pill {
    height: auto;
    min-height: 44px;
    padding-block: 10px;
  }

  html[lang="ar"] .about-process div {
    max-width: 100%;
    flex-wrap: wrap;
  }

  html[lang="ar"] .about-metric,
  html[lang="ar"] .about-team__facts span,
  html[lang="ar"] .about-qualification,
  html[lang="ar"] .contact-item,
  html[lang="ar"] .contact-map__caption {
    min-width: 0;
  }

  html[lang="ar"] .blog-filters {
    direction: rtl;
    max-width: 100%;
    overscroll-behavior-inline: contain;
  }

  html[lang="ar"] .blog-card__body {
    height: auto;
    min-height: 188px;
  }
}

@media (max-width: 430px) {
  html[lang="ar"] .navbar__inner,
  html[lang="ar"] .nav-actions,
  html[lang="ar"] .hero__copy,
  html[lang="ar"] .product-layout,
  html[lang="ar"] .catalog-list__inner,
  html[lang="ar"] .pdp-overview,
  html[lang="ar"] .about-overview__grid,
  html[lang="ar"] .contact-grid,
  html[lang="ar"] .blog-grid {
    min-width: 0;
  }

  html[lang="ar"] bdi,
  html[lang="ar"] .technical-ltr,
  html[lang="ar"] .catalog-card__body > strong,
  html[lang="ar"] .pdp-info__title bdi {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  html[lang="ar"] .tags {
    gap: 6px;
  }

  html[lang="ar"] .specs {
    gap: 6px;
  }

  html[lang="ar"] .specs div + div {
    padding-inline-start: 7px;
  }

  html[lang="ar"] .pdp-price-box {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  html[lang="ar"] .pdp-price-box__left {
    flex: 1 1 170px;
  }

  html[lang="ar"] .pdp-price-box__actions {
    margin-inline-start: auto;
  }

  html[lang="ar"] .pdp-price-box__amount {
    font-size: 17px;
    white-space: nowrap;
  }

  html[lang="ar"] .catalog-price {
    align-items: flex-start;
    gap: 4px 10px;
  }

  html[lang="ar"] .contact-item > div,
  html[lang="ar"] .contact-map__caption > div,
  html[lang="ar"] .about-contact__item > div {
    overflow: hidden;
  }

  .ar-preview-banner {
    right: 10px;
    left: auto;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[lang="ar"] {
    scroll-behavior: auto;
  }

  .ar-preview-toast {
    transition: none;
  }
}

@media (max-width: 767.98px) {
  html[lang="ar"] .blog-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    max-width: 100%;
    overflow: visible;
  }

  html[lang="ar"] .category-card,
  html[lang="ar"] .category-card a,
  html[lang="ar"] .product-category,
  html[lang="ar"] .product-category a {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html[lang="ar"] .detail-content .ar-table-scroll {
    max-width: 100%;
    overflow-x: auto;
  }

  html[lang="ar"] .detail-content .ar-table-scroll table {
    max-width: none;
  }
}
