/* =========================================================
   پایه — بازنشانی، تایپوگرافی، عناصر
   راست‌چینی با خصوصیت‌های منطقی. هیچ left/right فیزیکی.
   ========================================================= */

*,
*::before,
*::after {
	box-sizing: border-box;
}

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: var(--space-2xl);
}

body {
	position: relative;
	min-height: 100vh;
	background-color: var(--bkk-cream);
	color: var(--bkk-ink);
	font-family: var(--font-body);
	font-size: var(--step-0);
	font-weight: 400;
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* بافت دانه کاغذی روی کل صفحه — بسیار کم‌رنگ، فقط برای گرفتن حالت تخت دیجیتالی */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image: var(--texture-paper);
	opacity: 0.035;
	pointer-events: none;
}

/* --- عناوین --- */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	line-height: var(--lh-heading);
	font-weight: 700;
	text-wrap: balance;
	letter-spacing: -0.01em;
}

h1 {
	font-size: var(--step-5);
	font-weight: 800;
	line-height: var(--lh-tight);
	letter-spacing: -0.02em;
}

h2 {
	font-size: var(--step-4);
	font-weight: 800;
	line-height: var(--lh-tight);
	letter-spacing: -0.015em;
}

h3 {
	font-size: var(--step-2);
}

h4 {
	font-size: var(--step-1);
}

h5,
h6 {
	font-size: var(--step-0);
}

p {
	text-wrap: pretty;
}

/* --- پیوند --- */

a {
	color: inherit;
	text-decoration-color: var(--bkk-line-strong);
	text-underline-offset: 0.25em;
	text-decoration-thickness: 1px;
	transition: color var(--dur-fast) var(--ease-out),
		text-decoration-color var(--dur-fast) var(--ease-out);
}

a:hover {
	color: var(--bkk-saffron-deep);
	text-decoration-color: currentColor;
}

/* --- فوکوس: ضخیم و واضح برای کاربر کیبورد --- */

:focus-visible {
	outline: 3px solid var(--bkk-saffron);
	outline-offset: 2px;
	border-radius: var(--radius-s);
}

:focus:not(:focus-visible) {
	outline: none;
}

/* --- رسانه --- */

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* هر تصویر باید نسبت ابعاد داشته باشد تا چیدمان هنگام بارگذاری نپرد */
img[width][height] {
	height: auto;
}

svg {
	fill: currentColor;
}

/* --- فرم --- */

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

textarea {
	resize: vertical;
}

button {
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}

/* --- ارقام هم‌عرض: ستون قیمت‌ها باید زیر هم تراز بماند --- */

.bkk-num,
.price,
.amount,
.woocommerce-Price-amount,
td,
th {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

/* --- جدول --- */

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: var(--space-xs) var(--space-s);
	text-align: start;
	border-bottom: 1px solid var(--bkk-line);
}

th {
	font-weight: 600;
	font-family: var(--font-display);
}

/* --- نقل‌قول --- */

blockquote {
	margin-inline: 0;
	padding-inline-start: var(--space-m);
	border-inline-start: 3px solid var(--bkk-saffron);
	font-size: var(--step-1);
	font-family: var(--font-display);
	font-weight: 500;
	line-height: var(--lh-heading);
	color: var(--bkk-ink);
}

hr {
	border: none;
	border-top: 1px solid var(--bkk-line);
	margin-block: var(--space-l);
}

code,
pre {
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
	font-size: 0.9em;
	direction: ltr;
	text-align: left;
}

/* =========================================================
   کمکی‌های دسترس‌پذیری
   ========================================================= */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.screen-reader-text:focus {
	background-color: var(--bkk-surface);
	clip-path: none;
	color: var(--bkk-ink);
	display: block;
	font-size: var(--step--1);
	font-weight: 600;
	height: auto;
	inset-inline-start: var(--space-s);
	inset-block-start: var(--space-s);
	padding: var(--space-xs) var(--space-m);
	border-radius: var(--radius-s);
	box-shadow: var(--shadow-lift);
	text-decoration: none;
	width: auto;
	z-index: var(--z-modal);
}

.skip-link:focus {
	outline: 3px solid var(--bkk-saffron);
}

/* =========================================================
   احترام به ترجیح کاهش حرکت
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* =========================================================
   چاپ
   ========================================================= */

@media print {
	body::before,
	.site-header,
	.site-footer,
	.bkk-mobile-bar {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}
}
