/* Persian RTL overrides for Ebukz template
 *
 * فونت از next/font لود می‌شود (--font-iran-sans روی <html>).
 * اینجا @font-face تکراری نداریم تا Regular/Bold دو خانوادهٔ جدا دیده نشوند.
 */

:root {
  --title-font: var(--font-iran-sans), Tahoma, sans-serif !important;
  --body-font: var(--font-iran-sans), Tahoma, sans-serif !important;
}

html {
  direction: rtl;
}

body {
  font-family: var(--font-iran-sans), Tahoma, sans-serif !important;
  text-align: right;
}

.slick-slider,
.vs-carousel {
  direction: ltr;
}

/* Keep carousel controls in visual LTR order (← left, → right) */
.sec-btns,
.sec-btns2,
.arraw-area,
.arraw-area .d-flex {
  direction: ltr;
}

/* Don't mirror carousel arrow icons */
.arraw-area .fa-arrow-left,
.arraw-area .fa-arrow-right,
.sec-btns .fa-arrow-left,
.sec-btns .fa-arrow-right {
  transform: none;
}

.slick-slide {
  direction: rtl;
}

/* Mobile menu: slide in from the right (RTL) */
.vs-menu-wrapper .vs-menu-area {
  left: auto;
  right: -110%;
  border-right: none;
  border-left: 3px solid var(--theme-color);
  margin-left: auto;
}

.vs-menu-wrapper.vs-body-visible .vs-menu-area {
  left: auto;
  right: 0;
}

.vs-menu-wrapper .vs-menu-toggle {
  right: auto;
  left: 10px;
}

.vs-mobile-menu {
  text-align: right;
}

.vs-mobile-menu ul li a {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* RTL: pack label to the right */
  text-align: right;
  padding: 12px 0 12px 40px; /* room for + on the left */
  gap: 10px;
}

/* Chevron sits just left of the label (not stuck to the far right) */
.vs-mobile-menu ul li a:before {
  content: "\f105"; /* same glyph as English; points into the label */
  order: 1; /* after text → visual left of «خانه» in RTL */
  margin: 0;
  position: relative;
  left: auto;
  right: auto;
  flex-shrink: 0;
  transform: none;
}

.vs-mobile-menu ul li.vs-active > a:before {
  transform: rotate(90deg);
}

.vs-mobile-menu ul li ul li {
  padding-left: 0;
  padding-right: 10px;
}

/* Plus toggle on the left */
.vs-mobile-menu ul .vs-item-has-children > a .vs-mean-expand {
  right: auto;
  left: 0;
}

.main-menu ul,
.vs-mobile-menu ul,
.menu,
.breadcumb-menu,
.header-links ul,
.copyright-menu ul,
.social-links,
.list-style1 ul,
.price-list,
.post-box,
.product-btns,
.header-buttons,
.header-social,
.header-right,
.vs-pagination ul {
  padding-right: 0;
}

.header-search input,
.form-control,
input,
textarea,
select {
  text-align: right;
}

.woocommerce-ordering,
.nice-select {
  text-align: right;
}

/* Keep Font Awesome glyphs LTR so icons don't mirror wrongly */
i[class*="fa-"],
.fab,
.fal,
.far,
.fas,
.fa-solid,
.fa-regular,
.fa-light,
.fa-brands {
  direction: ltr;
  display: inline-block;
}

.fa-angle-right:before {
  content: "\f104";
}

.pagi-btn .fa-arrow-left,
.pagi-btn .fa-arrow-right {
  transform: scaleX(-1);
}

/* Main menu dropdowns: align to the right edge of parent (RTL) */
.main-menu ul.sub-menu,
.main-menu ul.mega-menu,
.menu-style2 ul.sub-menu,
.menu-style2 ul.mega-menu {
  left: auto;
  right: 0;
  text-align: right;
}

.main-menu ul.sub-menu,
.menu-style2 ul.sub-menu {
  left: auto;
  right: -27px;
}

.main-menu ul.sub-menu:before,
.menu-style2 ul.sub-menu:before {
  left: auto;
  right: 34.33px;
}

.main-menu ul.sub-menu li a:before,
.menu-style2 ul.sub-menu li a:before,
.main-menu ul.mega-menu > li > ul > li > a:before,
.menu-style2 ul.mega-menu > li > ul > li > a:before {
  content: "\f104";
  margin: 0 0 0 10px;
}

.main-menu ul.sub-menu li.menu-item-has-children > a:after,
.menu-style2 ul.sub-menu li.menu-item-has-children > a:after {
  content: "\f104";
  float: left;
}

.main-menu ul.sub-menu li ul.sub-menu,
.menu-style2 ul.sub-menu li ul.sub-menu,
.main-menu ul.sub-menu li ul.sub-menu li ul,
.menu-style2 ul.sub-menu li ul.sub-menu li ul {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 20px;
}

.main-menu ul.mega-menu,
.menu-style2 ul.mega-menu {
  text-align: right;
}

.header-dropdown ul.dropdown-menu {
  margin-left: 0 !important;
  margin-right: -15px !important;
}

.header-dropdown ul.dropdown-menu:before {
  left: auto;
  right: 47px;
}

/* Mini-cart: open next to the cart icon (left side in RTL) */
.header-cart {
  position: relative;
}

.header-cart .widget_shopping_cart {
  right: auto;
  left: 0;
  margin: 20px 0 0 -30px;
  text-align: right;
}

.widget_shopping_cart .mini_cart_item {
  padding: 0 110px 60px 0;
}

.widget_shopping_cart .img {
  left: auto;
  right: 0;
}

.widget_shopping_cart .remove {
  right: auto;
  left: 0;
}

.widget_shopping_cart .subtotal {
  float: left;
  text-align: left;
}

.header-logo img.logo,
.mobile-logo img.logo,
.cta-logo img.logo {
  max-height: 48px;
  width: auto;
}

/* Header search (RTL): space from logo + divider left of categories */
.header-middle .header-search,
.header-layout1.style2 .header-search,
.header-layout1.style3 .header-search {
  margin-right: 40px;
  margin-left: 0;
  padding: 13px 24px 13px 70px;
}

.header-search button,
.header-search .searchBoxTggler {
  right: auto;
  left: 5px;
}

.header-search .dropdown {
  padding-right: 0;
  margin-right: 0;
  padding-left: 20px;
  margin-left: 20px;
}

.header-search .dropdown::before {
  right: auto;
  left: 0;
  background-color: var(--theme-color);
}

.header-search input {
  text-align: right;
  padding-left: 10px;
}

/* Category toggler (RTL): keep gap on the right, move caret to the left */
.header-category .category-toggler {
  text-align: right;
  padding: 20px 40px;
}

.header-category .category-toggler i {
  margin-right: 0;
  margin-left: 10px;
}

.header-category .category-toggler::after {
  right: auto;
  left: 40px;
}

@media (max-width: 1399px) {
  .header-category .category-toggler::after {
    right: auto;
    left: 15px;
  }
}

/*
 * Mobile header bottom (RTL mirror of English):
 * English: [Categories ........ ▾] [☰]
 * RTL:     [☰] [▾ ........ دسته‌بندی‌ها]
 * Keep the drawer toggle as its own button — never overlay Categories.
 */
@media (max-width: 991px) {
  .header-layout1.style2 .menu-inner {
    display: flex;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .header-layout1.style2 .menu-inner .header-category {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
  }

  .header-layout1.style2 .menu-inner .menu-area {
    position: static;
    transform: none;
    margin: 0 !important;
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
  }

  .header-layout1.style2 .vs-menu-toggle,
  .header-layout1 .vs-menu-toggle {
    margin: 0;
    height: auto;
    min-height: 50px;
    align-self: stretch;
  }

  .header-category .category-toggler {
    padding: 20px 15px;
  }

  .header-category .category-toggler::after {
    left: 15px;
  }
}

@media (max-width: 575px) {
  .header-layout1.style2 .menu-inner .menu-area {
    margin-left: 0 !important;
  }
}

/* Category list items: keep icon + label together on the right */
.header-category .vs-box-nav ul li a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
  gap: 14px;
}

.header-category .vs-box-nav ul li a img {
  margin-right: 0;
  margin-left: 0;
  flex-shrink: 0;
}

.header-category .vs-box-nav ul li a::after {
  left: auto;
  right: 0;
}

/* Hero slider (index-3): keep fade working; only kill stuck text animation */
.hero-layout3 .hero-title,
.hero-layout3 .hero-text,
.hero-layout3 .offer-price,
.hero-layout3 .vs-btn {
  animation: none !important;
}

.hero-layout3 .slick-current .hero-title,
.hero-layout3 .slick-current .hero-text,
.hero-layout3 .slick-current .offer-price,
.hero-layout3 .slick-current .vs-btn,
.hero-layout3 .slick-current .hero-img,
.hero-layout3 .slick-current .hero-img img {
  opacity: 1 !important;
  visibility: visible !important;
}

/* LTR template pads left for category sidebar; in RTL sidebar is on the right */
.hero-layout3 .hero-item {
  padding: 100px 335px 100px 0 !important;
  left: auto !important;
  right: auto !important;
}

.hero-layout3 .hero-content {
  padding-left: 0;
  padding-right: 0;
  text-align: right;
}

.hero-layout3 .offer-content .vs-btn,
.hero-layout3 .hero-content .vs-btn {
  display: block;
  width: max-content;
  margin-left: 0;
  margin-right: auto;
}

/* Slick fade: stack slides; do not force float/relative or only slide 1 shows */
.hero-layout3 .slick-fade .slick-slide {
  float: none !important;
  display: block !important;
}

.hero-layout3 .slick-fade .slick-slide:not(.slick-active) {
  opacity: 0 !important;
  z-index: 1;
  pointer-events: none;
}

.hero-layout3 .slick-fade .slick-slide.slick-active {
  opacity: 1 !important;
  z-index: 2;
  pointer-events: auto;
}

@media (max-width: 1399px) {
  .hero-layout3 .hero-item {
    padding: 80px 0 !important;
    left: 0 !important;
    right: 0 !important;
  }
}

@media (max-width: 1299px) {
  .hero-layout3 .hero-item {
    padding: 0 !important;
  }
}

/* Hero reveal (index/index-2): don't keep section off-screen if ScrollTrigger stalls */
.hero-layout1,
.hero-layout1 .hero-item {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Popup search: keep text clear of the magnifying glass */
.popup-search-box form input {
  text-align: right;
  padding-left: 30px;
  padding-right: 70px;
}

.popup-search-box button.searchClose {
  right: auto;
  left: 40px;
}

/* Contact info: space from wishlist (heart) icon */
.header-buttons {
  gap: 0;
}

.header-buttons > a.wishlist,
.header-buttons .vs-icon.wishlist {
  margin-right: 22px;
  margin-left: 22px;
}

.header-buttons .header-info {
  margin-right: 0;
  padding-right: 0;
  margin-left: 0;
  padding-left: 0;
  gap: 16px;
}

.header-buttons .header-info::after {
  display: none;
}

.header-buttons .header-info_icon,
.header-layout1.style2 .header-buttons .header-info_icon,
.header-layout1.style3 .header-buttons .header-info_icon,
.header-info .header-info_icon,
.header-info.style2 .header-info_icon {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.header-info {
  gap: 16px;
}

/* Horizontal product cards: space between text and image (RTL) */
.product-style1.style2 .product-img {
  margin-right: 0;
  margin-left: 20px;
}

.product-style1.style2 .product-content {
  text-align: right;
}

/* Feature cards (Free shipping, etc.): right-align text next to icon */
.feature-style1 {
  text-align: right;
}

.feature-style1 .feature-icon {
  margin-right: 0;
  margin-left: 20px;
}

.feature-style1 .feature-body,
.feature-style1 .feature-content {
  text-align: right;
  width: 100%;
}

.feature-title,
.feature-text {
  text-align: right;
}

/* Parent columns use Bootstrap text-center — override for feature cards */
.col-lg-4:has(.feature-style1),
.col-md-6:has(.feature-style1) {
  text-align: right !important;
}

/* Product cards under images */
.product-style1 .product-content {
  text-align: right;
}

/* Sidebar recent posts: space between text and left edge of image */
.recent-post .media-img,
.recent-product .media-img,
.product-sidebar .recent-post .media-img {
  margin-right: 0;
  margin-left: 20px;
}

.recent-post .media-body,
.recent-product .media-body,
.product-sidebar .media-body {
  text-align: right;
}

/* Sidebar "View more": keep on visual left (like English demo) */
.product-sidebar .vs-btn {
  display: block;
  width: max-content;
  margin-left: 0;
  margin-right: auto;
}

/* Testimonials: gap between avatar and name (RTL) */
.vs-testi__image {
  margin-right: 0;
  margin-left: 20px;
}

/* Quote icon on the right of the highlight text */
.vs-testi__text .text-highlight {
  padding-left: 0;
  padding-right: 40px;
}

.vs-testi__text .text-highlight img.icon {
  left: auto;
  right: 0;
}

@media (max-width: 767px) {
  .vs-testi__style1 .vs-testi__image,
  .vs-testi__style2 .vs-testi__image {
    margin: 0 auto 15px auto;
  }
}

/* Blog cards: Read more on left, share on right; flip arrow + spacing */
.vs-blog .btn-area {
  flex-direction: row-reverse;
}

.vs-blog .btn-area .vs-btn > i {
  margin-left: 0;
  margin-right: 10px;
  transform: scaleX(-1);
}

/* Newsletter field (RTL): placeholder off the right edge */
.cta-layout1 .search-btn {
  align-items: center;
  padding: 4px;
}

.cta-layout1 .search-btn .form-control {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 24px 0 12px;
}

/* Subscribe button: stay inside the white pill, not clipped/overlapping */
.cta-layout1 .search-btn .vs-btn {
  position: relative;
  top: auto;
  right: auto;
  transform: none;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  height: 52px;
  margin: 0;
  padding: 0 28px;
  border-radius: 26px;
  line-height: 1;
  white-space: nowrap;
}

.cta-layout1 .search-btn .vs-btn i {
  margin-right: 0;
  margin-left: 8px;
}

/* Newsletter heading: gap between mail icon and text in RTL */
.newsletter-inner .newsletter-icon {
  margin-right: 0;
  margin-left: 20px;
}

/* Footer: titles + menu links with chevrons on the right */
.footer-widget,
.footer-widget.widget_nav_menu,
.footer-widget .widget_title {
  text-align: right;
}

.footer-layout1 .title-shape {
  left: auto;
  right: 0;
}

.footer-widget .widget_title::before {
  left: auto;
  right: 0;
}

.footer-widget.widget_nav_menu a {
  justify-content: flex-start;
  gap: 8px;
}

.footer-widget.widget_nav_menu a:hover {
  transform: translateX(-5px);
}

/* Footer contact list: icon on the right of text */
.footer-layout1 .list-style1 ul li {
  padding-left: 0;
  padding-right: 30px;
  text-align: right;
}

.footer-layout1 .list-style1 ul li i {
  left: auto;
  right: 0;
}

/* Blog meta: space between icons and labels */
.blog-meta a i,
.blog-meta span i {
  margin-right: 0;
  margin-left: 8px;
}

/* Offer / banner cards: "Buy now" on visual left */
.banner-layout1 .offer-content .vs-btn,
.offer-style1 .offer-content .vs-btn,
.offer-layout1 .offer-content .vs-btn {
  display: block;
  width: max-content;
  margin-left: 0;
  margin-right: auto;
}

.product-author,
.newsletter-text,
.copyright-text,
.breadcumb-title,
.widget_title,
.sec-title,
.title-anime__title,
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  letter-spacing: normal;
}

.product-title,
.product-title a,
.product-style1 .product-title,
.product-style1 .product-title a,
.book-title-wrap,
.book-title-clamp,
.page-breadcrumb,
.page-breadcrumb a,
.page-breadcrumb span {
  font-family: var(--font-iran-sans), Tahoma, sans-serif !important;
}

.product-style1 .product-title,
.product-style1 .product-title a,
.product-title.book-title-wrap,
.product-title.book-title-wrap a {
  font-weight: 400 !important;
}

.product-about .product-title,
.product-about .product-title--en {
  font-family: var(--font-iran-sans), Tahoma, sans-serif !important;
  font-weight: 500 !important;
}

.product-about .product-title--fa,
.product-about .product-title-en {
  font-family: var(--font-iran-sans), Tahoma, sans-serif !important;
  font-weight: 400 !important;
}

/* Persian titles need more line-box than Latin (line-height:100% clips into border-line) */
.product-title {
  line-height: 1.45;
  padding-bottom: 2px;
}

/* Template uses kids-layout1 but CSS was Kids-layout1 — pin divider under cards */
.kids-layout1 .border-line,
.Kids-layout1 .border-line,
.romance-layout1 .border-line {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 0;
  max-width: 85%;
  transform: translateX(-50%);
}

/* Keep SplitText word wrappers from breaking Persian joining */
.title-anime__title .split-word {
  display: inline-block;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Force site font everywhere (text only — icons keep Font Awesome)
   منبع واحد: همان فونت body/breadcrumb = --font-iran-sans (IRANSansXFaNum)
   -------------------------------------------------------------------------- */
html body,
html body button,
html body input,
html body select,
html body textarea,
html body optgroup,
html body .vs-btn,
html body .icon-btn,
html body .main-menu,
html body .main-menu a,
html body .main-menu ul li a,
html body .vs-mobile-menu,
html body .vs-mobile-menu a,
html body .breadcumb-menu,
html body .breadcumb-menu a,
html body .breadcumb-title,
html body .page-breadcrumb,
html body .page-breadcrumb a,
html body .page-breadcrumb span,
html body .product-price,
html body .product-price del,
html body .price-list,
html body .price-list li,
html body .product-author,
html body .product-title,
html body .product-title a,
html body .product_meta,
html body .product_meta a,
html body .product_meta span,
html body .product-rating__total,
html body .widget_categories,
html body .widget_categories a,
html body .widget_categories li,
html body .widget_nav_menu a,
html body .footer-widget,
html body .footer-widget a,
html body .footer-widget p,
html body .category-style1,
html body .category-style1 a,
html body .category-style1 .category-title,
html body .categori-style1,
html body .categori-style1 a,
html body .cat-card,
html body .cat-card a,
html body .sec-title,
html body .title-anime__title,
html body .newsletter-text,
html body .copyright-text,
html body .form-control,
html body .nice-select,
html body .qty-input,
html body .nav-pills .nav-link,
html body .pagination,
html body .vs-pagination,
html body .vs-pagination a,
html body .vs-pagination button,
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body p,
html body span:not(.star):not(.star-rating),
html body a,
html body li,
html body label,
html body strong,
html body b,
html body small,
html body .text {
  font-family: var(--font-iran-sans), Tahoma, sans-serif !important;
}

/* Restore icon fonts after the global text override */
html body i,
html body i[class*="fa"],
html body .fa,
html body .fas,
html body .far,
html body .fal,
html body .fab,
html body .fad,
html body .fa-solid,
html body .fa-regular,
html body .fa-light,
html body .fa-brands,
html body [class^="fa-"]:before,
html body [class*=" fa-"]:before,
html body .star-rating,
html body .star-rating:before,
html body .star-rating span:before {
  font-family: var(--icon-font) !important;
}

