/* Payment Methods - Only active gateway gets background */
#add_payment_method #payment,
.woocommerce-cart #payment,
.woocommerce-checkout #payment {
  background: transparent !important;
  border-radius: 5px;
}

/* Keep the popular blog articles visible as four fixed cards. */
.most-viewed-articles .swiper-normal-article-slider .swiper-slide {
  width: calc((100% - 45px) / 4) !important;
  flex-shrink: 0;
}

/* Remove background from all payment methods by default */
#add_payment_method .wc_payment_methods li,
.woocommerce-cart .wc_payment_methods li,
.woocommerce-checkout .wc_payment_methods li {
  background: transparent !important;
  border-radius: 5px;
}

/* Active payment method background - using class added by JavaScript */
#add_payment_method .wc_payment_methods li.payment-method-active,
.woocommerce-cart .wc_payment_methods li.payment-method-active,
.woocommerce-checkout .wc_payment_methods li.payment-method-active {
  background: rgba(129, 110, 153, 0.14) !important;
  border-radius: 5px;
  padding: 15px;
}

/* Reusable toast styles for theme */
.shopfa-toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 99999; pointer-events: none; }
.shopfa-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 200px; max-width: 360px; color: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.15); font-family: IRANSans, Tahoma, sans-serif; font-size: 14px; direction: rtl; text-align: right; }
.shopfa-toast.success { background: #10b981; }
.shopfa-toast.error { background: #ef4444; }
.shopfa-toast .shopfa-toast-text { flex: 1; }
.shopfa-toast .shopfa-toast-close { background: transparent; border: none; color: rgba(255,255,255,0.95); font-size: 16px; cursor: pointer; padding: 4px; border-radius: 4px; }
.shopfa-toast-close:focus { outline: 2px solid rgba(255,255,255,0.2); }
.shopfa-toast { animation: shopfaToastIn 0.28s ease; }
@keyframes shopfaToastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Decorative heading bar for footer widget titles */
.footer-menu-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.arantheme-heading-decorative {
  display: inline-block;
  width: 16px;
  height: 8px;
  min-width: 3px;
  min-height: 8px;
  background-color: #FFAA00;
  border-radius: 12px;
  transform: rotate(0deg);
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  text-indent: -9999px;
  vertical-align: middle;
}

/* Make footer menus right-to-left and aligned */
.footer-menu {
  direction: rtl;
  text-align: right;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-menu li {
  display: block;
  margin-bottom: 8px;

/* Make all footer menu items the same visual width and center text */
.footer-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-menu li a {
  display: inline-block;
  min-width: 140px; /* equalize width */
  max-width: 220px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-menu li a.small { min-width: 110px; }
  position: relative;
}
.footer-menu li a {
  display: block;
  text-align: right;
  color: inherit;
  padding: 2px 0;
}

/* Submenu (nested ul) should appear stacked under parent and inherit RTL */
.footer-menu li ul,
.footer-menu li .sub-menu {
  display: block;
  list-style: none;
  margin: 4px 0 8px 0;
  padding: 0 0 0 0;
}
.footer-menu li ul li,
.footer-menu li .sub-menu li {
  margin-bottom: 6px;
}

/* Indent submenu items slightly from the parent title */
.footer-menu li ul li a,
.footer-menu li .sub-menu li a {
  padding-right: 12px;
  padding-left: 0;
}

/* Force column content (title + menu) to align right within footer columns */
.footer-middle .col-lg-2,
.footer-middle .col-md-3,
.footer-middle .col-6 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.footer-middle .footer-menu-title {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.footer-middle .footer-menu {
  padding-right: 0;
  width: 100%;
}

/* Ensure consistent typography, spacing and alignment across footer columns */
.footer-middle .col-lg-2,
.footer-middle .col-md-3,
.footer-middle .col-6 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  padding-left: 15px;
  padding-right: 15px;
}

.footer-middle .footer-menu-title {
  justify-content: flex-start;
  width: 100%;
  font-size: 16px;
  font-weight: 700;
  color: #222222;
  margin-bottom: 12px;
  text-align: left;
}

.footer-middle .footer-menu {
  margin: 0;
  padding: 0;
}

.footer-menu li {
  margin-bottom: 8px;
}

.footer-menu li a {
  display: block;
  padding: 4px 0;
  color: #6b6b6b;
  font-size: 14px;
  line-height: 1.6;
}

/* Decorative bar spacing to be consistent */
.footer-menu-title .arantheme-heading-decorative {
  margin-right: 8px;
  margin-left: 0;
}

.footer-trust-symbols .footer-trust-item img,
.footer-trust-symbols .footer-trust-item a img {
  height: 70px !important;
  width: auto !important;
  max-width: 100% !important;
  display: inline-block;
}

/* Ensure both columns use same visual alignment on small screens */
@media (max-width: 767.98px) {
  .footer-middle .col-lg-2,
  .footer-middle .col-md-3,
  .footer-middle .col-6 {
    align-items: flex-start;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
  }
  .footer-menu-title { justify-content: flex-start; }
  .footer-menu { direction: ltr; }
}
