/*
Theme Name: Havir Theme
Theme URI: https://havironline.com
Author: HAVIR ONLINE
Author URI: https://havironline.com
Description: قالب فروشگاهی فارسی و راست‌چین برای فروشگاه لوازم‌تحریر و ملزومات اداری هاویر آنلاین.
Version: 1.9.0
Requires at least: 6.0
Tested up to: 7.1.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: havir-theme
Domain Path: /languages
Tags: e-commerce, custom-logo, rtl-language-support, threaded-comments, translation-ready
*/

@font-face {
	font-family: "Vazirmatn";
	src: url("assets/fonts/vazirmatn-variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Playfair Display";
	src: url("assets/fonts/playfair-display-variable.woff2") format("woff2");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--havir-red: #d32f2f;
	--havir-red-dark: #b71c1c;
	--havir-red-soft: #ffebee;
	--havir-navy: #1a1a2e;
	--havir-navy-soft: #252542;
	--havir-gold: #b8860b;
	--havir-gold-dark: #9a6b09;
	--havir-bg: #fafafa;
	--havir-surface: #ffffff;
	--havir-surface-alt: #f5f5f7;
	--havir-text: #1e1e2f;
	--havir-muted: #6b7280;
	--havir-border: #e8eaed;
	--havir-border-light: rgba(0, 0, 0, 0.06);
	--havir-success: #188038;
	--havir-warning: #f59e0b;
	--havir-error: #d32f2f;
	--havir-info: #2563eb;
	--havir-radius: 16px;
	--havir-radius-sm: 10px;
	--havir-radius-lg: 24px;
	--havir-radius-full: 9999px;
	
	/* Multi-layered diffused shadows */
	--havir-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
	--havir-shadow-sm: 0 2px 8px -2px rgba(26, 26, 46, 0.06), 0 1px 4px -1px rgba(26, 26, 46, 0.03);
	--havir-shadow: 0 12px 32px -4px rgba(26, 26, 46, 0.08), 0 4px 12px -2px rgba(26, 26, 46, 0.03);
	--havir-shadow-lg: 0 24px 48px -12px rgba(26, 26, 46, 0.12), 0 8px 24px -4px rgba(26, 26, 46, 0.04);
	--havir-shadow-red: 0 8px 24px -4px rgba(211, 47, 47, 0.28);
	--havir-shadow-navy: 0 8px 24px -4px rgba(26, 26, 46, 0.24);

	/* Precision motion physics curves */
	--havir-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--havir-ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
	--havir-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
	--havir-transition: all 0.25s var(--havir-ease-smooth);
	--havir-transition-fast: all 0.15s var(--havir-ease-out);

	--havir-font: "Vazirmatn", Tahoma, Arial, sans-serif;
	--havir-latin-font: "Playfair Display", Georgia, serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	direction: rtl;
	font-size: 16px;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--havir-bg);
	color: var(--havir-text);
	font-family: var(--havir-font);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.8;
	text-align: start;
	text-rendering: optimizeLegibility;
}

body.no-scroll {
	overflow: hidden;
}

img,
svg,
video,
canvas {
	display: block;
	max-inline-size: 100%;
	block-size: auto;
}

button,
input,
textarea,
select {
	font: inherit;
}

button {
	cursor: pointer;
}

a {
	color: inherit;
	text-decoration: none;
	transition: var(--havir-transition);
}

a:hover,
a:focus {
	color: var(--havir-red);
}

p {
	margin-block: 0 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-block: 0 0.75rem;
	color: var(--havir-navy);
	font-weight: 800;
	line-height: 1.35;
}

h1 {
	font-size: clamp(2rem, 4vw, 4rem);
}

h2 {
	font-size: clamp(1.6rem, 3vw, 2.75rem);
}

h3 {
	font-size: clamp(1.35rem, 2vw, 2rem);
}

h4 {
	font-size: 1.25rem;
}

h5 {
	font-size: 1.1rem;
}

h6 {
	font-size: 1rem;
}

ul,
ol {
	margin-block: 0 1rem;
	padding-inline-start: 1.5rem;
}

table {
	inline-size: 100%;
	border-collapse: collapse;
}

caption,
th,
td {
	text-align: start;
}

blockquote {
	margin: 2rem 0;
	padding: 1.25rem 1.5rem;
	border-inline-start: 4px solid var(--havir-red);
	background: var(--havir-surface);
	border-radius: var(--havir-radius);
	box-shadow: var(--havir-shadow);
}

::selection {
	background: var(--havir-red);
	color: #ffffff;
}

.latin-heading {
	font-family: var(--havir-latin-font);
	letter-spacing: 0;
	direction: ltr;
}

.container {
	inline-size: min(100% - 2rem, 1280px);
	margin-inline: auto;
}

.sr-only {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.btn-primary,
.btn-secondary,
.btn-outline,
.button,
button[type="submit"],
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	min-block-size: 48px;
	padding-block: 0.75rem;
	padding-inline: 1.5rem;
	border: 1px solid transparent;
	border-radius: var(--havir-radius-sm);
	font-weight: 700;
	line-height: 1.2;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
	transition: transform 160ms var(--havir-ease-out), background-color 200ms ease, box-shadow 200ms ease, border-color 200ms ease, color 200ms ease;
}

/* Tactile press feedback */
.btn-primary:active,
.btn-secondary:active,
.btn-outline:active,
.button:active,
button[type="submit"]:active,
input[type="submit"]:active,
.havir-icon-button:active,
.havir-swatch-btn:active,
.havir-quick-view-btn:active {
	transform: scale(0.97) !important;
}

.btn-primary,
.button,
button[type="submit"],
input[type="submit"] {
	background: var(--havir-red);
	color: #ffffff;
	box-shadow: var(--havir-shadow-red);
}

@media (hover: hover) and (pointer: fine) {
	.btn-primary:hover,
	.button:hover,
	button[type="submit"]:hover,
	input[type="submit"]:hover {
		background: var(--havir-red-dark);
		color: #ffffff;
		transform: translateY(-2px);
		box-shadow: 0 12px 28px -4px rgba(211, 47, 47, 0.36);
	}

	.btn-secondary:hover {
		background: var(--havir-navy-soft);
		color: #ffffff;
		transform: translateY(-2px);
		box-shadow: 0 12px 28px -4px rgba(26, 26, 46, 0.3);
	}

	.btn-outline:hover {
		background: var(--havir-red);
		color: #ffffff;
		transform: translateY(-2px);
	}
}

.btn-secondary {
	background: var(--havir-navy);
	color: #ffffff;
	box-shadow: var(--havir-shadow-navy);
}

.btn-outline {
	background: transparent;
	border-color: var(--havir-red);
	color: var(--havir-red);
}

.site-main {
	padding-block: 3.5rem;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.75rem;
}

.entry-card {
	position: relative;
	overflow: hidden;
	background: var(--havir-surface);
	border: 1px solid var(--havir-border);
	border-radius: var(--havir-radius);
	box-shadow: var(--havir-shadow-sm);
	transition: transform 280ms var(--havir-ease-out), box-shadow 280ms var(--havir-ease-out), border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.entry-card:hover {
		transform: translateY(-4px);
		box-shadow: var(--havir-shadow-lg);
		border-color: rgba(211, 47, 47, 0.2);
	}

	.entry-card:hover .entry-card__image img {
		transform: scale(1.04);
	}
}

.entry-card__image {
	overflow: hidden;
}

.entry-card__image img {
	inline-size: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform 400ms var(--havir-ease-out);
}

.entry-card__content {
	padding: 1.25rem;
}

.entry-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	color: var(--havir-muted);
	font-size: 0.9rem;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	block-size: 1px;
	inline-size: 1px;
	overflow: hidden;
	position: absolute !important;
}
