/*
Theme Name: Salmod Lite
Theme URI: https://salmod.com/
Author: Salmod
Description: قالب بسیار سبک برای سال‌مد. هدر، فوتر، صفحه اصلی، فروشگاه، دسته‌ها، محصول، سبد، تسویه و حساب کاربری از افزونه «Salmod Toolkit» می‌آیند؛ این قالب فقط بقیه صفحه‌ها (برگه‌ها، وبلاگ، جستجو، ۴۰۴) را با همان رنگ‌ها نمایش می‌دهد. بدون jQuery، بدون فونت و فایل اضافه.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Tested up to: 6.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: salmod-lite
Tags: e-commerce, rtl-language-support, one-column, custom-menu
*/

/* Colours come from the Salmod Toolkit tokens (--salmod-*); the values after the comma are only used without it. */
:root {
	--sl-bg: var(--salmod-bg, #FAFAF9);
	--sl-surface: var(--salmod-surface, #FFFFFF);
	--sl-fg: var(--salmod-fg, #0C0A09);
	--sl-muted: var(--salmod-muted-fg, #57534E);
	--sl-line: var(--salmod-line-soft, #EFEBE6);
	--sl-border: var(--salmod-border, #D6D3D1);
	--sl-primary: var(--salmod-primary, #1C1917);
	--sl-on-primary: var(--salmod-on-primary, #FFFFFF);
	--sl-brand: var(--salmod-brand, #AF2464);
	--sl-brand-ink: var(--salmod-brand-ink, #8C1C4F);
	--sl-brand-soft: var(--salmod-brand-soft, #FBEFF4);
	--sl-field: var(--salmod-field, #F5F2EE);
	--sl-ring: var(--salmod-ring, #1C1917);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--sl-bg);
	color: var(--sl-fg);
	font-family: "Vazirmatn", Tahoma, sans-serif;
	font-size: 16px;
	line-height: 1.9;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--sl-brand-ink); }
a:hover { color: var(--sl-brand); }
:focus-visible { outline: 2px solid var(--sl-ring); outline-offset: 2px; }
h1, h2, h3, h4 { color: var(--sl-primary); line-height: 1.5; text-wrap: balance; margin: 1.4em 0 .5em; }
h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 900; margin-top: 0; }
h2 { font-size: clamp(20px, 3vw, 26px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 800; }
p { margin: 0 0 1em; }
.screen-reader-text, .salmod-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; inset-inline-start: 8px; z-index: 100000; width: auto; height: auto; clip: auto; padding: 10px 14px; border-radius: 10px; background: var(--sl-primary); color: var(--sl-on-primary); }

.lt-wrap { width: min(100% - 32px, 1200px); margin-inline: auto; }
.lt-main { padding: 24px 0 56px; min-height: 50vh; }
.lt-narrow { width: min(100% - 32px, 820px); margin-inline: auto; }

/* Fallback header / footer (only when the Salmod header / footer are off) */
.lt-header { background: var(--sl-surface); border-bottom: 1px solid var(--sl-line); }
.lt-header .lt-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.lt-brand { font-size: 20px; font-weight: 900; color: var(--sl-primary); text-decoration: none; }
.lt-brand img { max-height: 36px; width: auto; display: block; }
.lt-nav ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.lt-nav a { color: var(--sl-fg); text-decoration: none; font-weight: 700; font-size: 15px; }
.lt-footer { margin-top: 32px; padding: 28px 0; background: var(--sl-primary); color: var(--salmod-on-dark, #D6D3D1); font-size: 14px; }
.lt-footer a { color: inherit; }

/* Page / post */
.lt-card { background: var(--sl-surface); border-radius: 24px; padding: clamp(18px, 4vw, 40px); box-shadow: 0 6px 22px color-mix(in srgb, var(--sl-primary) 5%, transparent); }
.lt-meta { color: var(--sl-muted); font-size: 14px; margin: -4px 0 18px; }
.lt-thumb { margin: 0 0 20px; border-radius: 18px; overflow: hidden; }
.lt-thumb img { display: block; width: 100%; }
.entry-content > * { max-width: 100%; }
.entry-content img { border-radius: 14px; }
.entry-content blockquote { margin: 1.2em 0; padding: 12px 18px; border-inline-start: 4px solid var(--sl-brand); background: var(--sl-brand-soft); border-radius: 12px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.entry-content th, .entry-content td { padding: 9px 12px; border-bottom: 1px solid var(--sl-line); text-align: start; }
.entry-content pre { overflow-x: auto; padding: 14px; border-radius: 12px; background: var(--sl-field); direction: ltr; }
.alignwide, .alignfull { max-width: 100%; }
.wp-block-image figcaption, .wp-caption-text { color: var(--sl-muted); font-size: 13px; text-align: center; }

/* Post list */
.lt-head { margin: 0 0 20px; }
.lt-head p { color: var(--sl-muted); margin: 0; }
.lt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.lt-post { display: flex; flex-direction: column; background: var(--sl-surface); border-radius: 22px; overflow: hidden; box-shadow: 0 6px 20px color-mix(in srgb, var(--sl-primary) 5%, transparent); transition: transform .2s ease, box-shadow .2s ease; }
.lt-post:hover { transform: translateY(-3px); box-shadow: 0 16px 34px color-mix(in srgb, var(--sl-brand) 12%, transparent); }
.lt-post a { color: inherit; text-decoration: none; }
.lt-post__img { aspect-ratio: 16 / 10; background: var(--sl-brand-soft); }
.lt-post__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lt-post__body { padding: 14px 16px 18px; }
.lt-post__title { margin: 0 0 6px; font-size: 17px; }
.lt-post__ex { margin: 0; color: var(--sl-muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lt-post__date { display: block; margin-top: 8px; color: var(--sl-muted); font-size: 12.5px; }

/* Pagination */
.nav-links, .lt-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--sl-surface); box-shadow: inset 0 0 0 1px var(--sl-line); color: var(--sl-fg); text-decoration: none; font-weight: 700; }
.page-numbers.current { background: var(--sl-primary); color: var(--sl-on-primary); box-shadow: none; }

/* Forms + buttons */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="password"], input[type="number"], textarea, select {
	width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--sl-border); border-radius: 12px; background: var(--sl-surface);
	font: inherit; font-size: 16px; color: var(--sl-fg);
}
textarea { min-height: 120px; }
button, input[type="submit"], .button, .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px;
	background: var(--sl-primary); color: var(--sl-on-primary); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
}
button:hover, input[type="submit"]:hover, .button:hover, .wp-block-button__link:hover { background: var(--sl-brand); color: var(--sl-on-primary); }
.lt-search { display: flex; gap: 8px; max-width: 520px; }

/* Comments */
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { margin: 0 0 12px; padding: 14px; border-radius: 16px; background: var(--sl-bg); }
.comment-list .children { list-style: none; padding-inline-start: 16px; }
.comment-meta { font-size: 13px; color: var(--sl-muted); }
.comment-author .avatar { display: none; }
.comment-form p { margin: 0 0 12px; }
.comment-form label { display: block; font-weight: 700; font-size: 14px; }

/* 404 / empty */
.lt-empty { text-align: center; padding: 48px 16px; }
.lt-empty__code { font-size: clamp(64px, 14vw, 120px); font-weight: 900; line-height: 1; color: var(--sl-brand); }

/* WooCommerce pages the Salmod plugin does not replace (product search, etc.) */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin: 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; padding: 8px; border-radius: 18px; background: var(--sl-surface); }
.woocommerce ul.products li.product img { border-radius: 12px; }
.woocommerce-products-header__title { margin-top: 0; }

@media (prefers-reduced-motion: reduce) { .lt-post { transition: none; } }
