/*
 * almada-rtl.css
 * RTL (Right-to-Left) overrides for Arabic layout.
 * Loaded automatically when is_rtl() returns true.
 */

/* ============================================================
   GLOBAL DIRECTION
   ============================================================ */
body,
.site,
.site-content,
.entry-content,
.woocommerce {
  direction: rtl;
  text-align: right;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-navigation ul {
  padding-right: 0;
  padding-left: 0;
}
.main-navigation ul li {
  float: right;
}
.main-navigation ul ul {
  right: 0;
  left: auto;
}

/* Kadence header items */
.header-navigation .menu > li {
  margin-left: 0;
  margin-right: 0;
}

/* ============================================================
   SIDEBAR & WIDGETS
   ============================================================ */
.widget ul {
  padding-right: 1em;
  padding-left: 0;
}

/* ============================================================
   WOOCOMMERCE RTL SPECIFICS
   ============================================================ */

/* Breadcrumb direction */
.woocommerce-breadcrumb {
  direction: rtl;
  text-align: right;
}

/* Sale badge – RTL position */
.woocommerce ul.products li.product .onsale {
  right: 14px !important;
  left: auto !important;
}
.woocommerce span.onsale {
  right: 0;
  left: auto;
}

/* Cart table */
.woocommerce table.shop_table {
  direction: rtl;
}
.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
  text-align: right;
}

/* Product thumbnails in cart */
.woocommerce table.shop_table .product-thumbnail {
  text-align: center !important;
}

/* Cart remove button position */
.woocommerce table.shop_table .product-remove {
  text-align: center !important;
}

/* Cart collaterals – float RTL */
.woocommerce .cart-collaterals .cart_totals {
  float: none;
}
.woocommerce .cross-sells {
  float: none;
}

/* Checkout form direction */
.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
  direction: rtl;
  text-align: right;
}
.woocommerce-checkout .form-row label {
  display: block;
  text-align: right;
}

/* Order review table */
.woocommerce-checkout #order_review table {
  direction: rtl;
}

/* My account nav */
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  text-align: right;
  border-right: 3px solid transparent;
  border-left: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  border-right-color: var(--almada-olive-600);
  border-left-color: transparent;
}

/* Quantity input */
.woocommerce form .quantity .input-text {
  direction: ltr; /* numbers always LTR */
  text-align: center;
}

/* Star rating RTL */
.star-rating {
  direction: rtl;
}

/* WC notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  direction: rtl;
  text-align: right;
}
.woocommerce-message::before,
.woocommerce-info::before {
  float: none;
  margin-right: 0;
  margin-left: 12px;
}

/* Product loop: image on right, info on right */
.woocommerce ul.products li.product {
  text-align: right;
}

/* Tabs RTL */
.woocommerce-tabs ul.tabs {
  direction: rtl;
}

/* Pagination RTL */
.woocommerce-pagination {
  direction: rtl;
}

/* Widget area – list markers */
.widget_product_categories ul li,
.widget_product_search,
.widget_recent_entries ul li {
  direction: rtl;
  text-align: right;
}

/* Search form */
.widget_product_search input[type="search"],
.widget_product_search input[type="text"] {
  direction: rtl;
  text-align: right;
}

/* Price filter slider */
.widget_price_filter .price_slider_wrapper {
  direction: ltr; /* sliders always LTR */
}
.widget_price_filter .price_label {
  direction: rtl;
  text-align: right;
}

/* ============================================================
   KADENCE RTL FIXES
   ============================================================ */

/* Kadence columns */
.wp-block-kadence-column {
  direction: rtl;
}

/* Kadence icon list */
.kb-icon-list li {
  direction: rtl;
  text-align: right;
}

/* Kadence accordion */
.kt-accordion-header-wrap {
  direction: rtl;
  text-align: right;
}

/* ============================================================
   FLOAT & MARGIN FLIPS
   ============================================================ */
.alignleft  { float: right !important; margin: 0 0 1em 1em !important; }
.alignright { float: left  !important; margin: 0 1em 1em 0 !important; }

/* ============================================================
   TYPOGRAPHY RTL ADJUSTMENTS
   ============================================================ */
p, li, td, th, label, input, textarea, select {
  direction: rtl;
}

/* Numbers and prices stay LTR inside RTL text */
.woocommerce .price .amount,
.woocommerce .price bdi,
.almada-stat-num,
.almada-product-price,
.price-main {
  direction: ltr;
  display: inline-block;
}

/* ============================================================
   FOOTER RTL
   ============================================================ */
.site-footer .widget-area {
  direction: rtl;
  text-align: right;
}
.site-footer ul {
  padding-right: 0;
  list-style-position: inside;
}
