/*
Theme Name: Prime
Theme URI: https://primeaccount.ir
Author: Prime Account
Description: قالب اختصاصی و سبک پرایم اکانت، سازگار با المنتور، Prime Kit و ووکامرس.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: prime
WPVibe: yes
*/

:root {
	--p-bg: #0F0F0F;
	--p-surface: #161816;
	--p-surface-2: #1D201D;
	--p-text: #FFFFFF;
	--p-soft: #DADADA;
	--p-muted: #9A9A9A;
	--p-accent: #0EFDC2;
	--p-accent-ink: #062018;
	--p-line: rgba(255, 255, 255, .07);
	--p-danger: #F55B5B;
	--p-radius: 16px 6px 16px 16px;
	--p-radius-sm: 10px 4px 10px 10px;
	--p-wrap: 1240px;
	--p-font: YekanBakh, Tahoma, sans-serif;
	--p-display: Morabba, YekanBakh, Tahoma, sans-serif;
}

/* Base reset kept identical to the previous theme so Elementor layouts render the same */
:root { --mainColor: #0EFDC2; }
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background-color: var(--p-bg);
	color: var(--p-text);
	font-family: var(--p-font);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin-block-start: .5rem; margin-block-end: 1rem; font-family: inherit; font-weight: 500; line-height: 1.2; color: inherit; }
h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.75rem; } h4 { font-size: 1.5rem; } h5 { font-size: 1.25rem; } h6 { font-size: 1rem; }
p { margin-block-start: 0; margin-block-end: .9rem; }
a { background-color: transparent; text-decoration: none; color: var(--mainColor); }
a:active, a:hover { color: #336; }
a:not([href]):not([tabindex]), a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover { color: inherit; text-decoration: none; }
b, strong { font-weight: bolder; }
small { font-size: 80%; }
img { border-style: none; height: auto; max-width: 100%; }
[hidden], template { display: none; }
label { display: inline-block; line-height: 1; vertical-align: middle; }
button, input, optgroup, select, textarea { line-height: normal; margin: 0; font-family: inherit; }
[type=button], [type=reset], [type=submit], button { width: auto; -webkit-appearance: button; }
[type=button]:not(:disabled), [type=submit]:not(:disabled), button:not(:disabled) { cursor: pointer; }
textarea { overflow: auto; resize: vertical; }
select { display: block; }
.prime-content h1, .prime-content h2, .prime-content h3, .prime-title { font-family: var(--p-display); }
:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important; top: 12px; right: 12px; width: auto; height: auto; clip: auto;
	z-index: 100000; padding: 10px 16px; background: var(--p-accent); color: var(--p-accent-ink);
	border-radius: var(--p-radius-sm);
}

/* Layout */
.prime-wrap { width: 100%; max-width: var(--p-wrap); margin-inline: auto; padding-inline: 16px; }
.prime-main { display: block; min-height: 60vh; }
.prime-page, .prime-single, .prime-archive, .prime-woo { padding-block: 28px 56px; }
.prime-title { font-size: clamp(22px, 4vw, 34px); }
.prime-muted, .prime-meta { color: var(--p-muted); }
.prime-meta { font-size: 13px; }
.prime-content { color: var(--p-soft); }
.prime-content a { text-decoration: underline; text-underline-offset: 3px; }
.prime-content img { border-radius: var(--p-radius); }
.prime-content table { width: 100%; border-collapse: collapse; }
.prime-content th, .prime-content td { border: 1px solid var(--p-line); padding: 8px 10px; }
.prime-single { max-width: 860px; }
.prime-single__thumb { margin: 0 0 24px; }
.prime-single__thumb img { width: 100%; border-radius: var(--p-radius); }

/* Fallback header / footer (used only when no Elementor template is set) */
.prime-header { border-bottom: 1px solid var(--p-line); background: var(--p-surface); }
.prime-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.prime-brand { color: var(--p-text); font-family: var(--p-display); font-size: 20px; }
.prime-brand img { max-height: 44px; width: auto; }
.prime-nav ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.prime-nav a { color: var(--p-soft); }
.prime-footer { border-top: 1px solid var(--p-line); padding-block: 24px; color: var(--p-muted); font-size: 13px; }

/* Header / footer shells: no extra padding or gaps around the Elementor templates */
#site-header.e-con, #site-footer.e-con {
	--padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px;
	--gap: 0px; --row-gap: 0px; --column-gap: 0px;
	padding: 0; gap: 0;
}
#site-header .e-con { --gap: 0px; --row-gap: 0px; --column-gap: 0px; }

/* Desktop header: full-width bar at the top, rounded floating bar once the page scrolls */
@media (min-width: 1025px) {
	#site-header .pk-dh { min-height: var(--prime-hh, 0px); }
	#site-header .pk-dh .pk-dh__inner,
	#site-header .pk-dh.is-stuck .pk-dh__inner {
		position: fixed !important;
		top: var(--wp-admin--admin-bar--height, 0px) !important;
		left: 0 !important;
		right: 0 !important;
		margin: 0 auto !important;
		width: calc(100% - 0px) !important;
		max-width: 100vw !important;
		border-radius: 0 !important;
		z-index: 9990;
		animation: none !important;
		transition: width .5s cubic-bezier(.22, .8, .24, 1), max-width .5s cubic-bezier(.22, .8, .24, 1), top .5s cubic-bezier(.22, .8, .24, 1), border-radius .5s ease, box-shadow .5s ease, background-color .5s ease, border-color .5s ease, transform .35s ease !important;
	}
	#site-header .pk-dh :is(.pk-dh__top, .pk-dh__nav) { transition: padding .5s cubic-bezier(.22, .8, .24, 1) !important; }
	html.prime-scrolled #site-header .pk-dh .pk-dh__inner {
		top: calc(10px + var(--wp-admin--admin-bar--height, 0px)) !important;
		width: calc(100% - 48px) !important;
		max-width: 1180px !important;
		border-radius: 18px !important;
		border: 1px solid rgba(139, 163, 150, .14) !important;
		box-shadow: 0 16px 40px rgba(0, 0, 0, .4) !important;
		background: rgba(18, 37, 29, .86) !important;
		-webkit-backdrop-filter: blur(14px);
		backdrop-filter: blur(14px);
	}
	html.prime-scrolled #site-header .pk-dh :is(.pk-dh__top, .pk-dh__nav) { padding-inline: 22px !important; }
	#site-header .pk-dh.is-stuck.is-hidden .pk-dh__inner { transform: translateY(calc(-100% - 30px)); }
}

/* Cards */
.prime-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.prime-card { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); overflow: hidden; transition: border-color .2s; }
.prime-card:hover { border-color: rgba(14, 253, 194, .35); }
.prime-card__link { display: block; color: inherit; }
.prime-card__link:hover { opacity: 1; }
.prime-card__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.prime-card__body { display: grid; gap: 6px; padding: 14px 16px 18px; }
.prime-card__title { font-weight: 700; color: var(--p-text); }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.nav-links .page-numbers { padding: 4px 12px; border: 1px solid var(--p-line); border-radius: var(--p-radius-sm); color: var(--p-soft); }
.nav-links .current { background: var(--p-accent); color: var(--p-accent-ink); border-color: transparent; }

/* Forms & buttons: only inside theme-rendered areas, never inside Elementor sections */
:is(.prime-page, .prime-single, .prime-archive, .prime-woo, .prime-comments) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
	font: inherit; color: var(--p-text); background: var(--p-surface); border: 1px solid var(--p-line);
	border-radius: 10px; padding: 10px 12px; max-width: 100%;
}
:is(.prime-page, .prime-single, .prime-archive, .prime-woo, .prime-comments) :is(input, select, textarea):focus { border-color: var(--p-accent); outline: none; }
:is(.prime-page, .prime-single, .prime-archive, .prime-woo, .prime-comments) :is(button, .button, input[type=submit], .wp-element-button) {
	font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: var(--p-radius);
	background: var(--p-accent); color: var(--p-accent-ink); padding: 10px 20px; line-height: 1.6;
}
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; }

/* WooCommerce basics (product page gets its own template) */
.woocommerce .price, .woocommerce-Price-amount { color: var(--p-accent); }
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	background: var(--p-surface); color: var(--p-soft); border: 1px solid var(--p-line);
	border-radius: var(--p-radius); padding: 12px 16px; list-style: none; margin: 0 0 16px;
}
.woocommerce-error { border-color: rgba(245, 91, 91, .4); }
.woocommerce table.shop_table { border-collapse: collapse; width: 100%; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-bottom: 1px solid var(--p-line); padding: 10px; }

/* Homepage «دسترسی به خدمات»: keep each brand icon inside its tile */
.pc2-group-title > span { position: relative; overflow: hidden; }
.pc2-group-title > span > svg, .pc2-group-title .prc-brand {
	position: static !important; inset: auto !important; transform: none !important; margin: 0 !important;
	width: 24px !important; height: 24px !important;
}

/* Product page (Elementor template «صفحه محصول پرایم») */
.pp-buy, .pp-desc-body, .pp-toc .elementor-toc, .pp-reviews {
	background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 24px 8px 24px 24px;
}
.pp-buy { padding: 24px; }
.pp-media img { width: 100%; border-radius: 20px; }
.pp-info .product_title { font-family: var(--p-display); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.5; margin: 0 0 6px; }
.pp-info .woocommerce-product-details__short-description { color: var(--p-soft); font-size: 14px; line-height: 2; }
.pp-info .price { font-size: 22px; font-weight: 800; color: var(--p-accent); }
.pp .variations { width: 100%; border: 0; margin: 6px 0 4px; }
.pp .variations tr { display: grid; gap: 6px; margin-bottom: 12px; }
.pp .variations th, .pp .variations td { padding: 0; border: 0; background: none !important; text-align: start; }
.pp .variations label { font-size: 13px; color: var(--p-muted); }
.pp .variations select { width: 100%; height: 46px; background: var(--p-bg); color: var(--p-text); border: 1px solid var(--p-line); border-radius: 12px; padding: 0 12px; }
.pp .variations select:focus { border-color: var(--p-accent); outline: none; }
.pp .reset_variations { font-size: 12px; color: var(--p-muted); }
.pp .woocommerce-variation-description { background: var(--p-bg); border: 1px solid var(--p-line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; font-size: 13px; line-height: 2; color: var(--p-soft); }
.pp .woocommerce-variation-description ul { margin: 0; padding-inline-start: 18px; }
.pp .woocommerce-variation-price .price { font-size: 26px; }
.pp form.cart:not(.variations_form), .pp .woocommerce-variation-add-to-cart { display: flex; gap: 10px; align-items: stretch; margin-top: 12px; }
.pp .quantity input.qty { width: 72px; height: 50px; text-align: center; background: var(--p-bg); color: var(--p-text); border: 1px solid var(--p-line); border-radius: 12px; }
.pp .single_add_to_cart_button { flex: 1; min-height: 50px; border: 0; border-radius: 16px 6px 16px 16px; background: var(--p-accent); color: var(--p-accent-ink); font: 800 16px/1.4 var(--p-font); }
.pp .single_add_to_cart_button.disabled { opacity: .45; cursor: not-allowed; }
.pp-support { font-size: 13px; color: var(--p-muted); }
.pp-desc-body, .pp-reviews { padding: 24px; }
.pp-toc .elementor-toc { overflow: hidden; }
.pp-reviews h2, .pp-related h2 { font-family: var(--p-display); font-size: clamp(20px, 2.2vw, 26px); }
.pp-reviews :is(input:not([type=checkbox]):not([type=radio]), textarea) { width: 100%; background: var(--p-bg); color: var(--p-text); border: 1px solid var(--p-line); border-radius: 12px; padding: 10px 12px; }
.pp-reviews .submit { background: var(--p-accent); color: var(--p-accent-ink); border: 0; border-radius: 16px 6px 16px 16px; padding: 10px 26px; font-weight: 800; }
.pp-reviews .commentlist { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.pp-reviews .commentlist li { background: var(--p-bg); border: 1px solid var(--p-line); border-radius: 16px; padding: 14px; }
.pp-related ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.pp-related ul.products::before, .pp-related ul.products::after { content: none !important; }
.pp-related ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 20px; padding: 14px; text-align: center; }
.pp-related ul.products li.product img { border-radius: 14px; margin-bottom: 10px; }
.pp-related ul.products li.product .woocommerce-loop-product__title { font-size: 14px; color: var(--p-text); }
.pp-related ul.products li.product .button { display: block; margin-top: 10px; background: var(--p-accent); color: var(--p-accent-ink); border-radius: 12px; padding: 8px; font-weight: 700; }

@media (max-width: 767px) {
	.prime-page, .prime-single, .prime-archive, .prime-woo { padding-block: 20px 40px; }
	.pp-buy, .pp-desc-body, .pp-reviews { padding: 16px; }
	.pp-related ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
