/* =====================================================================
   تنگسیرکالا — استایل پایهٔ همهٔ صفحه‌ها
   فهرست:
     ۱) متغیرها (رنگ، اندازه، فاصله)   ۲) ریست و پایه
     ۳) ظرف و بخش‌ها                    ۴) دکمه‌ها و پیوندها
     ۵) فرم‌ها                          ۶) هدر
     ۷) سرِ صفحه‌های داخلی و محتوا      ۸) پانویس
     ۹) ۴۰۴ و دسترس‌پذیری
   ===================================================================== */

/* ---------- ۱) متغیرها: هر رنگ و اندازه فقط اینجا تعریف می‌شود ---------- */
:root {
	--tk-yellow: #FFD21F;          /* رنگ اصلی برند */
	--tk-yellow-dark: #F2C200;     /* زرد پررنگ (حالت hover) */
	--tk-yellow-soft: #FFF6D1;     /* زرد خیلی روشن (زمینهٔ آیکون‌ها) */
	--tk-ink: #141D26;             /* متن اصلی و دکمهٔ تیره */
	--tk-ink-soft: #2A3540;        /* تیرهٔ روشن‌تر (hover دکمهٔ تیره) */
	--tk-muted: #5B6470;           /* متن کم‌رنگ (کنتراست کافی روی سفید) */
	--tk-line: #EEF0F3;            /* خط و حاشیه */
	--tk-pale: #F6F7F9;            /* زمینهٔ روشن بخش‌ها */
	--tk-white: #FFFFFF;
	--tk-success: #0F7B3F;         /* سبز پیام موفق */
	--tk-danger: #B42318;          /* قرمز خطا */

	--tk-font: "Yekan Bakh", Tahoma, sans-serif; /* فونت سایت (تعریف در fonts.css)؛ Tahoma تا رسیدن فونت */
	--tk-radius-sm: 10px;          /* گوشهٔ دکمه و فیلد */
	--tk-radius: 16px;             /* گوشهٔ کارت‌ها */
	--tk-radius-lg: 24px;          /* گوشهٔ باکس‌های بزرگ */
	--tk-shadow: 0 6px 20px rgba(20, 29, 38, .06);   /* سایهٔ ملایم کارت */
	--tk-container: 1320px;        /* بیشترین عرض محتوا */
	--tk-gutter: 16px;             /* فاصلهٔ محتوا از لبهٔ صفحه */
	--tk-header-h: 76px;           /* ارتفاع هدر */
}

/* ---------- ۲) ریست و پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--tk-white);
	color: var(--tk-ink);
	font-family: var(--tk-font);
	font-size: 15px;
	line-height: 1.9;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
.tk-icon { display: inline-block; flex: none; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.5; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
mark { padding: 0 .15em; background: linear-gradient(transparent 55%, var(--tk-yellow) 55%); color: inherit; }

/* ---------- ۳) ظرف و بخش‌ها ---------- */
.tk-container { width: 100%; max-width: calc(var(--tk-container) + var(--tk-gutter) * 2); margin-inline: auto; padding-inline: var(--tk-gutter); }
.tk-main { min-height: 60vh; }
.tk-section { padding-block: 72px; }
.tk-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.tk-section__head--center { flex-direction: column; align-items: center; text-align: center; }
.tk-section__title { font-size: clamp(22px, 2.6vw, 32px); }
.tk-section__lead { color: var(--tk-muted); font-size: 16px; }
.tk-eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--tk-yellow-soft); color: #8A5A00; font-size: 13px; font-weight: 800; }

/* ---------- ۴) دکمه‌ها و پیوندها ---------- */
.tk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border: 2px solid transparent;
	border-radius: var(--tk-radius-sm);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.tk-btn--lg { min-height: 52px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.tk-btn--block { width: 100%; }
.tk-btn--primary { background: var(--tk-yellow); color: var(--tk-ink); }
.tk-btn--primary:hover { background: var(--tk-yellow-dark); }
.tk-btn--dark { background: var(--tk-ink); color: var(--tk-white); }
.tk-btn--dark:hover { background: var(--tk-ink-soft); }
.tk-btn--outline { border-color: var(--tk-ink); color: var(--tk-ink); }
.tk-btn--outline:hover { background: var(--tk-ink); color: var(--tk-white); }
.tk-btn--ghost { color: var(--tk-ink); }
.tk-btn--ghost:hover { background: var(--tk-pale); }
.tk-btn--light { background: var(--tk-white); color: var(--tk-ink); }
.tk-btn--light:hover { background: var(--tk-pale); }
.tk-link { display: inline-flex; align-items: center; gap: 6px; color: #8A5A00; font-weight: 800; }
.tk-link:hover { color: var(--tk-ink); }

/* ---------- ۵) فرم‌ها ---------- */
.tk-form { display: flex; flex-direction: column; gap: 16px; }
.tk-field { display: flex; flex-direction: column; gap: 6px; }
.tk-field label { font-size: 13px; font-weight: 700; }
.tk-input {
	width: 100%;
	min-height: 50px;
	padding: 0 14px;
	border: 1px solid #D9DDE3;
	border-radius: 12px;
	background: var(--tk-white);
	font-size: 15px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.tk-input:focus { border-color: var(--tk-ink); box-shadow: 0 0 0 3px rgba(255, 210, 31, .45); outline: none; }
.tk-form__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.tk-form__hint { color: var(--tk-muted); font-size: 13px; }
.tk-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.tk-check input { width: 18px; height: 18px; accent-color: var(--tk-ink); }

/* پیام‌های ووکامرس (خطا، موفقیت، اطلاع) */
.tk-notices:empty { display: none; }
.woocommerce-error, .woocommerce-message, .woocommerce-info {
	margin: 0 0 16px !important;
	padding: 12px 16px !important;
	border: 0 !important;
	border-radius: 12px;
	list-style: none;
	font-size: 14px;
}
.woocommerce-error { background: #FDECEC; color: var(--tk-danger); }
.woocommerce-message { background: #E7F8EE; color: var(--tk-success); }
.woocommerce-info { background: #EAF3FF; color: #0B4A8F; }
.woocommerce-error::before, .woocommerce-message::before, .woocommerce-info::before { display: none !important; }

/* ---------- ۶) هدر ---------- */
.tk-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.admin-bar .tk-header { top: 32px; }
.tk-header.is-scrolled { border-color: var(--tk-line); box-shadow: 0 4px 18px rgba(20, 29, 38, .05); }
.tk-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--tk-header-h); }

/* لوگوی متنی (وقتی لوگوی تصویری بارگذاری نشده) */
.tk-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 900; }
.tk-logo__mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--tk-yellow); font-size: 15px; font-weight: 900; }
.custom-logo { width: auto; max-height: 48px; }
/* لوگوی SVG قالب: ارتفاع ثابت، عرض به نسبت تصویر */
.tk-logo--img img { width: auto; height: 40px; }
@media (max-width: 767px) {
	.tk-logo--img img { height: 34px; }
}

/* فهرست اصلی */
.tk-nav { flex: 1 1 auto; }
.tk-nav__list { display: flex; align-items: center; gap: 4px; }
.tk-nav__list a { display: block; padding: 8px 12px; border-radius: var(--tk-radius-sm); font-size: 14px; font-weight: 700; transition: background-color .2s ease; }
.tk-nav__list a:hover, .tk-nav__list .current-menu-item > a { background: var(--tk-pale); }
.tk-nav__list .sub-menu { display: none; }                 /* زیرمنو بعداً طراحی می‌شود */
.tk-nav__account { display: none; }                        /* فقط در موبایل */

/* سبد، حساب و دکمهٔ منو */
.tk-header__actions { display: flex; align-items: center; gap: 8px; }
.tk-header__account { display: flex; gap: 8px; }
.tk-header__cart { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--tk-pale); }
.tk-cart-count { position: absolute; top: -4px; left: -4px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--tk-ink); color: var(--tk-white); font-size: 11px; font-weight: 800; line-height: 1; }
.tk-cart-count[data-count="0"] { display: none; }
.tk-header__toggle { display: none; width: 44px; height: 44px; place-items: center; padding: 0; border: 0; border-radius: 12px; background: var(--tk-pale); cursor: pointer; }
.tk-header__toggle-close { display: none; }

/* تبلت و موبایل: فهرست کشویی زیر هدر */
@media (max-width: 1024px) {
	.tk-header__toggle { display: grid; }
	.tk-header__account { display: none; }
	.tk-nav {
		position: fixed;
		inset: var(--tk-header-h) 0 auto 0;
		max-height: calc(100vh - var(--tk-header-h));
		overflow-y: auto;
		padding: 12px var(--tk-gutter) 24px;
		background: var(--tk-white);
		border-top: 1px solid var(--tk-line);
		box-shadow: 0 20px 40px rgba(20, 29, 38, .12);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s ease, transform .2s ease, visibility .2s;
	}
	.admin-bar .tk-nav { inset-block-start: calc(var(--tk-header-h) + 46px); }
	.tk-nav.is-open { transform: none; opacity: 1; visibility: visible; }
	.tk-nav__list { flex-direction: column; align-items: stretch; }
	.tk-nav__list a { padding: 12px; font-size: 15px; }
	.tk-nav__account { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tk-line); }
	.tk-nav__account .tk-btn { flex: 1; }
	.tk-header__toggle[aria-expanded="true"] .tk-header__toggle-open { display: none; }
	.tk-header__toggle[aria-expanded="true"] .tk-header__toggle-close { display: inline; }
	.tk-header__inner { justify-content: space-between; }
	.tk-nav { flex: none; }
}
@media (max-width: 782px) {
	.admin-bar .tk-header { top: 46px; }
}

/* ---------- ۷) سرِ صفحه‌های داخلی و محتوا ---------- */
.tk-page-head { padding-block: 32px 24px; background: var(--tk-pale); }
.tk-page-head__title { font-size: clamp(22px, 3vw, 30px); }
.tk-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--tk-muted); font-size: 13px; }
.tk-crumbs a:hover { color: var(--tk-ink); }
.tk-page { padding-block: 32px 64px; }
.tk-entry { max-width: 860px; font-size: 16px; }
.tk-entry > * + * { margin-top: 1em; }
.tk-entry h2 { font-size: 22px; margin-top: 1.6em; }
.tk-entry h3 { font-size: 18px; margin-top: 1.4em; }
.tk-entry a { color: #8A5A00; text-decoration: underline; }
.tk-entry ul { padding-right: 1.2em; list-style: disc; }
.tk-entry ol { padding-right: 1.2em; list-style: decimal; }
/* صفحه‌های ووکامرس (سبد، پرداخت، پنل) تمام‌عرض */
.woocommerce-cart .tk-entry, .woocommerce-checkout .tk-entry, .woocommerce-account .tk-entry { max-width: none; }

/* ---------- ۸) پانویس ---------- */
.tk-footer { margin-top: 0; background: var(--tk-ink); color: #C9CED6; }
.tk-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
.tk-footer .tk-logo { color: var(--tk-white); }
.tk-footer__about p { margin-block: 16px; max-width: 420px; }
.tk-footer__contact { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.tk-footer__contact li { display: flex; align-items: flex-start; gap: 8px; }
.tk-footer__contact .tk-icon { margin-top: 4px; color: var(--tk-yellow); }
.tk-footer__contact a:hover { color: var(--tk-white); }
.tk-footer__title { margin-bottom: 14px; color: var(--tk-white); font-size: 16px; }
.tk-footer__list { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.tk-footer__list a:hover { color: var(--tk-yellow); }
.tk-footer__bottom { padding-block: 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }
@media (max-width: 767px) {
	.tk-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; padding-block: 40px 28px; }
	.tk-footer__about { grid-column: 1 / -1; }
	.tk-section { padding-block: 48px; }
	.tk-section__head { flex-direction: column; align-items: flex-start; }
}

/* ---------- ۹) ۴۰۴ و دسترس‌پذیری ---------- */
.tk-404 { padding-block: 96px; text-align: center; }
.tk-404__code { display: block; color: var(--tk-yellow); font-size: 96px; font-weight: 900; line-height: 1; }
.tk-404__title { margin-block: 12px 8px; font-size: 28px; }
.tk-404__actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

/* پیوند «رفتن به محتوا»: فقط با صفحه‌کلید دیده می‌شود */
.tk-skip { position: absolute; top: -100px; right: 16px; z-index: 1000; padding: 8px 16px; border-radius: 0 0 10px 10px; background: var(--tk-ink); color: var(--tk-white); }
.tk-skip:focus { top: 0; }
/* حلقهٔ تمرکز واضح برای کاربران صفحه‌کلید */
:focus-visible { outline: 3px solid var(--tk-yellow-dark); outline-offset: 2px; }
/* متن مخصوص صفحه‌خوان */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
/* کم کردن حرکت برای کسانی که در سیستم‌عامل خواسته‌اند */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
