/* =========================================================
   TakFroosh — original stylesheet
   RTL, Persian, e-commerce styling built from scratch.
   ========================================================= */

:root {
	--tf-primary: #2b6cb0;
	--tf-primary-dark: #1a4971;
	--tf-accent: #e0663a;
	--tf-bg: #f6f7fb;
	--tf-surface: #ffffff;
	--tf-border: #e5e7ee;
	--tf-text: #1f2430;
	--tf-text-muted: #6b7280;
	--tf-success: #2f9e44;
	--tf-danger: #e03131;
	--tf-radius: 12px;
	--tf-radius-sm: 8px;
	--tf-shadow: 0 4px 14px rgba(20, 20, 40, 0.06);
	--tf-font: 'Vazirmatn', Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--tf-font);
	background: var(--tf-bg);
	color: var(--tf-text);
	line-height: 1.9;
	direction: rtl;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.tf-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- Buttons ---------- */
.tf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	border-radius: var(--tf-radius-sm);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all .2s ease;
}
.tf-btn-primary { background: var(--tf-primary); color: #fff; }
.tf-btn-primary:hover { background: var(--tf-primary-dark); }
.tf-btn-outline { border-color: var(--tf-primary); color: var(--tf-primary); }
.tf-btn-outline:hover { background: var(--tf-primary); color: #fff; }

/* ---------- Header ---------- */
.tf-site-header {
	background: var(--tf-surface);
	border-bottom: 1px solid var(--tf-border);
	position: sticky;
	top: 0;
	z-index: 50;
}
.tf-header-row {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 14px 20px;
	flex-wrap: wrap;
}
.tf-site-title { font-size: 20px; font-weight: 700; color: var(--tf-primary); }
.tf-logo img { max-height: 44px; width: auto; }

.tf-main-nav { flex: 1; }
.tf-menu { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; flex-wrap: wrap; }
.tf-menu a { font-weight: 500; padding: 6px 2px; }
.tf-menu a:hover { color: var(--tf-primary); }
.tf-menu .current-menu-item > a { color: var(--tf-primary); }

.tf-header-actions { display: flex; align-items: center; gap: 14px; }
.tf-search-form { display: flex; background: var(--tf-bg); border-radius: 999px; overflow: hidden; }
.tf-search-input { border: none; background: transparent; padding: 8px 14px; font-family: var(--tf-font); min-width: 160px; }
.tf-search-input:focus { outline: none; }
.tf-search-btn { border: none; background: transparent; padding: 0 12px; cursor: pointer; }

.tf-cart-link { position: relative; display: inline-flex; align-items: center; }
.tf-icon-cart::before { content: "🛒"; font-size: 20px; }
.tf-icon-search::before { content: "🔍"; font-size: 15px; }
.tf-cart-count {
	position: absolute; top: -8px; left: -10px;
	background: var(--tf-accent); color: #fff;
	font-size: 11px; min-width: 18px; height: 18px;
	border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.tf-mobile-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: none;
	border: none;
	cursor: pointer;
}
.tf-mobile-toggle span { width: 22px; height: 2px; background: var(--tf-text); display: block; }

/* ---------- Breadcrumb ---------- */
.tf-breadcrumb { font-size: 13px; color: var(--tf-text-muted); padding: 12px 0; }
.tf-breadcrumb a { color: var(--tf-primary); }
.tf-sep { margin: 0 6px; }

/* ---------- Hero ---------- */
.tf-hero {
	background: linear-gradient(135deg, var(--tf-primary) 0%, var(--tf-primary-dark) 100%);
	color: #fff;
	padding: 60px 0;
	text-align: center;
}
.tf-hero h1 { font-size: 30px; margin: 0 0 10px; }
.tf-hero p { opacity: .9; margin-bottom: 22px; }
.tf-hero .tf-btn-primary { background: #fff; color: var(--tf-primary-dark); }
.tf-hero .tf-btn-primary:hover { background: var(--tf-bg); }

/* ---------- Sections ---------- */
.tf-home-section { padding: 40px 0; }
.tf-section-title { font-size: 22px; margin-bottom: 20px; border-right: 4px solid var(--tf-primary); padding-right: 10px; }

/* ---------- Layout with sidebar ---------- */
.tf-with-sidebar { display: flex; gap: 30px; padding: 30px 20px; align-items: flex-start; }
.tf-main { flex: 1; min-width: 0; }
.tf-sidebar { width: 280px; flex-shrink: 0; }

/* ---------- Widgets ---------- */
.tf-widget {
	background: var(--tf-surface);
	border: 1px solid var(--tf-border);
	border-radius: var(--tf-radius);
	padding: 16px;
	margin-bottom: 20px;
}
.tf-widget-title { margin: 0 0 12px; font-size: 15px; border-bottom: 2px solid var(--tf-primary); display: inline-block; padding-bottom: 4px; }

/* ---------- Post grid / cards ---------- */
.tf-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.tf-post-card { background: var(--tf-surface); border-radius: var(--tf-radius); overflow: hidden; box-shadow: var(--tf-shadow); }
.tf-post-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.tf-post-body { padding: 16px; }
.tf-post-title { font-size: 16px; margin: 0 0 8px; }
.tf-post-meta { font-size: 12px; color: var(--tf-text-muted); margin-bottom: 8px; }
.tf-post-excerpt { font-size: 14px; color: var(--tf-text-muted); margin-bottom: 12px; }

.tf-page-title { font-size: 24px; margin-bottom: 16px; }
.tf-page-thumb { border-radius: var(--tf-radius); overflow: hidden; margin-bottom: 20px; }
.tf-page-content { background: var(--tf-surface); padding: 24px; border-radius: var(--tf-radius); }

.tf-pagination { margin-top: 30px; text-align: center; }
.tf-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; margin: 0 3px;
	background: var(--tf-surface); border-radius: 50%; border: 1px solid var(--tf-border);
}
.tf-pagination .page-numbers.current { background: var(--tf-primary); color: #fff; }

/* ---------- 404 ---------- */
.tf-404 { text-align: center; padding: 80px 20px; }
.tf-404 h1 { font-size: 60px; color: var(--tf-primary); margin: 0; }

/* ---------- Comments ---------- */
.tf-comments { margin-top: 30px; }
.tf-comment-list { list-style: none; padding: 0; }
.tf-comment-list li { background: var(--tf-surface); border-radius: var(--tf-radius); padding: 14px; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.tf-site-footer { background: #16202e; color: #cbd3e0; margin-top: 40px; }
.tf-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding: 40px 20px; }
.tf-footer-title { color: #fff; font-size: 15px; margin-bottom: 12px; }
.tf-footer-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tf-footer-menu a:hover { color: #fff; }
.tf-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 20px; text-align: center; font-size: 13px; }

/* ---------- WooCommerce shop overrides (scoped, original rules) ---------- */
.tf-shop-wrap { padding: 30px 0; }
.tf-shop-wrap ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.tf-shop-wrap ul.products li.product {
	background: var(--tf-surface);
	border-radius: var(--tf-radius);
	box-shadow: var(--tf-shadow);
	padding: 14px;
	text-align: center;
	transition: transform .15s ease;
}
.tf-shop-wrap ul.products li.product:hover { transform: translateY(-3px); }
.tf-shop-wrap ul.products li.product img { border-radius: var(--tf-radius-sm); margin-bottom: 10px; }
.tf-shop-wrap .woocommerce-loop-product__title { font-size: 15px; }
.tf-shop-wrap .price { color: var(--tf-primary); font-weight: 700; }
.tf-shop-wrap .price del { color: var(--tf-text-muted); font-weight: 400; margin-inline-end: 6px; }
.tf-shop-wrap .button.add_to_cart_button {
	margin-top: 10px;
	display: inline-block;
	background: var(--tf-primary);
	color: #fff !important;
	border-radius: var(--tf-radius-sm);
	padding: 8px 16px;
}
.tf-shop-wrap .button.add_to_cart_button:hover { background: var(--tf-primary-dark); }
.tf-shop-wrap .onsale {
	background: var(--tf-accent) !important;
	color: #fff;
	border-radius: 50%;
	font-size: 12px !important;
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary { border-radius: var(--tf-radius); }
.woocommerce div.product p.price { color: var(--tf-primary); }
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	background: var(--tf-primary) !important;
	color: #fff !important;
	border-radius: var(--tf-radius-sm) !important;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { background: var(--tf-primary-dark) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.tf-main-nav { order: 3; width: 100%; display: none; }
	.tf-main-nav.tf-open { display: block; }
	.tf-menu { flex-direction: column; gap: 6px; }
	.tf-mobile-toggle { display: flex; }
	.tf-with-sidebar { flex-direction: column; }
	.tf-sidebar { width: 100%; }
}
