/**
 * RTL Overrides — Arabic (ar)
 * Cargado condicionalmente cuando is_rtl() es true.
 * Invierte propiedades direccionales del tema para soporte RTL completo.
 */

/* ==================================================
   BASE DIRECTION
================================================== */

body {
  direction: rtl;
  text-align: right;
}

/* ==================================================
   TOPBAR
================================================== */

.topbar__country-wrap {
  margin-right: 0;
  margin-left: 8px;
}

.topbar__sep {
  margin: 0 4px;
}


/* ==================================================
   HEADER MAIN
================================================== */

.header-icon__badge {
  right: auto;
  left: -6px;
}

.header-wishlist-badge {
  right: auto;
  left: -6px;
}

/* ==================================================
   MEGA MENU
================================================== */

.mega-menu__filters {
  text-align: right;
}

.mega-menu__brands {
  flex-direction: row-reverse;
}

.mega-menu__brand-row {
  flex-direction: row-reverse;
}

.mega-menu__brand-logo {
  margin-right: 0;
  margin-left: auto;
}

/* ==================================================
   MOBILE DRAWER
================================================== */

.mobile-drawer {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer__head {
  flex-direction: row-reverse;
}

.mobile-nav__toggle {
  flex-direction: row-reverse;
  text-align: right;
}

.mobile-nav__chevron {
  margin-right: auto;
  margin-left: 0;
}

.mobile-nav__brand-row {
  flex-direction: row-reverse;
}

/* ==================================================
   SEARCH OVERLAY
================================================== */

.search-overlay__bar {
  flex-direction: row-reverse;
}

.search-overlay__input-wrap {
  flex-direction: row-reverse;
}

.search-overlay__icon {
  right: auto;
  left: 12px;
}

.search-overlay__input {
  padding-left: 12px;
  padding-right: 36px;
  text-align: right;
}

/* ==================================================
   HERO SLIDER
================================================== */

.hero__content {
  text-align: center;
}

/* Arrows prev/next invertidos */
.hero__arrow--prev {
  left: auto;
  right: 18px;
}

.hero__arrow--next {
  right: auto;
  left: 18px;
}

.hero__dots {
  direction: ltr; /* dots siempre de izquierda a derecha */
}

/* ==================================================
   PRODUCT CARD
================================================== */

.wc-card__body {
  text-align: right;
}


.wc-card__cta {
  text-align: right;
}

/* ==================================================
   CART DRAWER
================================================== */

.cart-drawer {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-item {
  flex-direction: row-reverse;
}

.cart-item__details {
  text-align: right;
}

.cart-item__actions {
  flex-direction: row-reverse;
}

/* ==================================================
   PRODUCT CAROUSELS / SLIDERS
================================================== */

/* Arrows — keep natural LTR order (‹ left, › right) in RTL */

/* ==================================================
   HOME — PROMO HTG CAROUSEL
================================================== */

/* Swap físico de posiciones — el bidi mirroring del browser invierte los íconos ‹/› automáticamente */
.promo-htg-prev {
  left: auto;
  right: 20px;
}
.promo-htg-next {
  right: auto;
  left: 20px;
}

/* ==================================================
   SINGLE PRODUCT
================================================== */

/* Gallery arrows: swap físico de posiciones — bidi mirroring invierte los íconos */
.pdp-gallery__arrow--prev {
  left: auto;
  right: 0;
}
.pdp-gallery__arrow--next {
  right: auto;
  left: 0;
}

.pdp-brand {
  display: block;
  text-align: right;
}

.pdp-info {
  text-align: right;
}

.pdp-accordion__toggle {
  text-align: right;
}

/* ==================================================
   FAQ PAGE
================================================== */

.faq-item__toggle {
  text-align: right;
}

/* ==================================================
   POLICIES PAGE
================================================== */

.policies-page {
  text-align: right;
}

.policies-section__body {
  text-align: right;
}

/* ==================================================
   BLOG / POSTS
================================================== */

.post-article__header {
  text-align: right;
}

.post-article__body {
  text-align: right;
}

.post-article__cats {
  flex-direction: row-reverse;
}

/* ==================================================
   FOOTER
================================================== */

.site-footer .footer-inner {
  flex-direction: row-reverse;
}

.footer-col {
  text-align: right;
}

/* ==================================================
   NEWSLETTER
================================================== */

.newsletter-figma__grid {
  flex-direction: row-reverse;
}

.newsletter-figma__title,
.newsletter-figma__text {
  text-align: right;
}

.newsletter-figma__form {
  flex-direction: row-reverse;
}

/* ==================================================
   LOGIN POPUP
================================================== */

.login-popup__tabs {
  flex-direction: row-reverse;
}

.login-popup__row {
  flex-direction: row-reverse;
}

.login-popup__input {
  text-align: right;
  direction: rtl;
}

/* Emails y passwords mantienen LTR dentro del campo */
.login-popup__input[type="email"],
.login-popup__input[type="password"] {
  direction: ltr;
  text-align: left;
}

/* ==================================================
   BREADCRUMBS
================================================== */

.breadcrumb {
  flex-direction: row-reverse;
}

.breadcrumb__sep {
  transform: scaleX(-1);
}

/* ── Product reviews (RTL) ──────────────────────────────────────────────── */
.pdp-reviews,
.review-card__content .description p,
.review-card__content p {
  text-align: right;
}
.pdp-reviews-summary {
  margin-left: 0;
  margin-right: 12px;
}
/* Carousel: arrows swap sides and the track scrolls RTL */
.pdp-reviews-carousel {
  flex-direction: row-reverse;
}
.pdp-reviews .commentlist {
  direction: rtl;
}
.review-card__inner {
  text-align: right;
}
.pdp-reviews .comment-form label,
.pdp-reviews .comment-reply-title {
  text-align: right;
}
/* Keep email/name addresses LTR, like the login popup inputs */
.pdp-reviews .comment-form input[type="email"] {
  direction: ltr;
  text-align: left;
}
/* Star glyphs read the same in RTL; keep the bar filling from the start edge */
.pdp-reviews p.stars,
.pdp-reviews .star-rating,
.wc-card__rating {
  direction: ltr;
}


/* ==================================================
   TESTIMONIALS (marquee)
================================================== */

/* En RTL el track se alinea al borde derecho y su desbordamiento cae hacia la
   izquierda, así que el -50% de scrollTestimonials dejaría un hueco vacío a la
   derecha. El bucle debe desplazarse en sentido contrario (+50%). */
.testimonials-track {
  animation-name: scrollTestimonialsRtl;
}

@keyframes scrollTestimonialsRtl {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* Las estrellas se leen igual en ambas direcciones; se mantienen LTR como en la
   ficha de producto para que la fila crezca desde el mismo borde. */
.testimonial-stars {
  direction: ltr;
}
