/**
 * Mobile-first overrides (max-width: 899px)
 */

.ms-steps-hint {
	display: none;
}

@media (max-width: 899px) {
	:root {
		--ms-header-h: 60px;
		--ms-space-3xl: 2.75rem;
		--ms-space-4xl: 3.25rem;
		--ms-text-3xl: 1.625rem;
		--ms-text-5xl: clamp(1.75rem, 8vw, 2.35rem);
	}

	.ms-container {
		padding-inline: 1rem;
	}

	/* Header — فشرده و خوانا */
	.ms-header__actions .ms-header__shop-link,
	.ms-header__actions .ms-header__panel-link {
		display: none;
	}

	.ms-header__actions {
		gap: 0.35rem;
	}

	.ms-header__actions .ms-header__cta-main {
		padding: 0.38rem 0.65rem;
		font-size: 0.75rem;
		box-shadow: 0 1px 6px rgba(234, 88, 12, 0.16);
	}

	.ms-header__actions .ms-header__cta-icon svg {
		width: 14px;
		height: 14px;
	}

	.ms-header__cta-label--full {
		display: none;
	}

	.ms-header__cta-label--short {
		display: inline;
	}

	.ms-logo__text {
		font-size: var(--ms-text-sm);
		max-width: 108px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.ms-logo__mark,
	.custom-logo-link img {
		width: 34px;
		height: 34px;
	}

	.ms-nav-toggle {
		width: 44px;
		height: 44px;
	}

	/* Stats */
	.ms-stats-bar {
		margin-top: 0;
		padding-bottom: 2rem;
	}

	.ms-stat {
		padding: 1.125rem 0.75rem;
	}

	.ms-stat__value {
		font-size: var(--ms-text-xl);
	}

	.ms-stat__label {
		font-size: 0.7rem;
		line-height: 1.4;
	}

	/* Sections */
	.ms-section {
		padding: 2.75rem 0;
	}

	.ms-section__header {
		margin-bottom: 1.75rem;
		padding-inline: 0.25rem;
	}

	.ms-section__title {
		font-size: var(--ms-text-2xl);
	}

	.ms-section__subtitle {
		font-size: var(--ms-text-base);
	}

	.ms-steps-hint {
		display: block;
		text-align: center;
		font-size: var(--ms-text-xs);
		color: var(--ms-color-text-muted);
		margin: -0.5rem 0 0.75rem;
		opacity: 0.85;
	}

	/* Steps — اسکرول افقی */
	.ms-steps {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		gap: 0.75rem;
		padding-bottom: 0.5rem;
		margin-inline: -1rem;
		padding-inline: 1rem;
		scrollbar-width: none;
	}

	.ms-steps::-webkit-scrollbar {
		display: none;
	}

	.ms-steps::before {
		display: none;
	}

	.ms-step-card {
		flex: 0 0 min(88%, 300px);
		scroll-snap-align: center;
		text-align: right;
		padding: 1.25rem;
	}

	.ms-step-card__num {
		margin-bottom: 0.75rem;
	}

	/* Features */
	.ms-feature-grid {
		gap: 0.75rem;
	}

	.ms-feature-card {
		padding: 1.35rem;
	}

	.ms-feature-card--wide {
		grid-column: span 1;
	}

	/* Reviews */
	.ms-reviews__track {
		margin-inline: -1rem;
		padding-inline: 1rem;
		scroll-padding-inline: 1rem;
	}

	.ms-review-card {
		flex: 0 0 min(88vw, 320px);
		padding: 1.35rem;
	}

	/* Homepage hero actions — compact on phones */
	.ms-hp-hero__actions .ms-hp-action {
		padding: 0.9rem 0.85rem;
		gap: 0.65rem;
	}

	.ms-hp-hero__actions .ms-hp-action__icon {
		width: 40px;
		height: 40px;
	}

	.ms-hp-hero__actions .ms-hp-action__body strong {
		font-size: var(--ms-text-sm);
	}

	.ms-hp-hero__actions .ms-hp-action__body small {
		font-size: 0.68rem;
	}

	.ms-review-card::before {
		font-size: 3rem;
		top: 12px;
		left: 16px;
	}

	.ms-review-card__text {
		font-size: var(--ms-text-base);
	}

	/* FAQ */
	.ms-faq-card {
		padding: 0.5rem 1rem;
		border-radius: var(--ms-radius-lg);
	}

	.ms-accordion__trigger {
		padding: 1rem 0;
		font-size: var(--ms-text-sm);
		align-items: flex-start;
	}

	.ms-accordion__icon {
		width: 36px;
		height: 36px;
		margin-top: 2px;
	}

	.ms-purchase-card {
		min-width: 220px;
		padding: 1rem;
	}

	/* CTA band */
	.ms-cta-band {
		padding: 2.5rem 0;
	}

	.ms-cta-band h2 {
		font-size: var(--ms-text-2xl);
	}

	.ms-cta-band .ms-btn--action {
		width: 100%;
		max-width: 360px;
		justify-self: center;
	}

	.ms-page {
		padding: 2rem 0;
	}

	.ms-page__title {
		font-size: var(--ms-text-2xl);
	}
}

/* گوشی‌های کوچک */
@media (max-width: 380px) {
	.ms-logo__text {
		display: none;
	}

	.ms-header__actions .ms-header__cta-main {
		padding: 0.38rem 0.55rem;
	}

	.ms-header__cta-label--short {
		display: none;
	}
}

@media (max-width: 899px) {
	/* پنل کاربری */
	.ms-dashboard-page {
		padding: 1.5rem 0 2rem;
	}

	.ms-field--inline {
		flex-direction: column;
	}

	.ms-field--inline .ms-btn {
		width: 100%;
		min-height: 50px;
	}

	/* Sticky CTA + safe area */
	.ms-sticky-cta {
		padding: 10px 1rem;
		padding-bottom: max(10px, env(safe-area-inset-bottom));
	}

	.ms-sticky-cta .ms-btn {
		min-height: 50px;
		font-size: var(--ms-text-base);
	}

	body.ms-body.ms-sell-active {
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}
