/**
 * Baazahan visual system.
 * Consistent Persian font family, 7px component corners, logical spacing and
 * responsive safeguards. Loaded last so plugin and WooCommerce views inherit
 * the same interface without duplicating rules in every template.
 */
:root{
  --ba-font:"IRANSansXFaNum",Tahoma,Arial,sans-serif;
  --ba-radius:7px;
  --ba-space-1:4px;
  --ba-space-2:8px;
  --ba-space-3:12px;
  --ba-space-4:16px;
  --ba-space-5:24px;
  --ba-space-6:32px;
  --ba-space-7:48px;
  --ba-space-8:64px;
}

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

body,
body :where(button,input,select,textarea,option),
.leaflet-container,
.leaflet-container :where(button,input,select,textarea){
  font-family:var(--ba-font)!important;
}

body{
  direction:rtl;
  text-align:right;
  font-synthesis:none;
  overflow-wrap:break-word;
}

body :where(.site-shell,.ba-logistics,.woocommerce,.woocommerce-page){
  direction:rtl;
  text-align:right;
}

/* A single corner language across every public component. */
body .site-shell *,
body .ba-logistics *,
body .woocommerce *,
body.woocommerce-page *{
  border-radius:var(--ba-radius)!important;
}

body .site-shell .utility-bar{
  border-radius:0!important;
}

body .site-shell *::before,
body .site-shell *::after,
body .ba-logistics *::before,
body .ba-logistics *::after,
body .woocommerce *::before,
body .woocommerce *::after,
body.woocommerce-page *::before,
body.woocommerce-page *::after{
  border-radius:var(--ba-radius)!important;
}

body :where(.site-shell,.ba-logistics,.woocommerce,.woocommerce-page) :where(
  article,aside,section,nav,form,figure,img,button,input,select,textarea,
  [class*="-card"],[class*="-modal"],[class*="-dialog"],[class*="-panel"],
  [class*="-box"],[class*="-badge"],[class*="-pill"],[class*="-chip"],
  [class*="-control"],[class*="-tab"],[class*="-item"],[class*="-popover"],
  [class*="-preview"],[class*="-visual"],[class*="-image"],[class*="-logo"],
  [class*="-icon"],[class*="-option"],[class*="-result"],[class*="-field"],
  [class*="-menu"]
){
  border-radius:var(--ba-radius)!important;
}

body .site-shell .hero-track img{
  border-radius:0!important;
}

body :where(h1,h2,h3,h4,h5,h6),
body :where(strong,b,.button,button,th){
  font-family:var(--ba-font);
}

body :where(h1,h2,h3,h4,h5,h6){
  margin-block-start:0;
  color:inherit;
  text-wrap:balance;
}

body .site-shell :where(input,select,textarea),
body .ba-logistics :where(input,select,textarea),
body .woocommerce :where(input,select,textarea){
  min-height:44px;
}

body :where(.site-shell,.ba-logistics,.woocommerce,.woocommerce-page) :where(a,button,input,select,textarea):focus-visible{
  outline:3px solid rgba(237,28,43,.3);
  outline-offset:3px;
}

body :where(.site-shell,.ba-logistics,.woocommerce,.woocommerce-page) :where(main,header,footer,section,article,aside,nav,form,figure,div){
  min-width:0;
}

body :where(.site-shell,.ba-logistics,.woocommerce,.woocommerce-page) :where(img,video,canvas,iframe,svg){
  max-width:100%;
}

body :where(.site-shell,.ba-logistics,.woocommerce,.woocommerce-page) :where(img,video,canvas){
  height:auto;
}

.iconly{
  display:inline-block;
  flex:0 0 auto;
  width:1.5rem;
  height:1.5rem;
  overflow:visible;
  color:inherit;
  vertical-align:middle;
}

.iconly-lg{width:2rem;height:2rem}
.iconly-xl{width:2.5rem;height:2.5rem}
.iconly-sm{width:1.125rem;height:1.125rem}
.iconly-xs{width:.9375rem;height:.9375rem}

.button .iconly,
button .iconly,
a .iconly{
  pointer-events:none;
}

.breadcrumb-separator{
  display:inline-grid;
  place-items:center;
  color:currentColor;
}

/* Editorial ticks use the local Iconly Tick Square vector as a mask. */
.category-content-highlight::after,
.category-buy-checklist li::before{
  content:""!important;
  display:block!important;
  background:currentColor!important;
  -webkit-mask:url("../icons/tick-square.svg") center/contain no-repeat;
  mask:url("../icons/tick-square.svg") center/contain no-repeat;
}

.category-content-highlight::after{
  width:30px!important;
  height:30px!important;
  color:var(--red,#ed1c2b);
}

.category-buy-checklist li::before{
  width:18px!important;
  height:18px!important;
  color:var(--green,#0e9f6e);
}

.container{
  width:min(calc(100% - 40px),var(--container,1240px));
  margin-inline:auto;
}

@media (min-width:1025px){
  body .catalog-price-page .catalog-filter-sidebar{
    top:var(--catalog-filter-top,89px);
  }
  body.admin-bar .catalog-price-page .catalog-filter-sidebar{
    top:var(--catalog-filter-top,121px);
  }
}

body .factory-single>.product-section-nav{
  position:sticky;
  top:var(--factory-nav-top,0px);
  z-index:60;
}

body.factory-nav-stuck .factory-single>.product-section-nav{
  z-index:110;
}

@media (min-width:1025px){
  body .factory-single .factory-brand-contact{
    position:sticky;
    top:calc(var(--factory-nav-top,0px) + 10px);
    z-index:120;
    align-self:start;
  }
  body.admin-bar .factory-single .factory-brand-contact{
    top:calc(var(--factory-nav-top,32px) + 10px);
  }
}

body.factory-nav-stuck .site-header{
  top:calc(var(--factory-nav-top,0px) + var(--factory-nav-height,0px));
}

body .factory-single :is(#factory-prices,#factory-about,#factory-products,#factory-contact,#consultation){
  scroll-margin-top:calc(var(--factory-nav-top,0px) + var(--factory-nav-height,0px) + var(--factory-header-height,80px) + 10px);
}

.section-heading{
  gap:var(--ba-space-4);
  margin-bottom:clamp(var(--ba-space-4),2vw,var(--ba-space-5));
}

.why-section .section-heading{
  justify-content:center;
  align-items:center;
  text-align:center;
}

.section-heading p,
.content-card>p,
.article-prose p,
.category-editorial-body p{
  max-width:72ch;
}

body .site-shell :where(.button,button:not([class*="dot"]):not([data-slider-dot])),
body .ba-logistics :where(.button,button:not([class*="dot"]):not([data-slider-dot])){
  min-height:44px;
}

body :where(.site-shell,.ba-logistics) :where(table){
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

:where(.side-card,.calculator-card,.content-card,.product-summary,.table-card,.factory-card,.article-card,.generic-card,.expert-mini,.product-order-card,.factory-contact-card,.representative-contact-card){
  padding:clamp(14px,1.4vw,20px);
}

/* Inline icon/text pairs share one baseline in both RTL and responsive layouts. */
:where(.utility-contact a,.footer-contact>a,.footer-contact>span,.hero-trust span,.market-link,.table-note span,.factory-hero-tags span,.representative-location,.representative-verified,.button,.ba-next,.ba-calculate){
  align-items:center;
  gap:6px;
}

:where(.feature-grid,.summary-cards,.article-grid,.factory-directory-grid,.category-directory-grid,.representative-grid,.agency-benefit-grid,.media-library-grid){
  gap:clamp(10px,1.4vw,18px);
}

:where(.table-wrap,.table-scroll,.price-table-wrap,.woocommerce-table-wrap,.ba-log-table-wrap){
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}

/* Leaflet normally applies its own Latin UI font; route labels must use the site face. */
.ba-logistics :where(.ba-place-index,.ba-place-field,.ba-place-input,.ba-place-results,.ba-map-marker,.ba-map-marker b,.leaflet-container,.leaflet-control),
.ba-logistics [data-route-heading],
.ba-logistics [data-route-label],
.ba-logistics [data-result-route]{
  font-family:var(--ba-font)!important;
  font-style:normal;
}

@media (max-width:1180px){
  :root{--ba-space-8:56px}
  .container{width:min(calc(100% - 32px),var(--container,1240px))}
}

@media (max-width:1024px){
  :where(.content-with-sidebar,.product-layout,.factory-single-layout,.knowledge-layout,.article-layout){grid-template-columns:minmax(0,1fr)!important}
  :where(.sticky-sidebar,.product-sidebar,.article-sidebar){position:static!important;top:auto!important;width:100%!important}
}

@media (max-width:800px){
  .container{width:min(calc(100% - 24px),var(--container,1240px))}
  body .site-shell :where(.button,button:not([data-slider-dot])),body .ba-logistics :where(.button,button:not([data-slider-dot])){min-height:44px}
  :where(.cards-grid,.posts-grid,.products-grid,.factory-grid,.experts-grid,.related-products,.media-library-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :where(.header-inner,.section-heading,.archive-hero-inner,.category-hero-inner,.knowledge-hero-inner,.article-hero-inner){gap:var(--ba-space-4)}
}

@media (max-width:640px){
  :root{--ba-space-6:24px;--ba-space-7:32px;--ba-space-8:40px}
  .container{width:min(calc(100% - 20px),var(--container,1240px))}
  :where(.cards-grid,.posts-grid,.products-grid,.factory-grid,.experts-grid,.related-products,.media-library-grid){grid-template-columns:minmax(0,1fr)!important}
  :where(.section-heading,.media-results-head,.result-head){align-items:flex-start;flex-direction:column}
  :where(.button,.ba-next,.ba-calculate){justify-content:center}
}

@media (max-width:380px){.container{width:min(calc(100% - 16px),var(--container,1240px))}}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
