/* =====================================================
   حالت تاریک — رنگ‌بندی اختصاصی، جدا از پالت روشن اصلی سایت
   فعال می‌شود با data-theme="dark" روی <html>
   ===================================================== */

:root{
	color-scheme:light;
}

:root[data-theme="dark"]{
	color-scheme:dark;
}

[data-theme="dark"]{

	--hk-dark-bg:#121418;
	--hk-dark-surface:#1b1e24;
	--hk-dark-surface-alt:#242830;
	--hk-dark-border:#31353e;
	--hk-dark-text:#eceef1;
	--hk-dark-text-muted:#9aa1ab;

}

/* ---------- پایه ---------- */

[data-theme="dark"] html,
[data-theme="dark"] body{
	background:var(--hk-dark-bg) !important;
	color:var(--hk-dark-text);
}

[data-theme="dark"] a{
	color:inherit;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6{
	color:var(--hk-dark-text);
}

[data-theme="dark"] .horam-page-content,
[data-theme="dark"] p{
	color:var(--hk-dark-text-muted);
}

/* ---------- دکمه‌ی تغییر حالت ---------- */

.horam-dark-toggle{
	width:38px;
	height:38px;
	border-radius:50%;
	border:1.5px solid #e5e7eb;
	background:#fff;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	cursor:pointer;
	font-size:16px;
	position:relative;
}

.horam-dark-toggle-icon{
	position:absolute;
	transition:opacity .2s var(--ease), transform .2s var(--ease);
}

.horam-dark-toggle-icon-moon{
	opacity:0;
	transform:scale(.6);
}

[data-theme="dark"] .horam-dark-toggle{
	background:var(--hk-dark-surface-alt);
	border-color:var(--hk-dark-border);
}

[data-theme="dark"] .horam-dark-toggle-icon-sun{
	opacity:0;
	transform:scale(.6);
}

[data-theme="dark"] .horam-dark-toggle-icon-moon{
	opacity:1;
	transform:scale(1);
}

/* ---------- هدر دسکتاپ ---------- */

[data-theme="dark"] .hk-topbar{
	background:var(--hk-dark-surface);
	color:var(--hk-dark-text-muted);
}

[data-theme="dark"] .hk-header{
	background:rgba(18,20,24,.92) !important;
	box-shadow:0 1px 0 var(--hk-dark-border);
}

[data-theme="dark"] .hk-trust-grid div{
	background:var(--hk-dark-surface) !important;
	color:var(--hk-dark-text);
}

[data-theme="dark"] .horam-mega-menu{
	background:var(--hk-dark-surface) !important;
	border-bottom-color:var(--hk-dark-border);
}

[data-theme="dark"] .horam-mega-menu a{
	color:var(--hk-dark-text);
}

[data-theme="dark"] .horam-mini-cart{
	background:var(--hk-dark-surface) !important;
	color:var(--hk-dark-text);
}

/* ---------- بنرهای دسته‌بندی + میانی (دسکتاپ) ---------- */

[data-theme="dark"] .banner-item{
	background:linear-gradient(135deg,#23262d,#1b1e24);
}

/* ---------- کارت محصول ---------- */

[data-theme="dark"] .horam-card-inner{
	background:var(--hk-dark-surface) !important;
	box-shadow:0 4px 16px rgba(0,0,0,.35);
}

[data-theme="dark"] .horam-title,
[data-theme="dark"] .horam-price{
	color:var(--hk-dark-text);
}

[data-theme="dark"] .horam-view-btn.horam-btn-outline{
	border-color:var(--hk-dark-border);
	color:var(--hk-dark-text);
}

/* ---------- عمومی ووکامرس (سبد خرید و حساب کاربری دسکتاپ) ---------- */

[data-theme="dark"] .woocommerce table.shop_table{
	background:var(--hk-dark-surface);
	color:var(--hk-dark-text);
	border-color:var(--hk-dark-border);
}

[data-theme="dark"] .woocommerce table.shop_table th,
[data-theme="dark"] .woocommerce table.shop_table td{
	border-color:var(--hk-dark-border) !important;
	color:var(--hk-dark-text);
}

[data-theme="dark"] .woocommerce-MyAccount-navigation ul{
	background:var(--hk-dark-surface);
}

[data-theme="dark"] .woocommerce-MyAccount-navigation li a{
	color:var(--hk-dark-text);
}

[data-theme="dark"] .woocommerce form .form-row input.input-text,
[data-theme="dark"] .woocommerce form .form-row select,
[data-theme="dark"] .woocommerce form .form-row textarea,
[data-theme="dark"] .woocommerce-account input.input-text,
[data-theme="dark"] .woocommerce-account select,
[data-theme="dark"] .woocommerce-account textarea{
	background:var(--hk-dark-surface-alt) !important;
	border-color:var(--hk-dark-border) !important;
	color:var(--hk-dark-text) !important;
}

/* ---------- فرم‌های اختصاصی قالب (چک‌اوت، بیعانه، ورود/ثبت‌نام) ---------- */

[data-theme="dark"] .horam-auth-wrap,
[data-theme="dark"] .woocommerce-checkout #customer_details,
[data-theme="dark"] .woocommerce-checkout #order_review,
[data-theme="dark"] .horam-deposit-box,
[data-theme="dark"] .hk-mp-buybox{
	background:var(--hk-dark-surface) !important;
	border-color:var(--hk-dark-border) !important;
}

[data-theme="dark"] .horam-auth-field input,
[data-theme="dark"] .horam-otp-digit,
[data-theme="dark"] .woocommerce-checkout .form-row input.input-text,
[data-theme="dark"] .woocommerce-checkout .form-row textarea,
[data-theme="dark"] .horam-deposit-field input{
	background:var(--hk-dark-surface-alt) !important;
	border-color:var(--hk-dark-border) !important;
	color:var(--hk-dark-text) !important;
}

[data-theme="dark"] .horam-auth-title,
[data-theme="dark"] .horam-auth-field label,
[data-theme="dark"] .woocommerce-checkout .form-row label{
	color:var(--hk-dark-text);
}

[data-theme="dark"] .horam-deposit-card{
	background:#0c0d10;
}

/* =====================================================
   موبایل — هدر، درایور، تب‌بار، فروشگاه، تک‌محصول، صفحات عمومی
   ===================================================== */

[data-theme="dark"] .hk-m-header,
[data-theme="dark"] .hk-m-drawer,
[data-theme="dark"] .hk-m-search-panel,
[data-theme="dark"] .hk-m-footer,
[data-theme="dark"] .hk-m-tabbar,
[data-theme="dark"] .hk-m-product,
[data-theme="dark"] .hk-m-shop-toolbar,
[data-theme="dark"] .hk-mp-buybox,
[data-theme="dark"] .hk-mp-accordion-head,
[data-theme="dark"] .hk-m-page{
	background:var(--hk-dark-bg);
	color:var(--hk-dark-text);
}

[data-theme="dark"] .hk-m-header{
	background:var(--hk-dark-surface);
	box-shadow:0 1px 0 var(--hk-dark-border);
}

[data-theme="dark"] .hk-m-drawer,
[data-theme="dark"] .hk-m-search-panel{
	background:var(--hk-dark-surface);
}

[data-theme="dark"] .hk-m-drawer-header,
[data-theme="dark"] .hk-m-drawer-footer,
[data-theme="dark"] .hk-mp-accordion{
	border-color:var(--hk-dark-border) !important;
}

[data-theme="dark"] .hk-m-drawer-account,
[data-theme="dark"] .hk-m-drawer-close,
[data-theme="dark"] .hk-m-drawer-menu li a{
	background:var(--hk-dark-surface-alt);
	color:var(--hk-dark-text);
	border-color:var(--hk-dark-border) !important;
}

[data-theme="dark"] .hk-m-menu-btn span{
	background:var(--hk-dark-text);
}

[data-theme="dark"] .hk-m-search-btn,
[data-theme="dark"] .hk-m-search-close,
[data-theme="dark"] .hk-mp-icon-btn{
	background:var(--hk-dark-surface-alt);
	color:var(--hk-dark-text);
}

[data-theme="dark"] .hk-m-tabbar{
	background:var(--hk-dark-surface);
	box-shadow:0 -4px 20px rgba(0,0,0,.35);
}

[data-theme="dark"] .hk-m-tabbar a,
[data-theme="dark"] .hk-m-tabbar-search-btn{
	color:var(--hk-dark-text-muted);
}

[data-theme="dark"] .hk-m-shop-toolbar{
	border-bottom-color:var(--hk-dark-border);
}

[data-theme="dark"] .hk-m-shop-sort select,
[data-theme="dark"] .hk-mp-buybox .variations select,
[data-theme="dark"] .hk-m-search-panel input{
	background:var(--hk-dark-surface-alt);
	border-color:var(--hk-dark-border);
	color:var(--hk-dark-text);
}

[data-theme="dark"] .hk-mp-specs th,
[data-theme="dark"] .hk-mp-specs td{
	border-color:var(--hk-dark-border);
}

[data-theme="dark"] .hk-mp-title,
[data-theme="dark"] .hk-mp-accordion-head,
[data-theme="dark"] .hk-mp-specs th{
	color:var(--hk-dark-text);
}

[data-theme="dark"] .hk-mp-chip{
	background:var(--hk-dark-surface-alt);
	color:var(--hk-dark-text-muted);
}

[data-theme="dark"] .hk-mp-buybox .quantity{
	background:var(--hk-dark-surface-alt);
	border-color:var(--hk-dark-border);
}

[data-theme="dark"] .hk-mp-buybox .quantity .qty{
	color:var(--hk-dark-text);
}

[data-theme="dark"] .hk-m-banner-item,
[data-theme="dark"] .hk-m-banner-wide{
	background:linear-gradient(135deg,#23262d,#1b1e24);
}

/* ---------- سبد خرید / حساب کاربری موبایل ---------- */

[data-theme="dark"] .woocommerce-cart .hk-m-page table.shop_table tr.cart_item,
[data-theme="dark"] .woocommerce-cart .hk-m-page .cart_totals{
	background:var(--hk-dark-surface);
	border-color:var(--hk-dark-border);
}

[data-theme="dark"] .woocommerce-cart .hk-m-page td.product-name,
[data-theme="dark"] .woocommerce-cart .hk-m-page .cart_totals h2{
	color:var(--hk-dark-text);
}

[data-theme="dark"] .woocommerce-account .hk-m-page .woocommerce-MyAccount-navigation li a{
	background:var(--hk-dark-surface-alt);
	color:var(--hk-dark-text);
}

[data-theme="dark"] .woocommerce-account .hk-m-page .woocommerce-MyAccount-content .input-text,
[data-theme="dark"] .woocommerce-account .hk-m-page .woocommerce-MyAccount-content select,
[data-theme="dark"] .woocommerce-account .hk-m-page .woocommerce-MyAccount-content textarea{
	background:var(--hk-dark-surface-alt);
	border-color:var(--hk-dark-border);
	color:var(--hk-dark-text);
}

/* ---------- استثنا: محتوایی که همیشه باید سفید ثابت بماند ---------- */

/* متن سفید روی عکس بنرها (اورلی گرادیانی) باید در هر دو حالت سفید بماند */
[data-theme="dark"] .banner-content,
[data-theme="dark"] .banner-content h3,
[data-theme="dark"] .hk-m-banner-content,
[data-theme="dark"] .hk-m-banner-content h3,
[data-theme="dark"] .hk-mp-badge{
	color:#fff;
}
