/*
Theme Name: Arkân — أركان للمتاجر
Theme URI: https://localhost/wordpress
Description: نسخة فرعية عربية متكاملة فوق Woodmart. هوية لونية فاخرة (زمردي وذهبي)، خط Cairo محلي، تعديلات متجر عربية كاملة RTL، شريط إعلان، زر واتساب، شارات خصم (سالب) وجديد، وتحسينات أداء.
Author: Arkân
Author URI: https://localhost/wordpress
Template: arkan
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: arkan
Requires at least: 6.0
Requires PHP: 7.4
*/

/* =========================================================
   0. الخطوط المحلية Cairo (Variable)
   ========================================================= */
@font-face {
	font-family: 'Cairo';
	font-style: normal;
	font-weight: 200 1000;
	font-display: swap;
	src: url('fonts/cairo-arabic.woff2') format('woff2');
	unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
	font-family: 'Cairo';
	font-style: normal;
	font-weight: 200 1000;
	font-display: swap;
	src: url('fonts/cairo-latinext.woff2') format('woff2');
	unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Cairo';
	font-style: normal;
	font-weight: 200 1000;
	font-display: swap;
	src: url('fonts/cairo-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================
   1. الهوية اللونية + تجاوز متغيرات Woodmart
   ========================================================= */
:root {
	/* هوية أركان */
	--ark-primary: #0F766E;
	--ark-primary-dark: #0C5E57;
	--ark-primary-tint: rgba(15, 118, 110, 0.1);
	--ark-accent: #C9A227;
	--ark-accent-dark: #A9851C;
	--ark-dark: #10312C;
	--ark-surface: #F6F4EE;
	--ark-grad: linear-gradient(120deg, #0F766E 0%, #0C5E57 55%, #10312C 100%);

	/* ربط هوية أركان بمتغيرات Woodmart الأساسية */
	--wd-primary-color: var(--ark-primary) !important;
	--wd-primary-hover: var(--ark-primary-dark) !important;
	--wd-primary-tint: var(--ark-primary-tint) !important;
	--wd-primary-text-color: #fff !important;
	--wd-accent-color: var(--ark-accent) !important;
	--wd-accent-hover: var(--ark-accent-dark) !important;

	/* الخط العربي على مستوى النظام */
	--wd-text-font: 'Cairo', 'Segoe UI', Tahoma, sans-serif !important;
	--wd-title-font: 'Cairo', 'Segoe UI', Tahoma, sans-serif !important;
	--wd-entities-title-font: 'Cairo', 'Segoe UI', Tahoma, sans-serif !important;

	/* حواف ومقاسات */
	--wd-brd-radius: 10px;
	--ark-max-w: 1400px;
	--ark-border: rgba(16, 49, 44, 0.1);
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
	letter-spacing: 0 !important;
}

h1, h2, h3, h4, h5, h6,
.wd-entities-title,
.wd-entry-title,
.widget-title,
.product-title {
	font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
	font-weight: 800;
	letter-spacing: 0 !important;
}

/* النصوص العربية لا تقبل letter-spacing */
.rtl :is(h1, h2, h3, h4, h5, h6, p, li, a, span, .wd-title, .title, .wd-entities-title, .product-title) {
	letter-spacing: 0 !important;
}

::selection {
	background: var(--ark-primary);
	color: #fff;
}

/* =========================================================
   2. شريط الإعلان العلوي
   ========================================================= */
.ark-announce {
	position: relative;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 9px 44px;
	text-align: center;
	background: var(--ark-grad);
	color: #fff;
	font-size: 0.92rem;
	font-weight: 600;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.ark-announce__text {
	margin: 0;
	line-height: 1.6;
}
.ark-announce strong {
	color: #F3CE5D;
	font-weight: 800;
}
.ark-announce__close {
	position: absolute;
	inset-inline-end: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}
.ark-announce__close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: translateY(-50%) rotate(90deg);
}

/* =========================================================
   3. شارات المنتجات (خصم — جديد)
   ========================================================= */
.ark-badge {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 11px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 800;
	line-height: 1.4;
	box-shadow: 0 4px 12px rgba(16, 49, 44, 0.22);
	pointer-events: none;
}
.ark-badge--sale {
	top: 12px;
	inset-inline-start: 12px;
	background: linear-gradient(135deg, #E14B3B 0%, #C03221 100%);
	color: #fff;
}
.ark-badge--new {
	top: 12px;
	inset-inline-end: 12px;
	background: linear-gradient(135deg, var(--ark-accent) 0%, var(--ark-accent-dark) 100%);
	color: #fff;
}
.arkan-has-new .ark-badge--sale {
	inset-inline-end: 12px;
}

/* تجاوز شارة Woodmart الافتراضية عندما نَعمل بلوننا */
.product-sale-label, .product-new-label {
	display: none;
}

/* =========================================================
   4. زر واتساب العائم
   ========================================================= */
.ark-whatsapp {
	position: fixed;
	z-index: 600;
	bottom: 22px;
	inset-inline-start: 22px;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 10px 17px;
	border-radius: 999px;
	background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(18, 140, 126, 0.42);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	animation: ark-wa-in 0.7s ease both;
}
.ark-whatsapp:hover {
	color: #fff;
	transform: translateY(-3px);
	box-shadow: 0 14px 30px rgba(18, 140, 126, 0.5);
}
.ark-whatsapp svg {
	width: 22px;
	height: 22px;
	fill: #fff;
	flex: 0 0 auto;
}
.ark-whatsapp__label {
	font-size: 0.92rem;
	font-weight: 700;
	white-space: nowrap;
}
@keyframes ark-wa-in {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* =========================================================
   5. ترويسة — لمسة مميزة
   ========================================================= */
.wd-header-main,
.wd-header-bottom {
	transition: box-shadow 0.3s ease, background 0.3s ease;
}
.wd-sticky-container.is-sticky .wd-header-main {
	box-shadow: 0 6px 24px rgba(16, 49, 44, 0.1);
}

.wd-header-brand .wd-logo img {
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.wd-header-brand:hover .wd-logo img {
	opacity: 0.82;
}

/* =========================================================
   6. بطاقات المنتجات
   ========================================================= */
.product-grid-item .product-wrapper,
.products-grid .product-wrapper,
.wd-products .product-wrapper {
	border-radius: 14px;
	overflow: hidden;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.product-grid-item:hover .product-wrapper,
.products-grid .product-wrapper:hover {
	box-shadow: 0 14px 34px rgba(16, 49, 44, 0.12);
	transform: translateY(-4px);
}
.product-grid-item .product-element-top img,
.products-grid .product-element-top img {
	transition: transform 0.45s ease;
}
.product-grid-item:hover .product-element-top img,
.products-grid:hover .product-element-top img {
	transform: scale(1.06);
}

/* ألوان الأسعار */
.product-price,
.price,
.wd-price,
.price del .amount,
.product-summary .price {
	color: var(--ark-primary-dark);
	font-weight: 800;
}
.price del {
	color: #9CA3AF !important;
	opacity: 0.75;
	font-weight: 500 !important;
}

/* =========================================================
   7. الأزرار
   ========================================================= */
.btn,
.wd-button-wrapper a,
a.btn,
button.wd-btn,
input[type='submit'] {
	font-family: 'Cairo', sans-serif;
	font-weight: 700;
	border-radius: 10px;
}
.wd-button-wrapper a.btn:not(.btn-scheme-black):not(.btn-scheme-white),
.wd-btn-default,
button.btn-color-primary,
.btn-color-primary,
a.btn-color-primary {
	background: var(--ark-grad);
	color: #fff;
	border: 0;
	box-shadow: 0 8px 20px rgba(15, 118, 110, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.wd-button-wrapper a.btn:not(.btn-scheme-black):not(.btn-scheme-white):hover,
button.btn-color-primary:hover,
a.btn-color-primary:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(15, 118, 110, 0.38);
	opacity: 0.96;
}

/* زر إضافة إلى السلة */
.shop-content-wrapper .button,
.single_add_to_cart_button,
.woocommerce .button.alt,
.button.wd-btn-style-default,
.wd-add-btn a.button {
	border-radius: 10px;
	font-weight: 700;
}

/* =========================================================
   8. شريط الثقة في صفحة المنتج
   ========================================================= */
.ark-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-top: 18px;
	padding: 12px 16px;
	border: 1px solid var(--ark-border);
	border-radius: 12px;
	background: var(--ark-surface);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ark-dark);
}
.ark-trust__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.ark-trust__item svg {
	width: 16px;
	height: 16px;
	fill: var(--ark-primary);
	flex: 0 0 auto;
}

/* =========================================================
   9. تذييل — لمسة مميزة
   ========================================================= */
.wd-footer footer,
.site-footer {
	background: var(--ark-dark) !important;
}
.site-footer .widget-title,
.site-footer .wd-entities-title {
	color: #F6F4EE;
}
.site-footer .footer-widget {
	border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer a {
	color: rgba(255, 255, 255, 0.72);
	transition: color 0.2s ease, padding-inline-start 0.2s ease;
}
.site-footer a:hover {
	color: #F3CE5D;
}
.copyrights-wrapper {
	background: rgba(0, 0, 0, 0.22) !important;
}

/* =========================================================
   10. عناصر عامة — القوائم، البلاغات، الأقسام
   ========================================================= */
	/* Slider / أدوات الرؤية */
.wd-nav > li > a,
.nav-title,
.widget_nav_menu a:not(.current_page_item) {
	font-family: 'Cairo', sans-serif;
	font-weight: 700;
}

	/* شارات التخفيضات / الرسم */
.woocommerce .star-rating,
.wd-star-rating,
.star-rating {
	color: var(--ark-accent) !important;
}

	/* أرقام العدادات */
.wd-cart-widget .header-cart-count {
	background: var(--ark-accent);
	color: var(--ark-dark);
}

	/* الأقسام المتناوبة */
.wd-section-title .section-title {
	font-weight: 800;
}
.wd-section-title .section-title:after {
	background: var(--ark-accent);
}

/* =========================================================
   11. تنفس الصفحة — Reveal أنيميشن
   ========================================================= */
.ark-reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.ark-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* =========================================================
   12. انيميشن السحر — الوميض الخفيف على الأزرار
   ========================================================= */
.btn-color-primary, .wd-button-wrapper a.btn {
	position: relative;
	overflow: hidden;
}
.btn-color-primary::after, .wd-button-wrapper a.btn:not(.btn-scheme-white)::after {
	content: '';
	position: absolute;
	inset-inline-start: -120%;
	top: 0;
	width: 60%;
	height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: skewX(-20deg);
	transition: inset-inline-start 0.6s ease;
}
.btn-color-primary:hover::after, .wd-button-wrapper a.btn:hover::after {
	inset-inline-start: 140%;
}

/* =========================================================
   13. الترقيم والصفحات
   ========================================================= */
.woocommerce-pagination .page-numbers:not(.dots) {
	border-radius: 10px;
}
.woocommerce-pagination .page-numbers.current {
	background: var(--ark-primary);
	color: #fff;
	border-color: transparent;
}

/* =========================================================
   14. شريط التمرير + التركيز
   ========================================================= */
* {
	scrollbar-width: thin;
	scrollbar-color: var(--ark-primary) transparent;
}
*::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}
*::-webkit-scrollbar-track {
	background: var(--ark-surface);
}
*::-webkit-scrollbar-thumb {
	background: var(--ark-primary);
	border-radius: 999px;
	border: 2px solid var(--ark-surface);
}

:focus-visible {
	outline: 2px solid var(--ark-accent) !important;
	outline-offset: 2px;
}

/* =========================================================
   15. صفحة 404
   ========================================================= */
.error404 .wd-page-content {
	padding-block: 90px;
}
.error404 .mark {
	font-family: 'Cairo', sans-serif;
	font-weight: 900;
	color: var(--ark-primary);
}
.error404 .wd-404 a.btn {
	background: var(--ark-grad);
	color: #fff;
	border-radius: 999px;
}

/* =========================================================
   16. استجابة الشاشات
   ========================================================= */
@media (max-width: 768.98px) {
	.ark-announce {
		padding: 8px 40px;
		font-size: 0.85rem;
	}
	.ark-whatsapp__label {
		display: none;
	}
	.ark-whatsapp {
		padding: 12px;
		bottom: 18px;
		inset-inline-start: 18px;
	}
	.ark-trust {
		font-size: 0.8rem;
	}
}

/* شورتكودات أركان — CTA */
.ark-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 30px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-family: 'Cairo', sans-serif;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.ark-cta--primary {
	background: var(--ark-grad);
	color: #fff;
	box-shadow: 0 10px 24px rgba(15, 118, 110, 0.3);
}
.ark-cta--primary:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 14px 30px rgba(15, 118, 110, 0.42);
}
.ark-cta--gold {
	background: linear-gradient(120deg, #D9B64B 0%, var(--ark-accent) 60%, var(--ark-accent-dark) 100%);
	color: #fff;
	box-shadow: 0 10px 24px rgba(201, 162, 39, 0.35);
}
.ark-cta--gold:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 14px 30px rgba(201, 162, 39, 0.5);
}
.ark-cta--outline {
	background: transparent;
	color: var(--ark-primary-dark);
	border-color: var(--ark-primary);
}
.ark-cta--outline:hover {
	background: var(--ark-primary);
	color: #fff;
}
.ark-cta--white {
	background: #fff;
	color: var(--ark-primary-dark);
	box-shadow: 0 10px 24px rgba(16, 49, 44, 0.18);
}
.ark-cta--white:hover {
	color: var(--ark-primary-dark);
	transform: translateY(-2px);
}

/* شورتكود قائمة النقاط */
.ark-checklist {
	margin: 0 0 1.2em;
	padding: 0;
	list-style: none;
}
.ark-checklist__title {
	margin-bottom: 0.6em;
	font-family: 'Cairo', sans-serif;
	font-weight: 800;
	color: var(--ark-dark);
}
.ark-checklist li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 10px;
	font-weight: 600;
	color: #33415C;
}
.ark-checklist svg {
	width: 20px;
	height: 20px;
	fill: var(--ark-primary);
	flex: 0 0 auto;
	margin-top: 2px;
}

/* شورتكود صندوق الإشعار */
.ark-notice {
	margin-bottom: 1.2em;
	padding: 14px 18px;
	border-radius: 10px;
	border-inline-start: 4px solid;
	font-family: 'Cairo', sans-serif;
	font-weight: 600;
	line-height: 1.7;
}
.ark-notice--info {
	background: var(--ark-primary-tint);
	border-color: var(--ark-primary);
	color: var(--ark-primary-dark);
}
.ark-notice--success {
	background: rgba(37, 211, 102, 0.1);
	border-color: #25D366;
	color: #0C5E34;
}
.ark-notice--warn {
	background: rgba(234, 179, 8, 0.12);
	border-color: #EAB308;
	color: #7A5C00;
}

/* احترام تفضيلات تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	.ark-reveal {
		opacity: 1;
		transform: none;
	}
}