/* سکان‌بازار — base rules and ad slots (loaded from astra-child/sokkanbazar/). v1.0.2 */
/* ------------------------------------------------------------------
   Base: Persian typography rules from the design system.
   Tokens live in tokens.css, components in components.css.
   ------------------------------------------------------------------ */
body { letter-spacing: 0; }

/* IRANYekanX is not the FaNum build: stylistic set ss02 draws 0-9 with Persian glyphs.
   LTR contexts (code, emails, URLs, phone fields) keep Latin digits. */
body, button, input, select, textarea { font-feature-settings: "ss02"; }
code, kbd, pre, samp, [dir="ltr"],
input[type="email"], input[type="url"], input[type="tel"] { font-feature-settings: normal; }
em, i, cite, dfn, var, address { font-style: normal; }
h1, h2, h3, h4, .ie-card__title { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------
   Ad slots — reserved height before the ad loads (CLS < 0.05).
   Put the class on the Elementor container (Advanced → CSS Classes);
   the ad code goes in an HTML widget inside it.
   ------------------------------------------------------------------ */
.ad-970x250,
.ad-728x90,
.ad-336x280,
.ad-300x250,
.ad-300x600,
.ad-320x100 {
	position: relative;
	box-sizing: border-box;
	display: grid;
	place-items: center;
	inline-size: 100%;
	margin-inline: auto;
	background: var(--surface);
	border: 1px dashed var(--border-input);
	overflow: hidden;
	contain: layout paint;
}
.ad-970x250::before,
.ad-728x90::before,
.ad-336x280::before,
.ad-300x250::before,
.ad-300x600::before,
.ad-320x100::before {
	content: "تبلیغات";
	position: absolute;
	inset-block-start: var(--space-1);
	inset-inline-start: var(--space-2);
	z-index: 1;
	font-size: 12px;
	line-height: 18px;
	font-weight: 500;
	color: var(--muted);
	pointer-events: none;
}
.ad-970x250,
.ad-728x90,
.ad-336x280,
.ad-300x250,
.ad-300x600,
.ad-320x100 { align-self: center; } /* never stretched by a flex parent */
.ad-970x250 { max-inline-size: 970px; min-block-size: 250px; }
.ad-728x90  { max-inline-size: 728px; min-block-size: 90px; }
.ad-336x280 { max-inline-size: 336px; min-block-size: 280px; }
.ad-300x250 { max-inline-size: 300px; min-block-size: 250px; }
.ad-300x600 { max-inline-size: 300px; min-block-size: 600px; }
.ad-320x100 { max-inline-size: 320px; min-block-size: 100px; }

/* Breakpoint visibility (matches Elementor: tablet ≤1024, mobile ≤767).
   Elementor "Hide on" may be set as well; both agree. */
@media (min-width: 768px) {
	.ad-320x100 { display: none; }
}
@media (max-width: 1024px) {
	.ad-300x600 { display: none; }
}
@media (max-width: 767px) {
	.ad-970x250,
	.ad-728x90,
	.ad-300x250 { display: none; }
}

/* ------------------------------------------------------------------
   Elementor kit compatibility (v1.0.2)
   The kit's Button style targets every <button> (.elementor-kit-N button),
   which repaints .ie-btn secondary/ghost as primary. Restore the variants.
   ------------------------------------------------------------------ */
.ie .ie-btn { padding-block: 0; padding-inline: var(--space-4); font-size: 16px; line-height: 24px; font-weight: 500; border-radius: var(--radius-sm); }
.ie .ie-btn.ie-btn--sm { padding-inline: var(--space-3); font-size: 14px; line-height: 22px; }
.ie .ie-btn.ie-btn--lg { padding-inline: var(--space-6); font-weight: 700; }
.ie .ie-btn.ie-btn--primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.ie .ie-btn.ie-btn--primary:hover,
.ie .ie-btn.ie-btn--primary:active { background: var(--accent-hover); color: var(--on-accent); }
.ie .ie-btn.ie-btn--secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.ie .ie-btn.ie-btn--secondary:hover { background: var(--surface); color: var(--primary); }
.ie .ie-btn.ie-btn--secondary:active { background: var(--primary); color: var(--on-primary); }
.ie .ie-btn.ie-btn--ghost { background: transparent; color: var(--accent); border-color: transparent; }
.ie .ie-btn.ie-btn--ghost:hover { background: var(--accent-soft); color: var(--accent-hover); }
.ie .ie-btn.ie-btn--ghost:active { background: var(--border); color: var(--accent-hover); }
.ie .ie-btn:disabled,
.ie .ie-btn[aria-disabled="true"] { background: var(--border); color: var(--disabled-ink); border-color: transparent; }
.ie .ie-btn.ie-btn--ghost:disabled,
.ie .ie-btn.ie-btn--ghost[aria-disabled="true"] { background: transparent; }

/* Text Editor widget: no trailing paragraph margin (Astra adds ~1.75em). */
.elementor-widget-text-editor p:last-child { margin-block-end: 0; }

/* Form controls: 44px touch target (size-input). */
.elementor-field-group .elementor-field-textual:not(textarea),
.elementor-field-group select.elementor-field { min-height: var(--size-input); }
