/* =============================================================
   Nikmehr — self-hosted Vazirmatn webfont
   -------------------------------------------------------------
   A single variable WOFF2 (all weights 100–900) hosted in the theme,
   so the page no longer depends on an external CDN that may be slow
   or blocked. `font-display: swap` keeps text visible while it loads.
   ============================================================= */

@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/Vazirmatn[wght].woff2') format('woff2-variations');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* =============================================================
   Nikmehr — Design tokens & global layout
   Brand: #0B1C45 (primary)  /  #FF9900 (accent)
   ============================================================= */

:root {
	/* Brand */
	--nik-primary: #0B1C45;
	--nik-primary-700: #0f2456;
	--nik-primary-600: #163167;
	--nik-primary-500: #1e3f80;
	--nik-accent: #FF9900;
	--nik-accent-600: #e88a00;

	/* Special-offers red (پیشنهاد ویژه). A punchy crimson that stands apart from
	   the brand orange while staying warm; -600 is the darker gradient stop. */
	--nik-deal: #E01F3D;
	--nik-deal-600: #B4142E;

	/* Neutrals */
	--nik-bg: #ffffff;
	--nik-bg-soft: #f6f8fb;
	--nik-bg-muted: #eef2f7;
	--nik-border: #e2e8f0;
	--nik-text: #1a2332;
	--nik-text-soft: #5a6b85;
	--nik-text-faint: #8a97ab;

	/* States */
	--nik-success: #0f6e56;
	--nik-success-bg: #e7f4ee;

	/* Layout */
	--nik-container: 1280px;
	--nik-radius: 10px;
	--nik-radius-sm: 6px;
	--nik-gap: 16px;

	/* Type */
	--nik-font: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--nik-bg);
	color: var(--nik-text);
	font-family: var(--nik-font);
	line-height: 1.7;
	direction: rtl;
	/* Guard against stray horizontal overflow (e.g. an off-canvas drawer parked
	   just off-screen). `clip` stops sideways scrolling without trapping the
	   sticky/fixed elements the way `hidden` would. */
	overflow-x: clip;
}

/* Apply the Persian font to form controls and WooCommerce widgets too. */
input, button, select, textarea, .woocommerce, .woocommerce-page {
	font-family: var(--nik-font);
}

a { color: var(--nik-primary-500); text-decoration: none; }
a:hover { color: var(--nik-accent-600); }

img { max-width: 100%; height: auto; display: block; }

.container {
	max-width: var(--nik-container);
	margin-inline: auto;
	padding-inline: 16px;
	width: 100%;
}

/* Accessibility helpers */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%); height: 1px; width: 1px;
	margin: -1px; overflow: hidden; padding: 0; position: absolute;
}
.skip-link {
	/* Hidden off-screen without widening the page (no -9999px, which overflows
	   in RTL). Becomes visible only when focused. */
	position: absolute; top: 0; inset-inline-start: 8px; z-index: 1000;
	transform: translateY(-150%);
	background: var(--nik-primary); color: #fff; padding: 10px 16px;
	transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(8px); outline: 2px solid #fff; outline-offset: 2px; color: #fff; }
#primary:focus { outline: none; }

/* Buttons */
.nik-btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 20px; border-radius: var(--nik-radius-sm);
	font-weight: 600; font-size: 14px; cursor: pointer;
	border: 1px solid transparent; transition: background .15s, color .15s;
}
.nik-btn--primary {
	background: var(--nik-accent); color: #1a1a1a;
	box-shadow: 0 6px 16px -4px rgba(255,153,0,.55);
}
.nik-btn--primary:hover { background: var(--nik-accent-600); color: #1a1a1a; }
.nik-btn--ghost { background: transparent; color: var(--nik-text-soft); border-color: var(--nik-border); }
.nik-btn--ghost:hover { color: var(--nik-accent-600); border-color: var(--nik-accent); }

/* Section heading */
.nik-section { padding-block: 40px; }
.nik-section__head {
	margin-bottom: 22px;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	column-gap: 16px;
}
.nik-section__title {
	display: flex; align-items: center; gap: 11px;
	font-size: 22px; font-weight: 800; color: var(--nik-primary); margin: 0;
	grid-column: 1; grid-row: 1;
}
.nik-section__title::before {
	content: ''; width: 5px; height: 24px;
	background: linear-gradient(180deg, var(--nik-accent), var(--nik-accent-600));
	border-radius: 3px;
}
.nik-section__sub {
	color: var(--nik-text-soft); margin: 7px 0 0; padding-inline-start: 16px; font-size: 14px;
	grid-column: 1; grid-row: 2;
}
/* The "view all" link and the carousel controls sit on the inline-end,
   spanning the title rows so they stay vertically centered. */
.nik-section__more {
	font-size: 13px; font-weight: 700; color: var(--nik-accent-600);
	display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
	grid-column: 2; grid-row: 1 / -1; align-self: center;
}
.nik-section__more:hover { color: var(--nik-accent); }

/* Grid helpers */
.nik-grid { display: grid; gap: var(--nik-gap); }
.nik-grid--2 { grid-template-columns: repeat(2, 1fr); }
.nik-grid--3 { grid-template-columns: repeat(3, 1fr); }
.nik-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .nik-grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .nik-grid--4, .nik-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .nik-grid--4, .nik-grid--3, .nik-grid--2 { grid-template-columns: 1fr 1fr; } }

/* Icons */
.nik-icon { display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; }

/* =============================================================
   Topbar
   ============================================================= */
.nik-topbar {
	background: var(--nik-bg-soft);
	color: var(--nik-text-soft);
	font-size: 12.5px;
	border-bottom: 1px solid var(--nik-border);
}
.nik-topbar__inner {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 38px; gap: 12px; flex-wrap: wrap;
}
.nik-topbar__group { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nik-topbar__item {
	display: inline-flex; align-items: center; gap: 6px; padding-block: 7px;
}
.nik-topbar__item--muted { color: var(--nik-text-faint); }
.nik-topbar__item--accent { color: var(--nik-accent-600); font-weight: 700; }
.nik-topbar__icon { flex-shrink: 0; opacity: .85; }

/* =============================================================
   Header
   ============================================================= */
.nik-header {
	background: #ffffff;
	color: var(--nik-text);
	position: relative;
	box-shadow: 0 4px 18px -12px rgba(11, 28, 69, .35);
}
/* Subtle accent hairline at the bottom edge. */
.nik-header::after {
	content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
	background: linear-gradient(90deg, transparent, var(--nik-accent), transparent);
	opacity: .7;
}
.nik-header__inner {
	display: flex; align-items: center; gap: 24px;
	min-height: 84px; padding-block: 14px;
}
.nik-header__brand { display: flex; align-items: center; gap: 12px; color: var(--nik-primary); flex-shrink: 0; }
.nik-header__brand:hover { color: var(--nik-primary); }
.nik-header__logo {
	width: 48px; height: 48px; flex-shrink: 0;
	object-fit: contain; display: block;
	transition: transform .25s ease;
}
.nik-header__brand:hover .nik-header__logo {
	transform: translateY(-1px) scale(1.04);
}
.nik-header__brand--logotype { min-width: 0; }
.nik-header__logotype {
	display: block; width: auto; height: auto; max-width: 210px; max-height: 58px;
	object-fit: contain; transition: transform .25s ease;
}
.nik-header__brand--logotype:hover .nik-header__logotype { transform: translateY(-1px); }
.nik-header__brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.nik-header__name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--nik-primary); }
.nik-header__tagline { font-size: 11px; color: var(--nik-text-soft); }

.nik-header__search {
	flex: 1; display: flex; align-items: center;
	background: var(--nik-bg-soft); border-radius: 999px; overflow: hidden;
	min-width: 0; max-width: 640px; margin-inline: auto;
	padding-inline-start: 16px;
	border: 1px solid var(--nik-border);
	box-shadow: none;
	transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.nik-header__search:hover { background: #fff; }
.nik-header__search:focus-within {
	background: #fff; border-color: var(--nik-accent);
	box-shadow: 0 0 0 4px rgba(255, 153, 0, .18);
}
.nik-header__search-icon { color: var(--nik-text-faint); flex-shrink: 0; }
.nik-header__search input[type="search"] {
	flex: 1; min-width: 0; border: 0; outline: 0;
	padding: 12px 12px; font-size: 14px; font-family: inherit; background: transparent;
	color: var(--nik-text);
}
.nik-header__search input[type="search"]::placeholder { color: var(--nik-text-faint); }
.nik-header__search-btn {
	border: 0; cursor: pointer; padding: 0 26px; align-self: stretch;
	background: linear-gradient(135deg, var(--nik-accent), var(--nik-accent-600));
	color: #1a1a1a; font-weight: 800; font-size: 13.5px;
	transition: filter .18s ease;
}
.nik-header__search-btn:hover { filter: brightness(1.06); }

.nik-header__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nik-header__action {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	color: var(--nik-text-soft); font-size: 11px; font-weight: 600; position: relative;
	padding: 8px 12px; border-radius: 12px; background: none; border: 0; cursor: pointer; font-family: inherit;
	transition: color .18s ease, background .18s ease, transform .12s ease;
}
/* The search toggle is a mobile affordance only; on desktop the full search bar
   is always visible, so the icon button is hidden. */
.nik-header__action--search { display: none; }
.nik-header__action:hover {
	color: var(--nik-primary); background: var(--nik-bg-soft);
}
.nik-header__action:active { transform: translateY(1px); }
.nik-header__action-icon { stroke-width: 1.7; }
.nik-header__action-iconwrap { position: relative; display: inline-flex; }

/* Highlighted "instant quote" action — orange, draws the eye next to the
   plainer account/wishlist actions. A small lightning badge marks it as fast. */
.nik-header__action--quote {
	color: #fff; background: var(--nik-accent);
	font-weight: 700;
}
.nik-header__action--quote:hover { color: #fff; background: var(--nik-accent-600); }
.nik-header__action--quote .nik-header__action-icon { stroke: #fff; }
.nik-header__action-bolt {
	position: absolute; top: -6px; inset-inline-start: -8px;
	width: 18px; height: 18px; border-radius: 50%;
	display: grid; place-items: center;
	background: #fff; color: var(--nik-accent-600);
	border: 2px solid var(--nik-accent);
}
.nik-header__action--quote:hover .nik-header__action-bolt { border-color: var(--nik-accent-600); }
.nik-header__cart { color: var(--nik-primary); }
.nik-header__cart:hover { color: var(--nik-accent-600); background: rgba(255, 153, 0, .12); }
.nik-header__cart-count {
	position: absolute; top: -7px; inset-inline-start: -9px;
	background: var(--nik-accent); color: #1a1a1a;
	font-size: 10px; font-weight: 800; min-width: 18px; height: 18px;
	border-radius: 9px; display: grid; place-items: center; padding-inline: 4px;
	border: 2px solid #fff;
	box-shadow: 0 2px 6px rgba(255, 153, 0, .5);
}

/* =============================================================
   Primary nav / mega menu
   ============================================================= */
.nik-nav {
	background: #ffffff;
	border-bottom: 1px solid var(--nik-border);
	position: sticky;
	top: var(--nik-nav-sticky-top, 0px);
	z-index: 75;
	transition: box-shadow .24s ease, border-color .24s ease;
}
.admin-bar .nik-nav { --nik-nav-sticky-top: 32px; }
.nik-nav.is-stuck {
	border-bottom-color: rgba(11, 28, 69, .12);
	box-shadow: 0 10px 28px -18px rgba(11, 28, 69, .55);
}
/* Accent hairline at the bottom edge — mirrors the header, so the nav bar
   reads as a distinct, separated band. */
.nik-nav::after {
	content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
	background: linear-gradient(90deg, transparent, var(--nik-accent), transparent);
	opacity: .7;
}
/* Single row: every category sits inline with tight spacing; a faint divider
   separates each item so the dense bar still reads cleanly. */
.nik-nav__list {
	display: flex; flex-wrap: nowrap; gap: 0; margin: 0; padding: 0; list-style: none;
	align-items: stretch;
}
.nik-nav__list > li { flex-shrink: 0; }
/* Faint hairline divider between top-level items (not before the first). */
.nik-nav__list > li + li {
	border-inline-start: 1px solid var(--nik-border);
}
.nik-nav__list > li > a {
	display: flex; align-items: center; gap: 4px; white-space: nowrap;
	padding: 12px 11px; font-size: 12.5px; color: var(--nik-text); font-weight: 600;
	position: relative; transition: color .18s ease, background .18s ease;
}
/* Animated underline pill instead of a hard 3px border. */
.nik-nav__list > li > a::after {
	content: ''; position: absolute; inset-inline: 11px; bottom: 5px; height: 2px;
	background: var(--nik-accent); border-radius: 2px;
	transform: scaleX(0); transform-origin: center; transition: transform .22s ease;
}
.nik-nav__list > li > a:hover,
.nik-nav__list > li.current-menu-item > a {
	color: var(--nik-primary); background: var(--nik-bg-soft);
}
.nik-nav__list > li > a:hover::after,
.nik-nav__list > li.current-menu-item > a::after { transform: scaleX(1); }

/* ---- Overflow ("…") menu ------------------------------------ */
/* JS shows this and moves trailing items into it once the bar is full. */
.nik-nav__item--overflow { margin-inline-start: auto; } /* push to the end */
.nik-nav__overflow-btn {
	display: flex; align-items: center; justify-content: center;
	height: 100%; min-height: 42px; padding: 0 12px;
	background: none; border: 0; cursor: pointer; color: var(--nik-text-soft);
	transition: color .18s ease, background .18s ease;
}
.nik-nav__item--overflow:hover > .nik-nav__overflow-btn,
.nik-nav__item--overflow:focus-within > .nik-nav__overflow-btn {
	color: var(--nik-primary); background: var(--nik-bg-soft);
}
/* The overflow panel opens DOWN like a first-level dropdown; edge-anchoring is
   handled below (mirrors the first-level rule specificity). */
.nik-nav__sub--overflow { min-width: 220px; }
/* Items living inside the overflow panel read as normal vertical rows. */
.nik-nav__sub--overflow > .nik-nav__item { border: 0; }

/* ---- Multi-level dynamic dropdowns -------------------------- */
/* The bar items can have flyout submenus. The first level drops DOWN below
   the nav bar; every deeper level flies out to the side (start side = right
   in RTL, so visually they cascade leftwards). Pure-CSS hover reveal. */
.nik-nav__item { position: relative; }
.nik-nav__item > a { display: flex; align-items: center; }

/* The caret on items that have children. Points DOWN at rest; flips to UP on
   hover/focus of a top-level item. */
.nik-nav__caret { flex-shrink: 0; opacity: .6; transition: transform .2s ease; }
.nik-nav__list > .nik-nav__item.has-children:hover > a .nik-nav__caret,
.nik-nav__list > .nik-nav__item.has-children:focus-within > a .nik-nav__caret { transform: rotate(180deg); }
/* Deeper-level carets point toward the flyout direction (inline-start = left
   in RTL): rotate the down-chevron 90° clockwise. */
.nik-nav__sub .nik-nav__caret { margin-inline-start: auto; transform: rotate(90deg); }

/* Submenu panels (shared) */
.nik-nav__sub {
	position: absolute; z-index: 60; min-width: 230px; margin: 0; padding: 6px;
	list-style: none; background: #fff;
	border: 1px solid var(--nik-border); border-radius: 12px;
	box-shadow: 0 18px 40px -16px rgba(11,28,69,.30);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
/* First level: drop straight down, aligned under the trigger. */
.nik-nav__list > .nik-nav__item > .nik-nav__sub {
	top: 100%; inset-inline-start: 0; margin-top: 6px;
}
/* Edge flip (first level): for the bar's leftmost items the start-anchored panel
   extends left and clips. JS adds --flip-top to re-anchor it to the item's end
   edge so it extends toward the inline end (right) instead. */
.nik-nav__list > .nik-nav__item > .nik-nav__sub--flip-top {
	inset-inline-start: auto; inset-inline-end: 0;
}
/* Deeper levels: fly out to the inline-start (left in RTL), top-aligned. */
.nik-nav__sub .nik-nav__sub {
	top: -7px; inset-inline-start: 100%; margin-inline-start: 6px; transform: translateX(0) translateY(6px);
}
/* Edge flip: when a deeper flyout would overflow the viewport on its natural
   side, JS adds .nik-nav__sub--flip so it opens toward the opposite side instead. */
.nik-nav__sub .nik-nav__sub.nik-nav__sub--flip {
	inset-inline-start: auto; inset-inline-end: 100%;
	margin-inline-start: 0; margin-inline-end: 6px;
}
/* Carets inside a flipped branch point the other way. */
.nik-nav__sub--flip .nik-nav__caret,
.nik-nav__item--flip > a .nik-nav__caret { transform: rotate(-90deg); }

/* Overflow panel anchors to the inline-end edge (the trigger sits there). The
   selector mirrors the first-level rule's specificity so it actually wins. */
.nik-nav__list > .nik-nav__item--overflow > .nik-nav__sub--overflow {
	inset-inline-start: auto; inset-inline-end: 0;
}

/* Reveal on hover / keyboard focus, one level at a time. Click-toggle
   (.is-open) covers touch / keyboard users on the overflow trigger. */
.nik-nav__item:hover > .nik-nav__sub,
.nik-nav__item:focus-within > .nik-nav__sub,
.nik-nav__item--overflow.is-open > .nik-nav__sub {
	opacity: 1; visibility: visible; transform: translateY(0);
	transition: opacity .18s ease, transform .18s ease;
}

/* Submenu links */
.nik-nav__sub .nik-nav__item > a {
	display: flex; align-items: center; gap: 6px;
	padding: 9px 12px; border-radius: 8px;
	font-size: 13px; font-weight: 600; color: var(--nik-text);
	transition: background .15s ease, color .15s ease;
}
.nik-nav__sub .nik-nav__item > a:hover,
.nik-nav__sub .nik-nav__item:focus-within > a {
	background: var(--nik-bg-soft); color: var(--nik-accent-600);
}
.nik-nav__sub .nik-nav__item > a > span { flex: 1; }

/* ---- Mobile chrome (burger / drawer head / backdrop) -------- */
/* Hidden on desktop; the media queries below switch them on. */
.nik-nav__burger,
.nik-nav__sticky-brand,
.nik-nav__menu-head,
.nik-nav__close,
.nik-nav__backdrop { display: none; }

/* =============================================================
   Footer (white · minimal · blueprint-signal motif · wave separator)
   ============================================================= */
.nik-footer {
	position: relative; isolation: isolate; overflow: hidden;
	margin-top: 64px; color: var(--nik-text-soft);
	background:
		radial-gradient(680px 300px at 88% 120%, rgba(255,153,0,.07), transparent 70%),
		linear-gradient(180deg, #ffffff 0%, var(--nik-bg-soft) 100%);
}
/* Industrial gear / cog motif (on-brand for an electrical & automation supplier),
   in brand navy, very faint, fading out toward the bottom. */
.nik-footer::before {
	content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260' fill='none' stroke='%230B1C45' stroke-width='3' stroke-linejoin='round'%3E%3Cg transform='translate(70 70)'%3E%3Cpath d='M0-42l7 2 4-9 9 4-2 9 8 5 7-7 7 7-7 7 5 8 9-2 4 9-9 4 2 7-2 7 9 4-4 9-9-2-5 8 7 7-7 7-7-7-8 5 2 9-9 4-4-9-7 2-7-2-4 9-9-4 2-9-8-5-7 7-7-7 7-7-5-8-9 2-4-9 9-4-2-7 2-7-9-4 4-9 9 2 5-8-7-7 7-7 7 7 8-5-2-9 9-4z'/%3E%3Ccircle r='15'/%3E%3C/g%3E%3Cg transform='translate(195 185) scale(.7)'%3E%3Cpath d='M0-42l7 2 4-9 9 4-2 9 8 5 7-7 7 7-7 7 5 8 9-2 4 9-9 4 2 7-2 7 9 4-4 9-9-2-5 8 7 7-7 7-7-7-8 5 2 9-9 4-4-9-7 2-7-2-4 9-9-4 2-9-8-5-7 7-7-7 7-7-5-8-9 2-4-9 9-4-2-7 2-7-9-4 4-9 9 2 5-8-7-7 7-7 7 7 8-5-2-9 9-4z'/%3E%3Ccircle r='15'/%3E%3C/g%3E%3C/svg%3E");
	background-size: 300px 300px;
	background-repeat: repeat;
	opacity: .045;
	-webkit-mask-image: radial-gradient(120% 130% at 90% 100%, #000 0%, transparent 70%);
	mask-image: radial-gradient(120% 130% at 90% 100%, #000 0%, transparent 70%);
}

/* Elegant separator: a soft accent-tinted wave that carves the footer's band
   away from the (white) page content above. */
.nik-footer__divider { position: relative; line-height: 0; }
.nik-footer__divider svg { display: block; width: 100%; height: 46px; }
.nik-footer__divider path { fill: var(--nik-accent); }

.nik-footer__grid {
	display: grid; grid-template-columns: minmax(230px, 1.7fr) repeat(4, minmax(112px, 1fr)); gap: clamp(16px, 2vw, 26px);
	padding-block: 14px 38px;
}

/* Brand mark mirrors the header's logo. */
.nik-footer__brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 14px; color: var(--nik-primary); }
.nik-footer__brand:hover { color: var(--nik-primary); }
.nik-footer__logo {
	width: 44px; height: 44px; flex-shrink: 0;
	object-fit: contain; display: block;
}
.nik-footer__brand-name { font-size: 17px; font-weight: 800; color: var(--nik-primary); }

.nik-footer__title {
	position: relative; font-size: 14px; font-weight: 800; color: var(--nik-primary); margin: 0 0 16px; padding-bottom: 10px;
}
.nik-footer__title::after {
	content: ''; position: absolute; inset-inline-start: 0; bottom: 0;
	width: 28px; height: 2px; border-radius: 2px; background: var(--nik-accent);
}
.nik-footer__about p { font-size: 13px; line-height: 1.9; margin: 0; max-width: 38ch; color: var(--nik-text-soft); }
.nik-footer__address {
	display: flex; align-items: flex-start; gap: 8px; max-width: 38ch;
	margin-top: 14px; color: var(--nik-text-soft); font-size: 12.5px; line-height: 1.9;
	font-style: normal;
}
.nik-footer__address svg { flex: 0 0 auto; margin-top: 4px; color: var(--nik-accent-600); }
.nik-footer__address span { flex: 1; text-align: justify; text-align-last: start; }
.nik-footer__list { list-style: none; margin: 0; padding: 0; }
.nik-footer__list li { margin-bottom: 10px; font-size: 13px; color: var(--nik-text-soft); }
.nik-footer__list a { color: var(--nik-text-soft); transition: color .15s ease, padding-inline-start .15s ease; }
.nik-footer__list a:hover { color: var(--nik-accent-600); padding-inline-start: 4px; }
.nik-footer__enamad { display: flex; align-items: flex-start; min-height: 88px; }
.nik-footer__enamad a { display: inline-flex; align-items: flex-start; justify-content: flex-start; max-width: 100%; }
.nik-footer__enamad img { display: block; width: auto; height: auto; max-width: 100%; max-height: 105px; object-fit: contain; }

.nik-footer__bottom { border-top: 1px solid var(--nik-border); }
.nik-footer__bottom-inner {
	display: flex; align-items: center; justify-content: space-between;
	flex-wrap: wrap; gap: 8px; padding-block: 16px; font-size: 12px; color: var(--nik-text-faint);
}
.nik-footer__payment { color: var(--nik-text-soft); }

/* =============================================================
   Responsive (global)
   ============================================================= */

/* ---- Nav: tablet range — keep deep flyouts inside the viewport ----
   On narrower (but still pointer) screens the leftward cascade can run off the
   edge, so deeper submenus open toward the inline-END (right in RTL) instead. */
@media (min-width: 769px) and (max-width: 1100px) {
	.nik-nav__sub .nik-nav__sub {
		inset-inline-start: auto; inset-inline-end: 100%;
		margin-inline-start: 0; margin-inline-end: 6px;
	}
	.nik-nav__sub .nik-nav__sub .nik-nav__caret { transform: rotate(-90deg); }
}

/* ---- Nav: mobile — slide-in drawer with accordion drill-down ---- */
@media (max-width: 768px) {
	.nik-nav__inner {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 46px;
	}

	/* Burger trigger shows; the bar itself collapses to just the trigger. */
	.nik-nav__burger {
		display: inline-flex; align-items: center; gap: 9px;
		padding: 11px 4px; background: none; border: 0; cursor: pointer;
		font: inherit; font-size: 14px; font-weight: 700; color: var(--nik-primary);
	}
	.nik-nav__burger-bars { display: inline-grid; gap: 4px; width: 20px; }
	.nik-nav__burger-bars span { height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }

	/* Kept in the row while transparent, so the animated entrance never causes
	   a layout shift when the category bar reaches the top of the viewport. */
	.nik-nav__sticky-brand {
		display: inline-flex;
		align-items: center;
		justify-content: flex-end;
		gap: 7px;
		max-width: min(48vw, 180px);
		min-width: 34px;
		min-height: 36px;
		color: var(--nik-primary);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateX(-18px) scale(.88) rotate(-2deg);
		transform-origin: left center;
		transition: opacity .3s ease, transform .42s cubic-bezier(.2,.9,.2,1.15), visibility 0s linear .42s;
	}
	[dir="ltr"] .nik-nav__sticky-brand {
		transform: translateX(18px) scale(.88) rotate(2deg);
		transform-origin: right center;
	}
	.nik-nav.is-stuck .nik-nav__sticky-brand {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateX(0) scale(1) rotate(0);
		transition-delay: .04s, .04s, 0s;
	}
	.nik-nav__sticky-logo {
		width: 34px;
		height: 34px;
		flex: 0 0 34px;
		object-fit: contain;
	}
	.nik-nav__sticky-logotype {
		display: block;
		width: auto;
		height: auto;
		max-width: 150px;
		max-height: 34px;
		object-fit: contain;
	}
	.nik-nav__sticky-name {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-size: 13px;
		font-weight: 850;
	}

	/* Backdrop. */
	.nik-nav__backdrop {
		display: block; position: fixed; inset: 0; z-index: 80;
		background: rgba(11,28,69,.45); opacity: 0; visibility: hidden;
		transition: opacity .25s ease, visibility 0s linear .25s;
	}
	.nik-nav__backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .25s ease; }

	/* Drawer: slides in from the inline-start (right in RTL). */
	.nik-nav__menu {
		position: fixed; z-index: 90; top: 0; bottom: 0; inset-inline-start: 0;
		width: min(86vw, 340px); background: #fff;
		box-shadow: 0 0 60px -10px rgba(11,28,69,.5);
		/* Hidden off-screen toward the inline-start edge. RTL: that edge is the
		   right, so a positive X translation pushes it off the right; LTR uses
		   a negative translation. Using logical-aware values avoids creating a
		   horizontal scrollbar from an element parked just off-screen. */
		transform: translateX(100%);
		transition: transform .28s cubic-bezier(.22,1,.36,1);
		display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
	}
	[dir="ltr"] .nik-nav__menu { transform: translateX(-100%); }
	.nik-nav__menu.is-open { transform: translateX(0); }

	.nik-nav__menu-head {
		display: flex; align-items: center; justify-content: space-between;
		padding: 16px 18px; border-bottom: 1px solid var(--nik-border);
		font-size: 15px; font-weight: 800; color: var(--nik-primary);
		position: sticky; top: 0; background: #fff; z-index: 1;
	}
	.nik-nav__close { display: inline-flex; background: none; border: 0; cursor: pointer; color: var(--nik-text-soft); padding: 4px; }
	.nik-nav__close:hover { color: var(--nik-accent-600); }

	/* List becomes a simple vertical stack. */
	.nik-nav__list { flex-direction: column; gap: 0; padding: 6px 0; flex-wrap: nowrap; }
	.nik-nav__list > .nik-nav__item > a,
	.nik-nav__sub .nik-nav__item > a {
		padding: 13px 18px; border-radius: 0; font-size: 14px; font-weight: 600;
	}
	.nik-nav__list > li > a::after { display: none; } /* drop the underline pill */
	.nik-nav__item { position: static; }

	/* The overflow ("…") kebab is irrelevant in the drawer — everything stacks. */
	.nik-nav__item--overflow { display: none; }

	/* Submenus: accordion. Collapsed by default; JS toggles `.is-open` on the
	   parent <li> to drill down one level at a time. Indented per depth. */
	.nik-nav__sub {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; border-radius: 0; margin: 0; padding: 0;
		min-width: 0; background: var(--nik-bg-soft);
		display: none;
	}
	.nik-nav__item.is-open > .nik-nav__sub { display: block; }
	.nik-nav__sub .nik-nav__item > a { padding-inline-start: 34px; }
	.nik-nav__sub .nik-nav__sub .nik-nav__item > a { padding-inline-start: 50px; }

	/* Caret: in the drawer it always points down and flips when its level opens. */
	.nik-nav__caret { transform: rotate(0deg) !important; margin-inline-start: auto; }
	.nik-nav__item.is-open > a .nik-nav__caret { transform: rotate(180deg) !important; }

	/* Tapping a parent with children toggles it rather than navigating (JS). */
	.nik-nav__item.has-children > a { position: relative; }
}

@media screen and (max-width: 782px) {
	.admin-bar .nik-nav { --nik-nav-sticky-top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	.nik-nav,
	.nik-nav__sticky-brand { transition: none; }
}

/* ---- Header + footer: tablet ---- */
@media (max-width: 900px) {
	/* Logo + all action icons (search included) sit on a single row. The search
	   bar is collapsed by default and drops down full-width below the row only
	   when the user taps the search icon (JS toggles `.is-open`). */
	.nik-header__inner { flex-wrap: wrap; row-gap: 10px; min-height: 0; }
	.nik-header__brand { margin-inline-end: auto; }

	.nik-header__action--search { display: flex; }

	.nik-header__search {
		order: 3; flex-basis: 100%; max-width: none; margin: 0;
		/* Collapsed: animate height to 0 so it tucks away cleanly. */
		display: none;
	}
	.nik-header__search.is-open { display: flex; }

	/* Footer: about sits full-width, followed by the four compact columns. */
	.nik-footer__grid { grid-template-columns: repeat(4, 1fr); gap: 0; padding-block: 8px 28px; }
	.nik-footer__col { padding: 22px; }
	/* About column spans the whole top row. */
	.nik-footer__about { grid-column: 1 / -1; }
	/* Hairline dividing the about block from the lists row. */
	.nik-footer__col:nth-child(n + 2) { border-top: 1px solid var(--nik-border); }
	/* Vertical hairlines between the four compact columns.
	   `border-inline-start` is the row-facing edge in both RTL and LTR. */
	.nik-footer__col:nth-child(n + 3) { border-inline-start: 1px solid var(--nik-border); }
}

/* ---- Header: mobile ---- */
@media (max-width: 560px) {
	.nik-topbar { font-size: 11.5px; }
	.nik-topbar__inner { justify-content: center; row-gap: 0; }
	.nik-topbar__group { justify-content: center; gap: 16px; }
	/* Keep only the essentials visible up top; the free-shipping line still shows. */
	.nik-topbar__item--muted { display: none; }

	.nik-header__inner { gap: 12px; }
	/* Hide the tagline so the brand name fits beside the action buttons. */
	.nik-header__tagline { display: none; }
	.nik-header__name { font-size: 15.5px; }
	.nik-header__logo { width: 40px; height: 40px; }
	.nik-header__logotype { max-width: 135px; max-height: 44px; }

	.nik-header__actions { gap: 2px; }
	/* Tight row: drop the text labels (icons stay); the orange quote tile keeps
	   its fill so it still stands out at a glance. */
	.nik-header__action { padding: 8px; gap: 0; }
	.nik-header__action > span:not(.nik-header__action-iconwrap) { display: none; }
	/* The "instant quote" label is worth keeping — shrink it instead of hiding. */
	.nik-header__action--quote { padding: 8px 10px; }

	/* Two balanced footer columns per row on phones. */
	.nik-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nik-footer__col:nth-child(n + 3) { border-inline-start: 0; }
	.nik-footer__col:nth-child(odd):not(.nik-footer__about) { border-inline-start: 1px solid var(--nik-border); }
	.nik-footer__bottom-inner { justify-content: center; text-align: center; }
	.nik-footer__payment { flex-basis: 100%; }
}

/* ---- Footer: narrow phones — keep the 2×2 compact grid, tighten spacing ---- */
@media (max-width: 420px) {
	.nik-footer { margin-top: 40px; }
	.nik-footer__about { padding: 18px 14px; }
	/* Compact columns: tighter padding while preserving comfortable tap targets. */
	.nik-footer__col:nth-child(n + 2) { padding: 16px 8px; }
	.nik-footer__title { font-size: 12.5px; }
	.nik-footer__list li { font-size: 12px; }
	.nik-footer__bottom-inner { justify-content: center; text-align: center; }
}

/* =============================================================
   Mini cart (slide-out drawer)
   ============================================================= */
.nik-cart-locked { overflow: hidden; }

.nik-cart-overlay {
	position: fixed; inset: 0; z-index: 120;
	background: rgba(11,28,69,.45);
	opacity: 0; transition: opacity .3s ease;
}
.nik-cart-overlay.is-open { opacity: 1; }

.nik-cart {
	position: fixed; z-index: 130; top: 0; bottom: 0; inset-inline-end: 0;
	width: min(92vw, 400px);
	display: flex; flex-direction: column;
	background: #fff; color: var(--nik-text);
	box-shadow: 0 0 60px -10px rgba(11,28,69,.5);
	/* Parked off-screen toward the inline-end edge (left in RTL). A negative
	   logical translation avoids spawning a horizontal scrollbar. */
	transform: translateX(-100%);
	transition: transform .3s cubic-bezier(.22,1,.36,1);
	visibility: hidden;
}
[dir="ltr"] .nik-cart { transform: translateX(100%); }
.nik-cart.is-open { transform: translateX(0); visibility: visible; }
.nik-cart.is-busy { pointer-events: none; }
.nik-cart.is-busy .nik-cart__inner { opacity: .5; transition: opacity .15s ease; }
/* Spinner while a cart op is in flight. */
.nik-cart.is-busy::after {
	content: ''; position: absolute; top: 50%; left: 50%; z-index: 2;
	width: 34px; height: 34px; margin: -17px 0 0 -17px;
	border: 3px solid var(--nik-border); border-top-color: var(--nik-accent);
	border-radius: 50%; animation: nik-cart-spin .7s linear infinite;
}
@keyframes nik-cart-spin { to { transform: rotate(360deg); } }

.nik-cart__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 20px; border-bottom: 1px solid var(--nik-border); flex-shrink: 0;
}
.nik-cart__title {
	display: flex; align-items: center; gap: 9px;
	margin: 0; font-size: 17px; font-weight: 800; color: var(--nik-primary);
}
.nik-cart__head-count {
	display: inline-grid; place-items: center; min-width: 22px; height: 22px;
	padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 800;
	background: var(--nik-accent); color: #1a1a1a;
}
.nik-cart__close {
	display: inline-flex; padding: 4px; background: none; border: 0; cursor: pointer;
	color: var(--nik-text-soft); transition: color .15s ease;
}
.nik-cart__close:hover { color: var(--nik-accent-600); }

.nik-cart__inner { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.nik-cart__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 0; }

.nik-cart__empty {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	height: 100%; padding: 40px 24px; text-align: center; color: var(--nik-text-soft);
}
.nik-cart__empty svg { color: var(--nik-border); }
.nik-cart__empty p { margin: 0; font-size: 14px; }

.nik-cart__list { list-style: none; margin: 0; padding: 0; }
.nik-cart__item {
	display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start;
	padding: 14px 20px; border-bottom: 1px solid var(--nik-border);
}
.nik-cart__thumb {
	width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
	border: 1px solid var(--nik-border); background: var(--nik-bg-soft); flex-shrink: 0;
}
.nik-cart__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.nik-cart__info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nik-cart__name {
	font-size: 13px; font-weight: 700; line-height: 1.5; color: var(--nik-text);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nik-cart__name:hover { color: var(--nik-accent-600); }
.nik-cart__price { font-size: 13.5px; font-weight: 800; color: var(--nik-primary); }
.nik-cart__price .woocommerce-Price-currencySymbol { font-size: .82em; font-weight: 700; color: var(--nik-text-soft); margin-inline-start: 2px; }

.nik-cart__qty {
	display: inline-flex; align-items: center; gap: 0;
	border: 1px solid var(--nik-border); border-radius: 8px; overflow: hidden; width: fit-content;
}
.nik-cart__qty-btn {
	width: 28px; height: 28px; display: grid; place-items: center;
	background: var(--nik-bg-soft); border: 0; cursor: pointer;
	font-size: 16px; font-weight: 700; color: var(--nik-text-soft); line-height: 1;
	transition: background .15s ease, color .15s ease;
}
.nik-cart__qty-btn:hover { background: var(--nik-accent); color: #1a1a1a; }
.nik-cart__qty-num { min-width: 30px; text-align: center; font-size: 13px; font-weight: 800; }
.nik-cart__item.is-pending {
	opacity: .72;
}
.nik-cart__item.is-pending .nik-cart__thumb,
.nik-cart__item.is-pending .nik-cart__info {
	pointer-events: none;
}

.nik-cart__remove {
	display: inline-flex; padding: 5px; background: none; border: 0; cursor: pointer;
	color: var(--nik-text-faint); border-radius: 6px; transition: color .15s ease, background .15s ease;
}
.nik-cart__remove:hover { color: #c0392b; background: rgba(192,57,43,.08); }

.nik-cart__foot {
	flex-shrink: 0; padding: 16px 20px;
	border-top: 1px solid var(--nik-border); background: var(--nik-bg-soft);
}
.nik-cart__subtotal {
	display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px;
	font-size: 14px; color: var(--nik-text-soft);
}
.nik-cart__subtotal strong { font-size: 18px; font-weight: 800; color: var(--nik-primary); }
.nik-cart__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nik-cart__actions .nik-btn { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
	.nik-cart, .nik-cart-overlay { transition: none; }
}
.nik-recaptcha {
	margin-block: 14px;
}

.nik-recaptcha small {
	color: var(--nik-color-muted, #667085);
	font-size: 12px;
}

/* 1.36.0: improve contrast of small muted header text. */
.nik-topbar__item--muted, .nik-header__search input[type="search"]::placeholder { color: var(--nik-text-soft); }
.nik-topbar__item--accent { color: #995600; }

/* =============================================================
   Nikmehr carousel component
   ============================================================= */
.nik-carousel { position: relative; }

.nik-carousel__track {
	display: flex;
	gap: var(--nik-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-block: 4px;
}
.nik-carousel__track::-webkit-scrollbar { display: none; }

/* Grab cursor / drag feel (only meaningful when overflowing — see JS guard) */
.nik-carousel.has-overflow .nik-carousel__track { cursor: grab; }
.nik-carousel__track.is-dragging {
	scroll-behavior: auto; cursor: grabbing; scroll-snap-type: none;
	user-select: none; -webkit-user-select: none;
}
/* Don't let images hijack the drag with their native ghost-drag. */
.nik-carousel__track.is-dragging img,
.nik-carousel__track.is-dragging a { -webkit-user-drag: none; user-select: none; }

.nik-carousel__item {
	scroll-snap-align: start;
	flex: 0 0 auto;
	/* default item width; section-specific widths override below */
	width: clamp(150px, 22%, 260px);
}

/* ----- External controls (mounted in the section header) ----- */
.nik-carousel__controls {
	display: inline-flex; align-items: center; gap: 8px;
	flex-shrink: 0;
	/* Sit on the inline-end of the section-head grid, centered over its rows. */
	grid-column: 2; grid-row: 1 / -1; align-self: center;
}
.nik-carousel__controls.is-hidden { display: none; }

/* Navigation buttons — minimal, outline, brand hover fill */
.nik-carousel__nav {
	width: 38px; height: 38px;
	border-radius: 10px;
	border: 1px solid var(--nik-border);
	background: #fff;
	color: var(--nik-primary);
	font-size: 22px; line-height: 1;
	display: grid; place-items: center;
	cursor: pointer;
	transition: opacity .15s, background .15s, color .15s, border-color .15s;
}
.nik-carousel__nav:hover { background: var(--nik-primary); color: #fff; border-color: var(--nik-primary); }
.nik-carousel__nav.is-disabled { opacity: .35; pointer-events: none; }

/* Legacy in-track placement (fallback when there is no section header) */
.nik-carousel__nav--inset {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px; border-radius: 50%;
	box-shadow: 0 4px 14px rgba(11, 28, 69, .12); z-index: 3;
}
.nik-carousel__nav--inset.nik-carousel__nav--prev { inset-inline-end: -8px; }
.nik-carousel__nav--inset.nik-carousel__nav--next { inset-inline-start: -8px; }
.nik-carousel__nav--inset.is-disabled { opacity: 0; }

/* Hide inset nav entirely if there is no overflow */
.nik-carousel:not(.has-overflow) .nik-carousel__nav--inset { display: none; }

/* Hide nav when JS is off (buttons are JS-injected anyway) */
.no-js .nik-carousel__nav { display: none; }

@media (max-width: 768px) {
	/* On touch, swiping is the natural interaction — hide arrows. */
	.nik-carousel__controls { display: none; }
	.nik-carousel__nav--inset { display: none !important; }
}

/* ----- Item sizing per section ----- */
.nik-brands .nik-carousel__item { width: clamp(150px, 17%, 190px); }
.nik-cats .nik-carousel__item   { width: clamp(210px, 24%, 260px); }
.nik-products-row .nik-carousel__item { width: clamp(180px, 23%, 280px); }
.nik-posts-row .nik-carousel__item { width: clamp(220px, 26%, 320px); }

@media (max-width: 768px) {
	.nik-brands .nik-carousel__item { width: 42%; }
	.nik-cats .nik-carousel__item   { width: 62%; }
	.nik-products-row .nik-carousel__item { width: 60%; }
	.nik-posts-row .nik-carousel__item { width: 70%; }
}
@media (max-width: 480px) {
	.nik-cats .nik-carousel__item   { width: 78%; }
}
@media (max-width: 480px) {
	.nik-products-row .nik-carousel__item { width: 75%; }
	.nik-posts-row .nik-carousel__item { width: 82%; }
}

/* =============================================================
   Nikmehr — Home page sections
   ============================================================= */

/* ---------------- Hero (light & minimal) ---------------- */
.nik-hero {
	position: relative; isolation: isolate; overflow: hidden;
	/* Plain white surface — the product shots have white backgrounds, so the
	   dynamic backdrop blends seamlessly into it. */
	background: #ffffff;
	color: var(--nik-text);
	border-bottom: 1px solid var(--nik-border);
}
/* Decorative, faded circuit-board motif (on-brand: برق و اتوماسیون). Pure CSS
   data-URI so it costs no extra request; kept very low-opacity so it never
   competes with the content. Masked to fade out toward the centre/bottom. */
.nik-hero::before {
	content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180' fill='none' stroke='%230B1C45' stroke-width='1.4'%3E%3Cpath d='M20 20h50v30h40v-30h50'/%3E%3Cpath d='M20 90h30v40h60v-40h70'/%3E%3Cpath d='M90 20v40M160 90v70M40 160v-30'/%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3Ccircle cx='160' cy='20' r='4'/%3E%3Ccircle cx='90' cy='60' r='4'/%3E%3Ccircle cx='50' cy='90' r='4'/%3E%3Ccircle cx='110' cy='90' r='4'/%3E%3Ccircle cx='160' cy='160' r='4'/%3E%3Ccircle cx='40' cy='130' r='4'/%3E%3Crect x='66' y='46' width='8' height='8'/%3E%3Crect x='106' y='86' width='8' height='8'/%3E%3C/svg%3E");
	background-size: 200px 200px;
	opacity: .05;
	/* Two fade zones — top-right and bottom-left — so neither corner looks bare,
	   while the centre (where the text lives) stays clean. */
	-webkit-mask-image:
		radial-gradient(80% 90% at 100% 0%, #000 0%, transparent 60%),
		radial-gradient(70% 80% at 0% 100%, #000 0%, transparent 58%);
	mask-image:
		radial-gradient(80% 90% at 100% 0%, #000 0%, transparent 60%),
		radial-gradient(70% 80% at 0% 100%, #000 0%, transparent 58%);
}
.nik-hero__inner {
	position: relative;
	padding-block: 64px; min-height: 380px;
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
	gap: 40px;
}
.nik-hero__content { position: relative; z-index: 3; max-width: 560px; }
.nik-hero__badge {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12.5px; font-weight: 700;
	background: #fff4e2; color: var(--nik-accent-600);
	border: 1px solid #ffd699;
	padding: 6px 14px; border-radius: 20px; margin-bottom: 18px;
}
.nik-hero__title {
	font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; line-height: 1.4;
	margin: 0 0 16px; color: var(--nik-primary);
}
.nik-hero__title em { font-style: normal; color: var(--nik-accent-600); }
.nik-hero__text { font-size: 15.5px; line-height: 2; color: var(--nik-text-soft); margin: 0 0 24px; max-width: 48ch; }
.nik-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------- Hero media (stats column + centred showcase) ---------------- */
.nik-hero__media {
	position: relative; z-index: 2;
	display: flex; align-items: center; gap: 28px;
}

/* ---------------- Centred product showcase ---------------- */
/* Best-seller images cross-fade as a solid, centred product shot, with a
   vertical slide indicator on the inline-start (right, RTL) edge and the
   product name captioned underneath. */
.nik-hero__showcase {
	position: relative; flex-shrink: 0;
	width: clamp(240px, 28vw, 360px);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "stage ticks";
	align-items: stretch; gap: 16px;
}

/* Stage — clickable, holds the cross-fading product shots, the gradient sheen
   and the overlaid product name. */
.nik-hero__stage {
	grid-area: stage;
	position: relative; aspect-ratio: 1 / 1;
	display: block; border-radius: 16px; overflow: hidden;
	text-decoration: none;
}
.nik-hero__bg-slide {
	position: absolute;
	/* Inset (instead of inset:0) gives breathing room so the product is shown
	   "from further back" and doesn't touch the stage edges — same intent as the
	   grid cards. The sheen + caption stay full-bleed (they're separate layers),
	   so legibility of the overlaid name is unaffected. */
	inset: clamp(16px, 9%, 34px);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: contain;
	opacity: 0; transition: opacity 1.1s ease;
}
.nik-hero__bg-slide.is-active { opacity: 1; }
.nik-hero__slide-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
/* Bottom-up gradient sheen so the overlaid name stays legible. */
.nik-hero__sheen {
	position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(to top,
		rgba(11,28,69,.62) 0%,
		rgba(11,28,69,.30) 26%,
		rgba(11,28,69,0) 55%);
}

/* Product name overlaid on the bottom of the image. A reserved two-line height
   and bottom-anchored flex keep it from shifting when the next name is a
   different length (which otherwise looked like a jitter on slide change). */
.nik-hero__caption {
	position: absolute; inset-inline: 12px; inset-block-end: 12px;
	margin: 0;
	display: flex; align-items: flex-end; justify-content: center;
	min-height: 2.8em; text-align: center;
	font-size: 14px; font-weight: 800; line-height: 1.4; color: #fff;
	text-shadow: 0 2px 10px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.6);
	transition: opacity .35s ease;
}
.nik-hero__caption.is-swapping { opacity: 0; }
.nik-hero__stage,
.nik-hero__stage:hover .nik-hero__caption { text-decoration: none; }

/* Vertical slide indicator on the inline-end (left, RTL) edge — a column of
   rounded dashes; the active one is longer, coloured, and grows a forward
   arrowhead built from its own ::before / ::after. */
.nik-hero__ticks {
	grid-area: ticks;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 10px;
}
/* Each tick is a FIXED-height (34px) hit area, so the active dash growing
   inside it never reflows the column — that reflow was the jitter on slide
   change. The visible dash is drawn by ::before and just changes its own
   size/colour, leaving the button's footprint constant. */
.nik-hero__tick {
	position: relative;
	width: 12px; height: 34px; padding: 0; border: 0;
	background: transparent;
	cursor: pointer; appearance: none; -webkit-appearance: none;
	display: flex; align-items: center; justify-content: center;
}
.nik-hero__tick::before {
	content: '';
	width: 4px; height: 18px; border-radius: 4px;
	background: var(--nik-border);
	transition: height .35s ease, background .35s ease, width .35s ease;
}
.nik-hero__tick:hover::before { background: var(--nik-text-soft); }
.nik-hero__tick.is-active::before {
	height: 34px; width: 5px;
	background: var(--nik-accent-600);
}
.nik-hero__tick.is-active:hover::before { background: var(--nik-accent-600); }
/* Forward arrowhead — a solid filled triangle, the same height as the active
   dash, pointing toward the product image (always to the physical right, since
   the stage sits to the right of the ticks). */
.nik-hero__tick.is-active::after {
	content: ''; position: absolute;
	top: 50%; left: 100%; margin-left: 4px;
	transform: translateY(-50%);
	width: 0; height: 0;
	border-top: 17px solid transparent;
	border-bottom: 17px solid transparent;
	border-left: 12px solid var(--nik-accent-600);
}

/* ---------------- Stat boxes (column, left of showcase, no float) ---------------- */
.nik-hero__stats {
	display: flex; flex-direction: column; gap: 16px; margin: 0;
	width: 144px; flex: 0 0 144px;
}
.nik-stat {
	display: flex; flex-direction: column; gap: 2px; text-align: center;
	background: rgba(255,255,255,.9);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,.7);
	border-radius: 14px; padding: 12px 18px; min-width: 110px;
	box-shadow: 0 18px 38px -18px rgba(11,28,69,.55);
}
.nik-stat__num { display: block; font-size: 22px; font-weight: 800; color: var(--nik-accent-600); line-height: 1.2; }
.nik-stat__label { font-size: 11.5px; color: var(--nik-text-soft); white-space: normal; overflow-wrap: anywhere; }

/* ---------------- Trust strip ---------------- */
.nik-trust { background: var(--nik-bg-soft); border-bottom: 1px solid var(--nik-border); }
.nik-trust__grid { display: grid; grid-template-columns: repeat(4,1fr); }
.nik-trust__item {
	display: flex; align-items: center; gap: 12px;
	padding: 18px 20px; border-inline-start: 1px solid var(--nik-border);
}
.nik-trust__item:first-child { border-inline-start: 0; }
.nik-trust__icon {
	display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0;
	border-radius: 12px; color: var(--nik-primary);
	background: linear-gradient(135deg, rgba(11,28,69,.08), rgba(255,153,0,.12));
	border: 1px solid var(--nik-border);
	transition: color .25s ease, background .25s ease, transform .25s ease;
}
.nik-trust__item:hover .nik-trust__icon {
	color: var(--nik-accent-600); transform: translateY(-2px);
	background: linear-gradient(135deg, rgba(255,153,0,.16), rgba(11,28,69,.08));
}
/* Uploaded image/SVG: drop the coloured chip (no square background/border). The 42px
   box is kept so the layout stays put; the image fits inside it. */
.nik-trust__icon--img,
.nik-trust__item:hover .nik-trust__icon--img {
	background: none; border: 0; border-radius: 0;
}
.nik-trust__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nik-trust__title { display: block; font-size: 13.5px; font-weight: 700; color: var(--nik-text); }
.nik-trust__sub { display: block; font-size: 12px; color: var(--nik-text-soft); }

/* ---------------- Brand card (modern monogram / logo) ---------------- */
.nik-brand-card {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	background: #fff; border: 1px solid var(--nik-border);
	border-radius: 16px; padding: 20px 14px; min-height: 150px; text-align: center;
	transition: border-color .22s, transform .22s;
}
.nik-brand-card:hover {
	border-color: var(--nik-accent);
	transform: translateY(-4px);
}
.nik-brand-card__logo {
	width: 76px; height: 76px; aspect-ratio: 1; flex-shrink: 0;
	display: grid; place-items: center; overflow: hidden;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--nik-border);
	transition: transform .25s ease;
}
.nik-brand-card:hover .nik-brand-card__logo { transform: scale(1.05); }
.nik-brand-card__logo img {
	display: block; width: 100%; height: 100%;
	max-width: none; max-height: none;
	object-fit: contain; object-position: 50% 50%;
	padding: 6px; margin: 0;
}
.nik-brand-card__monogram {
	font-size: 22px; font-weight: 800; letter-spacing: .02em;
	background: linear-gradient(135deg, var(--nik-primary-500), var(--nik-primary));
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: var(--nik-primary);
	direction: ltr;
}
.nik-brand-card__name { font-size: 13.5px; font-weight: 700; color: var(--nik-text); line-height: 1.5; }
.nik-brand-card__count { font-size: 11.5px; color: var(--nik-text-soft); }

/* ---------------- Category card (modern image) ---------------- */
.nik-cat-card {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--nik-border);
	border-radius: 16px; overflow: hidden; min-height: 0;
	position: relative; isolation: isolate;
	transition: border-color .22s, transform .22s;
}
.nik-cat-card:hover {
	border-color: var(--nik-accent);
	transform: translateY(-4px);
}
.nik-cat-card__media {
	position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
	background: var(--nik-bg-soft);
}
.nik-cat-card__media img {
	width: 100%; height: 100%; object-fit: cover;
	transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.nik-cat-card:hover .nik-cat-card__media img { transform: scale(1.08); }
/* Single-tone gradient halo so the image reads as one premium tile. */
.nik-cat-card__media::after {
	content: ''; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(11,28,69,0) 35%, rgba(11,28,69,.55) 100%);
	opacity: .9; transition: opacity .25s ease;
}
.nik-cat-card:hover .nik-cat-card__media::after { opacity: 1; }
/* Monogram fallback when a category has no image */
.nik-cat-card__monogram {
	position: absolute; inset: 0; display: grid; place-items: center;
	font-size: 40px; font-weight: 800; color: #fff; opacity: .9;
	background: linear-gradient(135deg, var(--nik-primary-500), var(--nik-primary));
}
.nik-cat-card__body {
	display: flex; flex-direction: column; gap: 3px;
	padding: 12px 14px; flex: 1;
}
.nik-cat-card__name { font-size: 14.5px; font-weight: 800; color: var(--nik-text); }
.nik-cat-card__count { font-size: 12px; color: var(--nik-text-soft); }
/* Arrow chip overlaid on the image, bottom inline-start */
.nik-cat-card__arrow {
	position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 1;
	width: 34px; height: 34px; display: grid; place-items: center;
	border-radius: 10px; color: #fff;
	background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
	backdrop-filter: blur(3px);
	transition: background .2s ease, transform .2s ease, color .2s ease, border-color .2s ease;
}
.nik-cat-card:hover .nik-cat-card__arrow {
	background: var(--nik-accent); border-color: var(--nik-accent); color: #1a1a1a;
	transform: translateX(-2px);
}

/* ---------------- Product card (flat / industrial) ----------------
   No shadows, no shine effects — clean borders and solid fills, suited to
   an industrial catalogue. Footer is a single row: price on one side, a
   compact square add-to-cart button on the other. */
.nik-product {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--nik-border);
	border-radius: var(--nik-radius); overflow: hidden; height: 100%;
	position: relative;
	transition: border-color .18s;
}
.nik-product:hover { border-color: var(--nik-primary-500); }

.nik-product__media {
	position: relative; display: grid; place-items: center;
	aspect-ratio: 1 / 1; overflow: hidden;
	background: #ffffff;
	border-bottom: 1px solid var(--nik-border);
	/* Breathing room so the product is shown "from a little further back"
	   (contain, not cover) and never touches the edges. Larger padding pulls the
	   product visually back, away from the card edges. */
	padding: clamp(18px, 13%, 40px);
}
.nik-product__media img {
	width: 100%; height: 100%; object-fit: contain; object-position: center;
}
.nik-product__badge {
	position: absolute; top: 10px; inset-inline-end: 10px; z-index: 1;
	font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: var(--nik-radius-sm);
	line-height: 1;
}
.nik-product__badge--sale { background: var(--nik-accent); color: #1a1a1a; }
.nik-product__badge--out  { background: var(--nik-text-faint); color: #fff; }

.nik-product__body { padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.nik-product__brand {
	align-self: flex-start; font-size: 10.5px; font-weight: 700; color: var(--nik-text-soft);
}
.nik-product__name { font-size: 13.5px; font-weight: 700; line-height: 1.65; margin: 0; }
.nik-product__name a {
	color: var(--nik-text); display: -webkit-box;
	-webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	min-height: 2.7em;
}
.nik-product__name a:hover { color: var(--nik-accent-600); }

/* Footer: price (start) + compact cart button (end), one row. */
.nik-product__foot {
	margin-top: auto; padding-top: 11px; border-top: 1px solid var(--nik-border);
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.nik-product__price { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nik-product__price-now { font-size: 16.5px; font-weight: 800; color: var(--nik-primary); white-space: nowrap; }
.nik-product__price-old {
	font-size: 12px; font-weight: 600; color: var(--nik-text-soft);
	text-decoration: line-through; text-decoration-color: var(--nik-accent);
	text-decoration-thickness: 1.5px; white-space: nowrap; order: -1;
}
.nik-product__price-call { font-size: 14px; font-weight: 700; color: var(--nik-text-soft); }
.nik-product__price .woocommerce-Price-amount { white-space: nowrap; }
.nik-product__price .woocommerce-Price-currencySymbol { font-size: .8em; font-weight: 700; color: var(--nik-text-soft); margin-inline-start: 2px; }
/* WooCommerce wraps range prices in <del>/<ins>; tame them to match. */
.nik-product__price del { color: var(--nik-text-soft); text-decoration: line-through; text-decoration-color: var(--nik-accent); }
.nik-product__price ins { text-decoration: none; }

/* Compact square add-to-cart button — flat orange, no shadow/shine. */
.nik-product__cart {
	flex-shrink: 0;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	width: 42px; height: 42px; padding: 0; border-radius: var(--nik-radius-sm);
	font-size: 13px; font-weight: 700; cursor: pointer;
	color: #1a1a1a; border: 1px solid var(--nik-accent);
	background: var(--nik-accent);
	transition: background .15s, border-color .15s, color .15s;
}
.nik-product__cart:hover { background: var(--nik-accent-600); border-color: var(--nik-accent-600); color: #1a1a1a; }
.nik-product__cart:active { background: var(--nik-accent-600); }
.nik-product__cart-icon { flex-shrink: 0; }

/* Call-for-price card: keep «تماس بگیرید» on one readable line. The extra
   specificity also prevents WooCommerce/archive rules shrinking it to a square. */
.nik-product__foot .nik-product__cart.nik-call-btn--card {
	width: auto; min-width: 112px; height: 40px; padding: 0 11px; gap: 6px;
	color: #1a1a1a; background: var(--nik-accent); border-color: var(--nik-accent);
	font-size: 12.5px; font-weight: 800; line-height: 1;
}
.nik-product__foot .nik-product__cart.nik-call-btn--card:hover {
	color: #1a1a1a; background: var(--nik-accent-600); border-color: var(--nik-accent-600);
}
.nik-call-btn--card svg { width: 16px; height: 16px; flex-shrink: 0; }
.nik-call-btn--card .nik-call-btn__text { display: block; white-space: nowrap; line-height: 1; }

/* "view product" fallback for non-purchasable items: outlined, auto width. */
.nik-product__cart--view {
	width: auto; padding: 0 14px; background: #fff; color: var(--nik-primary);
	border: 1px solid var(--nik-border);
}
.nik-product__cart--view .nik-product__cart-text { position: static; }
.nik-product__cart--view:hover { background: var(--nik-bg-soft); color: var(--nik-primary); border-color: var(--nik-primary); }

/* WooCommerce AJAX add-to-cart states. The mini-cart drawer opening is the
   feedback now, so the button keeps its plain orange look after a successful
   add (no green "added" state, no injected ✓). */
.nik-product__cart.loading { opacity: .6; pointer-events: none; }
.nik-product__cart.added::after { content: none; display: none; }
/* Hide WooCommerce's auto-injected "View cart" link; the card stays compact. */
.nik-product__foot .added_to_cart { display: none; }

/* On narrow viewports (two-column grid on small phones) the price can crowd the
   fixed-width cart button. Keep them side by side; drop the currency unit
   ("تومان") onto its own line under the number and shrink the type a touch so
   the amount fits on one line instead of wrapping below the button. */
@media (max-width: 430px) {
	.nik-product__foot { gap: 8px; }
	.nik-product__foot--call { align-items: stretch; flex-direction: column; }
	.nik-product__foot--call .nik-product__price { align-items: center; }
	.nik-product__foot .nik-product__cart.nik-call-btn--card { width: 100%; min-width: 0; }
	.nik-product__price-now { font-size: 14.5px; }
	.nik-product__price-old { font-size: 10.5px; }
	/* wc_price() renders the amount as <span class="…amount"><bdi>NUMBER
	   <span class="…currencySymbol">تومان</span></bdi></span>, so stack on the
	   <bdi> (the actual flex parent of number + unit). */
	.nik-product__price .woocommerce-Price-amount,
	.nik-product__price .woocommerce-Price-amount bdi {
		display: inline-flex; flex-direction: column; line-height: 1.15;
	}
	.nik-product__price .woocommerce-Price-currencySymbol {
		font-size: .68em; font-weight: 600; color: var(--nik-text-faint); margin: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nik-product, .nik-product__cart { transition: none; }
	.nik-hero__bg-slide { transition: none; }
}

/* ---------------- Special offers band (Digikala-style, orange) ----------------
   A pinned feature product (with a countdown) on the start side, beside a
   horizontal carousel of the remaining deals. Flat orange band, no shadows. */
.nik-deals { padding-block: 32px; }
.nik-deals__band {
	display: grid; grid-template-columns: 248px minmax(0, 1fr);
	background: linear-gradient(180deg, var(--nik-deal) 0%, var(--nik-deal-600) 100%);
	border-radius: 14px; overflow: hidden;
}

/* --- Feature column (start) --- */
.nik-deals__feature-col {
	display: flex; flex-direction: column; gap: 12px;
	padding: 18px 16px; color: #fff;
}
.nik-deals__brand { display: flex; align-items: center; gap: 9px; }
.nik-deals__brand-bolt {
	display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0;
	border-radius: 9px; background: rgba(255,255,255,.2); color: #fff;
}
.nik-deals__brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.nik-deals__brand-title { font-size: 17px; font-weight: 800; color: #fff; }
.nik-deals__brand-sub { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.85); }

.nik-deals__feature {
	display: flex; flex-direction: column; gap: 9px;
	background: #fff; border-radius: var(--nik-radius); padding: 14px; color: var(--nik-text);
}
.nik-deals__feature-media {
	aspect-ratio: 1/1; background: #fff; border-radius: var(--nik-radius-sm);
	display: grid; place-items: center; overflow: hidden;
}
.nik-deals__feature-media img { width: 100%; height: 100%; object-fit: contain; }
.nik-deals__feature-name {
	font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--nik-text);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nik-deals__feature-price { font-size: 16px; font-weight: 800; color: var(--nik-primary); }
.nik-deals__feature-price del { color: var(--nik-text-soft); font-weight: 500; font-size: 12px; text-decoration-color: var(--nik-deal); margin-inline-start: 6px; }
.nik-deals__feature-price ins { text-decoration: none; }

/* --- Countdown timer --- */
.nik-deals__timer { display: flex; flex-direction: column; gap: 7px; align-items: center; }
.nik-deals__timer-label { font-size: 12px; font-weight: 700; color: #fff; }
.nik-deals__timer-clock { display: flex; align-items: center; gap: 5px; direction: ltr; }
.nik-deals__timer-unit {
	display: grid; place-items: center; min-width: 38px; padding: 5px 4px;
	background: #fff; border-radius: var(--nik-radius-sm);
}
.nik-deals__timer-unit b { font-size: 17px; font-weight: 800; color: var(--nik-deal); font-variant-numeric: tabular-nums; }
.nik-deals__timer-colon { font-size: 16px; font-weight: 800; color: #fff; }

.nik-deals__all {
	margin-top: 2px; text-align: center; color: #fff; font-size: 12.5px; font-weight: 700;
	padding: 9px; border-radius: var(--nik-radius-sm);
	border: 1px solid rgba(255,255,255,.55);
	transition: background .15s, color .15s;
}
.nik-deals__all:hover { background: #fff; color: var(--nik-deal); }

/* --- Carousel column (end) --- */
/* Vertical flex so the carousel fills the height (matching the feature column)
   and the text footer sits at the bottom — no empty gap below the cards. */
.nik-deals__carousel-col {
	background: var(--nik-bg);
	margin: 6px; border-radius: 10px; padding: 12px 10px 10px;
	min-width: 0;
	display: flex; flex-direction: column;
}
/* Wrapper so the expiry overlay can cover only the carousel, not the strip. */
.nik-deals__carousel-wrap { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.nik-deals__carousel {
	position: relative; margin: 0; flex: 1;
	display: flex; flex-direction: column; justify-content: flex-start;
}
.nik-deals__carousel .nik-carousel__track { align-items: stretch; }

/* --- Expiry overlay (fixed-date offers that have ended) --- */
.nik-deals__expired {
	position: absolute; inset: 0; z-index: 3;
	display: flex; align-items: center; justify-content: center;
	padding: 16px; text-align: center;
	border-radius: 10px;
	background: rgba(255, 255, 255, .55);
	backdrop-filter: blur(7px) saturate(120%);
	-webkit-backdrop-filter: blur(7px) saturate(120%);
	border: 1px solid rgba(255, 255, 255, .6);
	animation: nik-deals-fade .25s ease both;
}
.nik-deals__expired[hidden] { display: none; }
.nik-deals__expired-box {
	display: flex; flex-direction: column; align-items: center; gap: 10px;
	padding: 18px 22px; max-width: 360px;
	background: rgba(255, 255, 255, .82);
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}
.nik-deals__expired-icon {
	display: grid; place-items: center; width: 56px; height: 56px;
	border-radius: 50%; color: var(--nik-accent-600);
	background: rgba(255, 138, 0, .12);
}
.nik-deals__expired-text { margin: 0; font-size: 15px; font-weight: 800; color: var(--nik-text); line-height: 1.7; }
@keyframes nik-deals-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nik-deals__expired { animation: none; } }

/* Configurable fast-shipping icon (replaces the default truck SVG). */
.nik-deals__foot-icon { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }

/* Control strip below the carousel: arrow — promo banner — arrow.
   carousel.js mounts the two arrows at the two ends (see data-carousel-controls)
   and the banner fills the middle. */
.nik-deals__controls {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
}
.nik-deals__controls .nik-carousel__nav--strip {
	position: static;
	flex: 0 0 auto;
	transform: none;
}
/* The arrows in the strip are always visible; disabled just dims them so the
   layout (arrow | banner | arrow) never collapses. */
.nik-deals__controls .nik-carousel__nav--strip.is-disabled {
	opacity: .3;
	pointer-events: none;
}

/* Promo banner: fills the space between the arrows, fixed height to match them. */
.nik-deals__promo {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	border-radius: var(--nik-radius-sm);
	overflow: hidden;
	display: block;
	background: var(--nik-bg-soft);
}
.nik-deals__promo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* Empty-state placeholder shown until the admin sets a banner. */
.nik-deals__promo--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px dashed var(--nik-border);
	background: var(--nik-bg-soft);
	color: var(--nik-text-faint);
	cursor: default;
}
.nik-deals__promo-ph {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 600;
}

.nik-deals__slide {
	flex: 0 0 auto;
	/* Show ~4 cards on desktop; the carousel handles scroll/drag. */
	width: calc((100% - 3 * var(--nik-gap)) / 4);
	min-width: 180px;
}

/* Text footer fills the remaining height and balances the column. */
.nik-deals__foot {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--nik-border);
	flex-wrap: wrap;
}
.nik-deals__foot-note {
	display: flex; align-items: center; gap: 7px; margin: 0;
	font-size: 12.5px; font-weight: 600; color: var(--nik-text-soft);
}
.nik-deals__foot-note svg { color: var(--nik-accent-600); flex-shrink: 0; }
.nik-deals__foot-hint { font-size: 11.5px; color: var(--nik-text-faint); }

@media (max-width: 1100px) {
	.nik-deals__slide { width: calc((100% - 2 * var(--nik-gap)) / 3); }
}
@media (max-width: 860px) {
	.nik-deals__band { grid-template-columns: 1fr; }
	.nik-deals__feature-col { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand timer" "feature feature" "all all"; gap: 12px 14px; align-items: center; }
	.nik-deals__brand { grid-area: brand; }
	.nik-deals__timer { grid-area: timer; align-items: flex-end; }
	.nik-deals__feature { grid-area: feature; flex-direction: row; align-items: center; }
	.nik-deals__feature-media { width: 84px; flex-shrink: 0; }
	.nik-deals__feature-name { flex: 1; }
	.nik-deals__all { grid-area: all; }
	.nik-deals__slide { width: calc((100% - var(--nik-gap)) / 2.2); }
}
@media (max-width: 560px) {
	.nik-deals__feature-col { grid-template-columns: 1fr; grid-template-areas: "brand" "timer" "feature" "all"; }
	.nik-deals__timer { align-items: center; }
	.nik-deals__slide { width: 70%; }
}

/* ---------------- CTA banners ---------------- */
.nik-cta {
	display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.nik-cta__card {
	position: relative; overflow: hidden; isolation: isolate;
	display: grid; grid-template-columns: auto 1fr auto; align-items: center;
	gap: 18px; padding: 26px 28px; border-radius: 16px;
	color: #fff; text-decoration: none;
	box-shadow: 0 10px 30px -12px rgba(11, 28, 69, .35);
	transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
}
.nik-cta__card--consult {
	background: linear-gradient(135deg, var(--nik-primary) 0%, var(--nik-primary-500) 55%, #2a57a8 100%);
}
.nik-cta__card--quote {
	background: linear-gradient(135deg, #b45309 0%, var(--nik-accent-600) 55%, var(--nik-accent) 100%);
	box-shadow: 0 10px 30px -12px rgba(255, 153, 0, .45);
}
.nik-cta__card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -14px rgba(11, 28, 69, .45); color: #fff; }
.nik-cta__card--quote:hover { box-shadow: 0 20px 44px -14px rgba(255, 153, 0, .55); }
/* Image background: dark overlay so the white copy stays legible over any photo. */
.nik-cta__card--img::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(135deg, rgba(11,28,69,.72), rgba(11,28,69,.45));
}

/* Decorative moving glow */
.nik-cta__glow {
	position: absolute; inset-block-start: -60%; inset-inline-end: -20%;
	width: 280px; height: 280px; z-index: -1; pointer-events: none;
	background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%);
	transition: transform .5s ease, opacity .5s ease; opacity: .8;
}
.nik-cta__card:hover .nik-cta__glow { transform: translate(-30px, 30px) scale(1.15); opacity: 1; }

.nik-cta__icon {
	display: grid; place-items: center; width: 58px; height: 58px; flex-shrink: 0;
	border-radius: 14px; background: rgba(255, 255, 255, .15);
	backdrop-filter: blur(2px); border: 1px solid rgba(255, 255, 255, .25);
	transition: transform .35s ease, background .35s ease;
}
.nik-cta__card:hover .nik-cta__icon { transform: scale(1.06) rotate(-4deg); background: rgba(255, 255, 255, .24); }
/* Uploaded icon image/SVG: drop the glass chip, show the image inside the 58px box. */
.nik-cta__icon--img,
.nik-cta__card:hover .nik-cta__icon--img {
	background: none; border: 0; backdrop-filter: none;
}
.nik-cta__icon-img { width: 100%; height: 100%; object-fit: contain; display: block; }

.nik-cta__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nik-cta__badge {
	align-self: flex-start; font-size: 11px; font-weight: 700; line-height: 1;
	padding: 5px 10px; border-radius: 999px; margin-bottom: 3px;
	background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
}
.nik-cta__title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.nik-cta__sub { font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, .85); }

.nik-cta__action {
	display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
	font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 999px;
	background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
	transition: background .3s ease, gap .3s ease;
}
.nik-cta__card:hover .nik-cta__action { background: rgba(255, 255, 255, .26); gap: 10px; }
.nik-cta__arrow { transition: transform .3s ease; }
.nik-cta__card:hover .nik-cta__arrow { transform: translateX(4px); }

@media (max-width: 860px) {
	.nik-cta { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 480px) {
	.nik-cta__card { grid-template-columns: auto 1fr; padding: 20px; }
	.nik-cta__action { grid-column: 1 / -1; justify-content: center; margin-top: 4px; }
	.nik-cta__icon { width: 50px; height: 50px; }
	.nik-cta__title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.nik-cta__card, .nik-cta__icon, .nik-cta__glow, .nik-cta__action, .nik-cta__arrow { transition: none; }
	.nik-cta__card:hover { transform: none; }
}

/* ---------------- Experts ---------------- */
/* Keep four-card widths while distributing fewer cards across the full row. */
@media (min-width: 1025px) {
	.nik-experts .nik-grid {
		display: flex; flex-wrap: wrap; justify-content: space-between;
		gap: var(--nik-gap);
	}
	.nik-experts .nik-expert {
		flex: 0 0 calc((100% - 3 * var(--nik-gap)) / 4);
	}
}
/* The first advisor is the CEO; keep that card on its own row. */
@media (max-width: 1024px) {
	.nik-experts .nik-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.nik-experts .nik-expert--0 { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
	.nik-experts .nik-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.nik-expert {
	background: var(--nik-bg-soft); border: 1px solid var(--nik-border);
	border-radius: var(--nik-radius); padding: 20px 14px; text-align: center;
}
.nik-expert__avatar {
	width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
	background: linear-gradient(135deg, var(--nik-primary-500), var(--nik-primary));
	overflow: hidden;
}
.nik-expert__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nik-expert__name { display: block; font-size: 14px; font-weight: 700; color: var(--nik-text); }
.nik-expert__role { display: block; font-size: 12px; color: var(--nik-text-soft); }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
	/* Single column: text on top, then the showcase centred with stats as a row. */
	.nik-hero__inner {
		padding-block: 40px; min-height: 0;
		grid-template-columns: 1fr; gap: 28px;
	}
	.nik-hero__content { max-width: none; }
	/* Centre the showcase + stats column so the slider isn't pushed to one side. */
	.nik-hero__media { flex-direction: column-reverse; align-items: center; gap: 24px; }
	/* Stack the slide indicator UNDER the stage as a horizontal row so the ticks
	   never overlap the product image on narrow screens, and centre the block. */
	.nik-hero__showcase {
		width: clamp(200px, 70vw, 300px); margin-inline: auto;
		grid-template-columns: 1fr;
		grid-template-areas: "stage" "ticks";
		gap: 12px;
	}
	.nik-hero__ticks { flex-direction: row; }
	/* Each tick is now a horizontal dash; the active one grows in width, and the
	   forward arrowhead (which pointed sideways at the image) is dropped here. */
	.nik-hero__tick { width: 24px; height: 14px; }
	.nik-hero__tick::before { width: 18px; height: 4px; }
	.nik-hero__tick.is-active::before { width: 26px; height: 5px; }
	.nik-hero__tick.is-active::after { display: none; }
	/* Stats become an in-flow row under the showcase — always three across, no wrap. */
	.nik-hero__stats {
		flex-direction: row; flex-wrap: nowrap; justify-content: center;
		gap: 12px; max-width: none; width: 100%; flex: 0 0 auto;
	}
	.nik-stat {
		text-align: center; min-width: 0; flex: 1 1 0;
		padding: 12px 6px; box-shadow: 0 2px 12px rgba(11,28,69,.06);
	}
	.nik-trust__grid { grid-template-columns: 1fr 1fr; }
	.nik-trust__item:nth-child(odd) { border-inline-start: 0; }
}
@media (max-width: 720px) {
	/* Match the polished 2×2 benefit cards used on the mobile product page. */
	.nik-trust { padding-block: 18px; background: transparent; border-bottom: 0; }
	.nik-trust__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
	.nik-trust__item,
	.nik-trust__item:nth-child(odd),
	.nik-trust__item:nth-child(n+3) {
		min-width: 0; min-height: 88px; padding: 12px 10px;
		gap: 9px; border: 1px solid var(--nik-border); border-radius: 13px;
		background: linear-gradient(145deg, #fff 30%, rgba(255,153,0,.045) 100%);
		box-shadow: 0 8px 22px -18px rgba(11,28,69,.55);
	}
	.nik-trust__icon {
		width: 38px; height: 38px; flex: 0 0 38px;
		border-radius: 11px;
	}
	.nik-trust__icon--img,
	.nik-trust__item:hover .nik-trust__icon--img {
		background: #fff; border: 1px solid var(--nik-border); border-radius: 11px;
	}
	.nik-trust__img { width: 28px; height: 28px; margin: auto; }
	.nik-trust__text { min-width: 0; line-height: 1.45; }
	.nik-trust__title { font-size: 12px; line-height: 1.55; font-weight: 800; }
	.nik-trust__sub { font-size: 10.5px; line-height: 1.5; }
}
@media (max-width: 520px) {
	.nik-trust__grid { gap: 7px; }
	.nik-trust__item,
	.nik-trust__item:nth-child(odd),
	.nik-trust__item:nth-child(n+3) { min-height: 84px; padding: 10px 8px; gap: 7px; }
	.nik-trust__icon { width: 34px; height: 34px; flex-basis: 34px; }
	.nik-trust__img { width: 25px; height: 25px; }
	.nik-trust__title { font-size: 11.5px; }
	.nik-trust__sub { font-size: 10px; }
	/* Keep the three stat boxes side-by-side and readable on narrow phones. */
	.nik-hero__stats { gap: 6px; }
	.nik-stat { padding: 12px 4px; }
	.nik-stat__num { font-size: 18px; }
	.nik-stat__label { font-size: 10.5px; white-space: normal; line-height: 1.3; }
}

/* =============================================================
   Tabbed product carousels (.nik-tabbed-carousels)
   -------------------------------------------------------------
   One home section that merges «جدیدترین محصولات» with the admin-
   configured custom carousels. The tab bar sits where a section
   head normally would; clicking a tab swaps the carousel below.
   Markup reuses .nik-tabs but is styled standalone here because
   product.css (which styles .nik-tabs on the PDP) isn't loaded on
   the home page.
   ============================================================= */
.nik-carousel-tabs .nik-tabs__nav {
	display: flex; gap: 8px; margin-bottom: 22px;
	overflow-x: auto; scrollbar-width: none;
}
.nik-carousel-tabs .nik-tabs__nav::-webkit-scrollbar { display: none; }
.nik-carousel-tabs .nik-tabs__btn {
	position: relative; flex-shrink: 0; cursor: pointer; white-space: nowrap;
	background: var(--nik-bg-soft); border: 1px solid var(--nik-border);
	border-radius: 999px; padding: 10px 20px; font: inherit;
	font-size: 15px; font-weight: 700; color: var(--nik-text-soft);
	transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.nik-carousel-tabs .nik-tabs__btn:hover { color: var(--nik-primary); border-color: var(--nik-primary); }
.nik-carousel-tabs .nik-tabs__btn.is-active {
	color: #fff; background: var(--nik-primary); border-color: var(--nik-primary);
	box-shadow: 0 8px 18px -10px rgba(11,28,69,.55);
}
.nik-carousel-tabs .nik-tabs__panel { animation: nik-cartab-in .25s ease; }
.nik-carousel-tabs .nik-tabs__panel[hidden] { display: none; }
.nik-carousel-tabs__lazy {
	display: grid; place-items: center; min-height: 330px;
	border: 1px dashed var(--nik-border); border-radius: 16px;
	background: linear-gradient(135deg, var(--nik-bg-soft), #fff);
	color: var(--nik-text-soft); font-size: 13px; text-align: center;
}
.nik-carousel-tabs__lazy.is-loading::before {
	content: ''; width: 24px; height: 24px; margin-inline-end: 9px;
	border: 3px solid var(--nik-border); border-top-color: var(--nik-accent);
	border-radius: 50%; animation: nik-carousel-lazy-spin .75s linear infinite;
}
.nik-carousel-tabs__lazy.is-loading { display: flex; align-items: center; justify-content: center; }
.nik-carousel-tabs__lazy.has-error { color: #b42318; border-color: rgba(180,35,24,.3); }
.nik-carousel-tabs__empty { min-height: 160px; display: grid; place-items: center; color: var(--nik-text-soft); }

/* Extra sections contain no product-card DOM until they approach the viewport. */
.nik-extra-carousel-section { content-visibility: auto; contain-intrinsic-size: auto 470px; }

@keyframes nik-carousel-lazy-spin { to { transform: rotate(360deg); } }

/* The prev/next controls live in a per-panel head, but visually they belong on
   the SAME row as the tab bar (tabs on the inline-start, arrows on the
   inline-end). Pin the active panel's head over the tab-bar row instead of
   letting it push the carousel down. */
.nik-carousel-tabs { position: relative; }
.nik-carousel-tabs .nik-tabs__nav { padding-inline-end: 100px; } /* keep tabs clear of the arrows */
.nik-carousel-tabs__controls-host {
	position: absolute; top: 0; inset-inline-end: 0;
	display: flex; align-items: center; min-height: 0; margin: 0;
	height: 40px; /* ~ tab-bar height, so the arrows sit centered on that row */
}
@keyframes nik-cartab-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
	.nik-carousel-tabs .nik-tabs__nav { gap: 6px; margin-bottom: 16px; }
	.nik-carousel-tabs .nik-tabs__btn { padding: 9px 16px; font-size: 14px; }
	/* Controls are hidden on touch (swipe) — reclaim the reserved space. */
	.nik-carousel-tabs .nik-tabs__nav { padding-inline-end: 0; }
	.nik-carousel-tabs__controls-host { display: none; }
	.nik-carousel-tabs__lazy { min-height: 285px; }
}

@media (prefers-reduced-motion: reduce) {
	.nik-carousel-tabs .nik-tabs__panel { animation: none; }
	.nik-carousel-tabs__lazy.is-loading::before { animation: none; }
}

/* POST fallback for product-card and sticky add-to-cart controls. */
.nik-cart-action { display: inline-flex; flex: 0 0 auto; margin: 0; padding: 0; border: 0; min-width: 0; }
.nik-cart-action .added_to_cart { display: none !important; }

/* =============================================================
   Nikmehr — Shop / category archive
   Sidebar filters + AJAX product grid. Uses tokens from main.css.
   ============================================================= */

.nik-shop { padding-block: 24px 56px; }

/* ---------- Header / breadcrumb ------------------------------ */
.nik-breadcrumb {
	font-size: 13px; color: var(--nik-text-soft);
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
	margin-bottom: 12px;
}
.nik-breadcrumb a { color: var(--nik-text-soft); }
.nik-breadcrumb a:hover { color: var(--nik-accent-600); }
.nik-breadcrumb__sep { color: var(--nik-text-faint); }

.nik-shop__title {
	font-size: 26px; font-weight: 800; color: var(--nik-primary); margin: 0 0 10px;
}

/* ---------- Category description (clamped to 2 lines) -------- */
.nik-shop__desc {
	position: relative;
	background: var(--nik-bg-soft);
	border: 1px solid var(--nik-border);
	border-inline-start: 3px solid var(--nik-accent);
	border-radius: var(--nik-radius);
	padding: 14px 16px;
	color: var(--nik-text-soft);
	font-size: 13.5px; line-height: 1.9;
	width: 100%;
}
.nik-shop__desc-body { overflow: hidden; }
.nik-shop__desc-body > :first-child { margin-top: 0; }
.nik-shop__desc-body > :last-child { margin-bottom: 0; }
.nik-shop__desc-body a { color: var(--nik-primary-500); font-weight: 600; }

/* Collapsed: clamp to 2 lines with a soft fade. */
.nik-shop__desc[data-clamp]:not(.is-open) .nik-shop__desc-body {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.nik-shop__desc[data-clamp]:not(.is-open)::after {
	content: ''; position: absolute; inset-inline: 1px; bottom: 36px; height: 26px;
	background: linear-gradient(to top, var(--nik-bg-soft), transparent);
	pointer-events: none;
}

.nik-shop__desc-more {
	display: none; /* shown by JS only when the text actually overflows */
	align-items: center; gap: 4px; margin-top: 8px;
	background: none; border: 0; cursor: pointer; padding: 2px 0;
	font: inherit; font-size: 13px; font-weight: 700; color: var(--nik-accent-600);
}
.nik-shop__desc.has-overflow .nik-shop__desc-more { display: inline-flex; }
.nik-shop__desc-more svg { transition: transform .2s ease; }
.nik-shop__desc.is-open .nik-shop__desc-more svg { transform: rotate(180deg); }

/* ---------- Layout ------------------------------------------- */
.nik-shop__layout {
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	margin-top: 18px;
}

/* ---------- Sidebar ------------------------------------------ */
/* Smart sticky: the sidebar scrolls up with the products; once its bottom
   edge reaches the bottom of the viewport it "sticks" there, so a tall filter
   list keeps scrolling into view instead of being pinned to the top (which
   would hide the lower filters). Achieved with a negative sticky offset equal
   to (sidebar height - viewport height), set per-element by shop.js. When the
   sidebar is shorter than the viewport it just sticks to the top. */
.nik-shop__sidebar {
	position: sticky;
	top: var(--nik-sidebar-top, 16px);
	align-self: start;
	background: var(--nik-bg);
	border: 1px solid var(--nik-border);
	border-radius: var(--nik-radius);
	overflow: hidden;
}
.nik-shop__sidebar-head {
	display: none; /* visible only as a mobile drawer header */
	align-items: center; justify-content: space-between;
	padding: 14px 16px; border-bottom: 1px solid var(--nik-border);
}
.nik-shop__sidebar-title { font-size: 16px; font-weight: 800; color: var(--nik-primary); margin: 0; }
.nik-shop__sidebar-close { background: none; border: 0; cursor: pointer; color: var(--nik-text-soft); padding: 4px; display: flex; }

.nik-shop__search {
	display: flex; align-items: center; gap: 8px;
	padding: 12px 14px; border-bottom: 1px solid var(--nik-border);
	color: var(--nik-text-faint);
}
.nik-shop__search input {
	flex: 1; min-width: 0; border: 0; background: none; outline: none;
	font: inherit; font-size: 13.5px; color: var(--nik-text);
}

/* ---------- Facet box ---------------------------------------- */
.nik-facet { border-bottom: 1px solid var(--nik-border); }
.nik-facet:last-child { border-bottom: 0; }

.nik-facet__head {
	width: 100%; display: flex; align-items: center; justify-content: space-between;
	gap: 8px; padding: 13px 15px; background: none; border: 0; cursor: pointer;
	font: inherit; color: var(--nik-primary); font-weight: 700; font-size: 14px;
	text-align: start;
}
.nik-facet__caret { transition: transform .2s ease; color: var(--nik-text-faint); flex-shrink: 0; }
.nik-facet.is-collapsed .nik-facet__caret { transform: rotate(-90deg); }
.nik-facet.is-collapsed .nik-facet__list,
.nik-facet.is-collapsed .nik-facet__search { display: none; }

.nik-facet__search { padding: 0 15px 10px; }
.nik-facet__search input {
	width: 100%; box-sizing: border-box; padding: 7px 10px;
	border: 1px solid var(--nik-border); border-radius: var(--nik-radius-sm);
	font: inherit; font-size: 13px; outline: none;
}
.nik-facet__search input:focus { border-color: var(--nik-accent); }

/* The list scrolls internally once it grows past ~7 rows. */
.nik-facet__list {
	max-height: 244px; overflow-y: auto; overscroll-behavior: contain;
	padding: 2px 15px 13px;
	display: flex; flex-direction: column; gap: 2px;
	scrollbar-width: thin; scrollbar-color: var(--nik-border) transparent;
}
.nik-facet__list::-webkit-scrollbar { width: 7px; }
.nik-facet__list::-webkit-scrollbar-thumb { background: var(--nik-border); border-radius: 4px; }
.nik-facet__list::-webkit-scrollbar-track { background: transparent; }

.nik-facet__opt {
	display: flex; align-items: center; gap: 8px;
	padding: 5px 6px; border-radius: var(--nik-radius-sm); cursor: pointer;
	font-size: 13px; color: var(--nik-text); transition: background .12s;
}
.nik-facet__opt:hover { background: var(--nik-bg-soft); }
.nik-facet__opt input { margin: 0; accent-color: var(--nik-accent); flex-shrink: 0; width: 15px; height: 15px; }
.nik-facet__name { flex: 1; min-width: 0; line-height: 1.5; }
.nik-facet__count {
	font-size: 11.5px; font-weight: 700; color: #1a1a1a;
	background: var(--nik-accent); border-radius: 20px; padding: 1px 8px; flex-shrink: 0;
}
.nik-facet__opt--link { text-decoration: none; }
.nik-facet__opt--link:hover { color: var(--nik-primary); }
.nik-facet__opt[hidden] { display: none; }

/* ---------- Main column ------------------------------------- */
.nik-shop__main { min-width: 0; }

.nik-shop__toolbar {
	display: flex; align-items: center; gap: 14px;
	padding: 10px 14px; margin-bottom: 14px;
	background: var(--nik-bg-soft); border: 1px solid var(--nik-border);
	border-radius: var(--nik-radius);
}
.nik-shop__count { color: var(--nik-text-soft); font-size: 13px; }
.nik-shop__count strong { color: var(--nik-primary); font-weight: 800; }
.nik-shop__sort { margin-inline-start: auto; display: flex; align-items: center; }
.nik-shop__sort select {
	font: inherit; font-size: 13px; padding: 7px 30px 7px 12px;
	border: 1px solid var(--nik-border); border-radius: var(--nik-radius-sm);
	background: var(--nik-bg); color: var(--nik-text); cursor: pointer; outline: none;
	/* Hide the browser's native dropdown arrow so only our custom chevron shows
	   (otherwise both render → two stacked down-arrows). */
	appearance: none; -webkit-appearance: none; -moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a97ab' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: left 10px center;
}
/* Edge/IE legacy: hide the native expand arrow too. */
.nik-shop__sort select::-ms-expand { display: none; }
.nik-shop__sort select:focus { border-color: var(--nik-accent); }

/* Filter toggle button — desktop hides it, mobile shows it. */
.nik-shop__filter-toggle { display: none; }
.nik-shop__filter-toggle .nik-shop__filter-badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 2px;
	border-radius: 20px; background: var(--nik-accent); color: #1a1a1a;
	font-size: 11px; font-weight: 800; line-height: 1;
}

/* ---------- Active filter chips ------------------------------ */
.nik-shop__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.nik-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 12px; border-radius: 30px; cursor: pointer;
	background: var(--nik-bg); border: 1px solid var(--nik-border);
	font: inherit; font-size: 12.5px; color: var(--nik-text); transition: border-color .12s, color .12s;
}
.nik-chip:hover { border-color: var(--nik-accent); color: var(--nik-accent-600); }
.nik-chip svg { color: var(--nik-text-faint); }
.nik-chip:hover svg { color: var(--nik-accent-600); }
.nik-chip--clear { border-style: dashed; color: var(--nik-text-soft); }

/* ---------- Grid -------------------------------------------- */
.nik-shop__grid {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--nik-gap);
}
@media (max-width: 1100px) { .nik-shop__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.nik-shop__results { position: relative; min-height: 200px; transition: opacity .15s ease; }
.nik-shop__results.is-loading { opacity: .45; pointer-events: none; }

/* ---------- Product card overrides on WooCommerce pages -------
   The shop/category archives load WooCommerce's default stylesheet, whose
   `.woocommerce a.button` rules repaint our add-to-cart button grey. Restore
   the home-page look here, scoping with `.woocommerce` so we out-specify WC. */
.woocommerce .nik-product__cart.button,
.woocommerce .nik-product__cart.button.added {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	width: 42px; height: 42px; min-width: 0; max-width: none; padding: 0; margin: 0;
	border-radius: var(--nik-radius-sm); line-height: 1; text-align: center;
	color: #1a1a1a; background: var(--nik-accent); border: 1px solid var(--nik-accent);
	font-size: 13px; font-weight: 700; text-decoration: none;
}
.woocommerce .nik-product__cart.button:hover,
.woocommerce .nik-product__cart.button.added:hover {
	background: var(--nik-accent-600); border-color: var(--nik-accent-600); color: #1a1a1a;
}
/* Kill WooCommerce's post-add "✓" / "added" affordances — the open mini-cart
   drawer is the feedback now, so the button must stay the plain orange icon. */
.woocommerce .nik-product__cart.button.added::after,
.woocommerce .nik-product__cart.button::after {
	content: none !important; display: none !important;
}
.woocommerce .nik-product__cart--view.button {
	width: auto; padding: 0 14px; background: #fff; color: var(--nik-primary);
	border: 1px solid var(--nik-border);
}
.woocommerce .nik-product__cart--view.button:hover {
	background: var(--nik-bg-soft); color: var(--nik-primary); border-color: var(--nik-primary);
}
/* WC appends its own "View cart" link after AJAX add; keep the card compact. */
.woocommerce .nik-product__foot .added_to_cart { display: none !important; }
.nik-shop__results.is-loading::after {
	content: ''; position: absolute; inset-block-start: 40px; inset-inline-start: 50%;
	width: 34px; height: 34px; margin-inline-start: -17px;
	border: 3px solid var(--nik-bg-muted); border-top-color: var(--nik-accent);
	border-radius: 50%; animation: nik-spin .7s linear infinite;
}
@keyframes nik-spin { to { transform: rotate(360deg); } }

.nik-shop__empty {
	grid-column: 1 / -1; text-align: center; padding: 60px 20px;
	color: var(--nik-text-soft); display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.nik-shop__empty svg { color: var(--nik-text-faint); }

/* ---------- Pagination -------------------------------------- */
.nik-shop__pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.nik-shop__pagination .page-numbers {
	min-width: 38px; height: 38px; padding: 0 10px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--nik-border); border-radius: var(--nik-radius-sm);
	color: var(--nik-text); font-size: 14px; font-weight: 600; text-decoration: none;
	transition: background .12s, color .12s, border-color .12s;
}
.nik-shop__pagination a.page-numbers:hover { border-color: var(--nik-accent); color: var(--nik-accent-600); }
.nik-shop__pagination .page-numbers.current {
	background: var(--nik-primary); border-color: var(--nik-primary); color: #fff;
}
.nik-shop__pagination .page-numbers.dots { border: 0; }

/* ---------- Mobile drawer ----------------------------------- */
.nik-shop__overlay {
	position: fixed; inset: 0; background: rgba(10,20,45,.45);
	z-index: 1000; opacity: 0; transition: opacity .2s ease;
}
.nik-shop__overlay.is-visible { opacity: 1; }

/* Drawer "show results" footer — only meaningful as a mobile drawer. */
.nik-shop__sidebar-foot { display: none; }

@media (max-width: 880px) {
	.nik-shop__layout { grid-template-columns: 1fr; }
	.nik-shop__filter-toggle { display: inline-flex; }

	/* On mobile the sidebar becomes an off-canvas drawer pinned to the inline-end
	   edge (the right side in this RTL theme). It starts translated fully off
	   screen and slides in when .is-filters-open is added. */
	.nik-shop__sidebar {
		/* Off-canvas drawer. Use explicit top/bottom/right (not sticky `top` or
		   logical insets) so JS's desktop `--nik-sidebar-top` offset and RTL
		   inset resolution can't shift the fixed drawer off-position. It's pinned
		   to the right edge of the screen in this RTL theme. */
		position: fixed; top: 0; bottom: 0; right: 0; left: auto;
		top: 0 !important; /* override the inline sticky offset JS leaves behind */
		/* Explicit height: on iOS a fixed element relying only on top/bottom can
		   resolve to zero height for its flex children, which kills inner
		   scrolling. dvh keeps it correct under the mobile browser chrome. */
		height: 100vh; height: 100dvh;
		width: min(360px, 88vw); max-width: 88vw; z-index: 1001;
		border-radius: 0; border: 0; box-shadow: 0 0 40px rgba(0,0,0,.2);
		display: flex; flex-direction: column;
		overflow: hidden; /* inner regions scroll, not the whole drawer */
		/* Hidden state: slid out past the right edge, and visibility:hidden so the
		   box-shadow blur (which escapes ancestor overflow clipping on a fixed
		   element) can't bleed a sliver onto the screen edge. */
		transform: translateX(100%);
		visibility: hidden;
		transition: transform .25s ease, visibility 0s linear .25s;
	}
	.nik-shop.is-filters-open .nik-shop__sidebar {
		transform: translateX(0);
		visibility: visible;
		transition: transform .25s ease, visibility 0s;
	}

	.nik-shop__sidebar-head { display: flex; flex-shrink: 0; }
	.nik-shop__search { flex-shrink: 0; }
	/* The facets region is the only scrollable part inside the drawer.
	   `min-height: 0` is essential: a flex item defaults to min-height:auto, which
	   refuses to shrink below its content, so without this the whole drawer grows
	   past the viewport, gets clipped by overflow:hidden, and nothing scrolls. */
	.nik-shop__facets {
		flex: 1 1 auto; min-height: 0;
		overflow-y: auto; overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}
	/* Inside the drawer the per-facet lists shouldn't keep their own short scroll
	   box — let them flow naturally and let the whole facets column do the
	   scrolling, otherwise you get awkward nested scroll regions on a phone. */
	.nik-shop__facets .nik-facet__list { max-height: none; overflow: visible; }

	/* Sticky footer with a big "show results" button to dismiss the drawer. */
	.nik-shop__sidebar-foot {
		display: flex; flex-shrink: 0; gap: 10px;
		padding: 12px 14px; border-top: 1px solid var(--nik-border);
		background: var(--nik-bg);
	}
	.nik-shop__sidebar-foot .nik-btn { flex: 1; justify-content: center; }
	.nik-shop__apply-count { font-weight: 800; }

	/* Toolbar: filter toggle · product count · sort — all on one tidy row. */
	.nik-shop__toolbar {
		flex-wrap: nowrap; gap: 10px;
		padding: 8px 10px;
	}
	.nik-shop__filter-toggle {
		flex-shrink: 0; font-weight: 700; gap: 6px;
		padding: 8px 14px; border-color: var(--nik-accent); color: var(--nik-primary);
	}
	.nik-shop__count {
		flex: 1; min-width: 0; text-align: center;
		white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	}
	.nik-shop__sort { flex-shrink: 0; margin-inline-start: 0; }
	.nik-shop__sort select { max-width: 130px; padding-block: 8px; }
}

@media (max-width: 560px) {
	.nik-shop__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.nik-shop__title { font-size: 21px; }
	/* Keep the three controls on one line even on small phones — just tighten
	   the spacing and trim the sort select so they all fit. */
	.nik-shop__toolbar { gap: 8px; padding: 8px; }
	.nik-shop__filter-toggle { padding: 8px 12px; }
	.nik-shop__sort select { max-width: 112px; padding-inline: 8px 26px; font-size: 12.5px; }
}

@media (max-width: 380px) {
	/* On the very narrowest screens hide the filter button's text label, keeping
	   just the icon + badge, so the count and sort never get squeezed out. */
	.nik-shop__filter-toggle { font-size: 0; padding: 8px 11px; }
	.nik-shop__filter-toggle svg { width: 20px; height: 20px; }
	.nik-shop__filter-badge { font-size: 11px !important; }
}

/* Catalog SEO: optional brand landing link. */
.nik-shop__brand-landing { margin: 12px 0 0; font-size: 13px; }
.nik-shop__brand-landing a { color: var(--nik-primary-500); font-weight: 700; text-decoration: underline; }

/* =============================================================
   Nikmehr — «پیش‌فاکتور فوری» modal
   Centred dialog opened from the header quote button. Reuses the
   .nik-cart-locked scroll-lock class and the design tokens from main.css.
   ============================================================= */

.nik-proforma-overlay {
	position: fixed; inset: 0; z-index: 140;
	background: rgba(11,28,69,.5);
	opacity: 0; transition: opacity .3s ease;
}
.nik-proforma-overlay.is-open { opacity: 1; }

.nik-proforma {
	position: fixed; z-index: 150; inset: 0; margin: auto;
	width: min(94vw, 460px); max-height: min(92vh, 640px);
	display: flex; flex-direction: column;
	background: #fff; color: var(--nik-text);
	border-radius: var(--nik-radius);
	box-shadow: 0 24px 70px -16px rgba(11,28,69,.55);
	/* Parked: scaled down + faded until opened. */
	opacity: 0; visibility: hidden;
	transform: translateY(12px) scale(.96);
	transition: opacity .25s ease, transform .25s cubic-bezier(.22,1,.36,1), visibility .25s;
}
.nik-proforma.is-open {
	opacity: 1; visibility: visible;
	transform: translateY(0) scale(1);
}
.nik-proforma.is-busy { pointer-events: none; }
.nik-proforma.is-busy .nik-proforma__form { opacity: .55; transition: opacity .15s ease; }

.nik-proforma__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 20px; border-bottom: 1px solid var(--nik-border); flex-shrink: 0;
}
.nik-proforma__title {
	margin: 0; font-size: 17px; font-weight: 800; color: var(--nik-primary);
}
.nik-proforma__close {
	display: inline-flex; padding: 4px; background: none; border: 0; cursor: pointer;
	color: var(--nik-text-soft); transition: color .15s ease;
}
.nik-proforma__close:hover { color: var(--nik-accent-600); }

.nik-proforma__note {
	display: flex; align-items: center; gap: 8px;
	margin: 0; padding: 12px 20px;
	font-size: 13px; font-weight: 700; line-height: 1.6;
	color: var(--nik-success); background: var(--nik-success-bg);
}
.nik-proforma__note-icon { flex-shrink: 0; }

.nik-proforma__form {
	display: flex; flex-direction: column; gap: 14px;
	padding: 18px 20px 20px;
	overflow-y: auto; overscroll-behavior: contain;
}

.nik-proforma__field { display: flex; flex-direction: column; gap: 6px; }
.nik-proforma__formal {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--nik-border);
	border-radius: var(--nik-radius-sm);
	background: rgba(11,28,69,.025);
}
.nik-proforma__formal[hidden] { display: none; }
.nik-proforma__field--wide { grid-column: 1 / -1; }
.nik-proforma__label {
	font-size: 13px; font-weight: 700; color: var(--nik-text);
}
.nik-proforma__input,
.nik-proforma__textarea {
	width: 100%; padding: 10px 12px;
	font-family: var(--nik-font); font-size: 14px; color: var(--nik-text);
	background: var(--nik-bg-soft);
	border: 1px solid var(--nik-border); border-radius: var(--nik-radius-sm);
	transition: border-color .15s ease, background .15s ease;
}
.nik-proforma__input:focus,
.nik-proforma__textarea:focus {
	outline: none; border-color: var(--nik-accent); background: #fff;
}
.nik-proforma__textarea { resize: vertical; min-height: 88px; line-height: 1.7; }
.nik-proforma__input::placeholder,
.nik-proforma__textarea::placeholder { color: var(--nik-text-faint); }

/* formal / informal single-choice toggle. */
.nik-proforma__types {
	display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.nik-proforma__type {
	padding: 10px 12px; cursor: pointer;
	font-family: var(--nik-font); font-size: 14px; font-weight: 700;
	color: var(--nik-text-soft); background: var(--nik-bg-soft);
	border: 1px solid var(--nik-border); border-radius: var(--nik-radius-sm);
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.nik-proforma__type:hover { border-color: var(--nik-accent); }
.nik-proforma__type.is-active {
	color: var(--nik-primary); background: #fff;
	border-color: var(--nik-accent); box-shadow: inset 0 0 0 1px var(--nik-accent);
}

/* Inline validation. */
.nik-proforma__field.has-error .nik-proforma__input,
.nik-proforma__field.has-error .nik-proforma__textarea {
	border-color: #c0392b; background: rgba(192,57,43,.04);
}
.nik-proforma__error { font-size: 12px; font-weight: 600; color: #c0392b; }

/* Status message. */
.nik-proforma__feedback {
	margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.8;
}
.nik-proforma__feedback:empty { display: none; }
.nik-proforma__feedback.is-success {
	padding: 12px 14px; border-radius: var(--nik-radius-sm);
	color: var(--nik-success); background: var(--nik-success-bg);
}
.nik-proforma__feedback.is-error { color: #c0392b; }

.nik-proforma__submit {
	padding: 12px 16px; cursor: pointer;
	font-family: var(--nik-font); font-size: 15px; font-weight: 800;
	color: #1a1a1a; background: var(--nik-accent);
	border: 0; border-radius: var(--nik-radius-sm);
	transition: background .15s ease;
}
.nik-proforma__submit:hover { background: var(--nik-accent-600); }
.nik-proforma__submit:disabled { opacity: .6; cursor: default; }

/* Honeypot — visually hidden but reachable to bots. */
.nik-proforma__hp {
	position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

@media (max-width: 480px) {
	.nik-proforma { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
	.nik-proforma__formal { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.nik-proforma, .nik-proforma-overlay { transition: opacity .2s ease; }
	.nik-proforma { transform: none; }
}

/**
 * Live header search dropdown.
 *
 * The panel is absolutely positioned under the search input. The header form
 * itself sets `overflow: hidden` (to clip its pill corners), so we re-enable
 * positioning here and let the panel escape via `position: absolute` on a
 * relatively-positioned form. Up to five rows show; the list scrolls beyond.
 */

/* Make the form a positioning context and stop it clipping the dropdown.
   `overflow: visible` is safe because the pill's rounded corners come from the
   border-radius on the form's own background, not from clipped children. */
.nik-header__search {
	position: relative;
	overflow: visible;
}

/* With the form no longer clipping (overflow:visible), the stretched submit
   button's outer corners would poke past the pill. Round them back to match. */
.nik-header__search-btn {
	border-start-end-radius: 999px;
	border-end-end-radius: 999px;
}

.nik-search__panel {
	position: absolute;
	inset-block-start: calc(100% + 8px);
	inset-inline: 0;
	z-index: 60;
	background: var(--nik-bg);
	border: 1px solid var(--nik-border);
	border-radius: var(--nik-radius);
	box-shadow: 0 16px 44px -12px rgba(11, 28, 69, .28);
	overflow: hidden;
	text-align: start;
}

.nik-search__list {
	list-style: none;
	margin: 0;
	padding: 6px;
	/* Five rows ≈ 5 × 64px + paddings; the rest scrolls inside the panel. */
	max-height: 340px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.nik-search__item {
	border-radius: var(--nik-radius-sm);
}

.nik-search__item.is-active,
.nik-search__item:hover {
	background: var(--nik-bg-soft);
}

.nik-search__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	color: inherit;
}

.nik-search__link:hover {
	color: inherit;
}

.nik-search__thumb {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: var(--nik-radius-sm);
	background: var(--nik-bg-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.nik-search__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.nik-search__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nik-search__name {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--nik-text);
	/* Keep names to two lines so rows stay even. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nik-search__price {
	flex-shrink: 0;
	margin-inline-start: auto;
	padding-inline-start: 8px;
	text-align: end;
	font-size: 13px;
	font-weight: 700;
	color: var(--nik-primary);
	white-space: nowrap;
}

/* WooCommerce's price markup ships its own font-size/colour; normalise it so it
   sits cleanly in the row (the WC stylesheet isn't loaded on every page). */
.nik-search__price .woocommerce-Price-amount,
.nik-search__price bdi {
	font-size: inherit;
	color: inherit;
}

.nik-search__price .woocommerce-Price-currencySymbol {
	font-size: .85em;
	font-weight: 600;
	margin-inline-start: 2px;
}

.nik-search__price .nik-search__price-call {
	color: var(--nik-text-soft);
	font-weight: 600;
}

/* WooCommerce wraps the sale layout in <del>/<ins>; tame it to fit one line. */
.nik-search__price del {
	color: var(--nik-text-faint);
	font-weight: 500;
	font-size: 12px;
	margin-inline-end: 6px;
}

.nik-search__price ins {
	text-decoration: none;
	color: var(--nik-primary);
}


/* Out-of-stock rows: dim the row and badge the price column. */
.nik-search__item.is-out .nik-search__thumb,
.nik-search__item.is-out .nik-search__name {
	opacity: .65;
}

.nik-search__price-out {
	color: var(--nik-danger, #c0392b);
	font-weight: 700;
	font-size: 12.5px;
}

/* In-panel «در حال جستجو…» row shown the moment a request fires. */
.nik-search__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 16px;
	font-size: 13px;
	color: var(--nik-text-soft);
}

.nik-search__spinner {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid var(--nik-border);
	border-block-start-color: var(--nik-accent);
	animation: nik-search-spin .7s linear infinite;
}

@keyframes nik-search-spin {
	to { transform: rotate(360deg); }
}

.nik-search__empty {
	padding: 18px 16px;
	font-size: 13px;
	color: var(--nik-text-soft);
	text-align: center;
}

.nik-search__all {
	display: block;
	padding: 11px 16px;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	color: var(--nik-accent-600);
	border-block-start: 1px solid var(--nik-border);
	background: var(--nik-bg-soft);
}

.nik-search__all:hover {
	color: var(--nik-accent);
	background: var(--nik-bg-muted);
}

/* While a request is in flight, swap the static magnifier for a spinner ring so
   it's obvious the box is searching. The SVG icon hides (CSS pseudo-elements
   don't render on SVG, so the spinner lives on the form, drawn over the icon's
   slot at the inline-start padding). */
.nik-header__search.is-loading .nik-header__search-icon {
	visibility: hidden;
}

.nik-header__search.is-loading::before {
	content: '';
	position: absolute;
	inset-block-start: 50%;
	/* The form has padding-inline-start:16px; centre the 17px ring within it. */
	inset-inline-start: 16px;
	width: 17px;
	height: 17px;
	margin-block-start: -9px;
	border-radius: 50%;
	border: 2px solid var(--nik-border);
	border-block-start-color: var(--nik-accent);
	animation: nik-search-spin .7s linear infinite;
	pointer-events: none;
	z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
	.nik-header__search.is-loading::before { animation: none; }
}

/* =============================================================
   Nikmehr — Product comparison
   A slim side drawer (the "compare cart") plus a full-screen
   comparison-table modal. Reuses the .nik-cart-locked scroll-lock
   class and the design tokens from main.css. RTL via logical props.
   ============================================================= */

/* ---------- Shared overlay (drawer + can be reused) ---------- */
.nik-compare-overlay {
	position: fixed; inset: 0; z-index: 140;
	background: rgba(11,28,69,.5);
	opacity: 0; transition: opacity .3s ease;
}
.nik-compare-overlay.is-open { opacity: 1; }

/* =============================================================
   Drawer ("سبد مقایسه")
   ============================================================= */
.nik-compare-drawer {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 150;
	width: min(92vw, 360px);
	display: flex; flex-direction: column;
	background: #fff; color: var(--nik-text);
	box-shadow: 0 0 60px -10px rgba(11,28,69,.4);
	/* Parked off-screen toward the inline-start edge until opened. `translateX`
	   isn't direction-aware, so we park it with a 100% translation toward the
	   start edge — positive in RTL (start = right), negative in LTR. The default
	   below is the RTL value; the LTR override follows. */
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .32s cubic-bezier(.22,1,.36,1), visibility .32s;
}
[dir="ltr"] .nik-compare-drawer { transform: translateX(-100%); }
.nik-compare-drawer.is-open { transform: translateX(0); visibility: visible; }

.nik-compare-drawer__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 18px; border-bottom: 1px solid var(--nik-border); flex-shrink: 0;
}
.nik-compare-drawer__title {
	margin: 0; display: inline-flex; align-items: center; gap: 8px;
	font-size: 16px; font-weight: 800; color: var(--nik-primary);
}
.nik-compare-drawer__count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 22px; height: 22px; padding: 0 6px;
	font-size: 12px; font-weight: 800; line-height: 1;
	color: #1a1a1a; background: var(--nik-accent); border-radius: 999px;
}
.nik-compare-drawer__close {
	display: inline-flex; padding: 4px; background: none; border: 0; cursor: pointer;
	color: var(--nik-text-soft); transition: color .15s ease;
}
.nik-compare-drawer__close:hover { color: var(--nik-accent-600); }

/* "Added" confirmation toast inside the drawer. */
.nik-compare-drawer__toast {
	display: flex; align-items: center; gap: 8px;
	margin: 0; padding: 11px 18px;
	font-size: 13px; font-weight: 700;
	color: var(--nik-success); background: var(--nik-success-bg);
}
.nik-compare-drawer__toast svg { flex-shrink: 0; }

/* The list of compared products. */
.nik-compare-drawer__list {
	flex: 1 1 auto; min-height: 0;
	overflow-y: auto; overscroll-behavior: contain;
	padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.nik-compare-drawer__empty {
	margin: 0; padding: 28px 18px; text-align: center;
	font-size: 13.5px; font-weight: 600; color: var(--nik-text-faint);
}

.nik-compare-item {
	display: flex; align-items: center; gap: 11px;
	padding: 9px; border: 1px solid var(--nik-border); border-radius: var(--nik-radius);
	background: #fff;
}
.nik-compare-item__thumb {
	flex-shrink: 0; width: 52px; height: 52px;
	display: flex; align-items: center; justify-content: center;
	background: var(--nik-bg-soft); border-radius: var(--nik-radius-sm); overflow: hidden;
}
.nik-compare-item__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nik-compare-item__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nik-compare-item__name {
	font-size: 12.5px; font-weight: 700; line-height: 1.6; color: var(--nik-text);
	text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nik-compare-item__name:hover { color: var(--nik-accent-600); }
.nik-compare-item__price { font-size: 12px; font-weight: 700; color: var(--nik-primary); }
.nik-compare-item__price del { color: var(--nik-text-faint); font-weight: 500; margin-inline-start: 4px; }
.nik-compare-item__remove {
	flex-shrink: 0; display: inline-flex; padding: 5px;
	background: none; border: 0; cursor: pointer;
	color: var(--nik-text-faint); transition: color .15s ease;
}
.nik-compare-item__remove:hover { color: #c0392b; }

/* ---------- In-drawer search ---------- */
.nik-compare-search { flex-shrink: 0; padding: 12px 14px; border-top: 1px solid var(--nik-border); }
.nik-compare-search__box { position: relative; display: flex; align-items: center; }
.nik-compare-search__icon {
	position: absolute; inset-inline-start: 11px; color: var(--nik-text-faint); pointer-events: none;
}
.nik-compare-search__input {
	width: 100%; padding: 10px 12px; padding-inline-start: 36px;
	font-family: var(--nik-font); font-size: 13.5px; color: var(--nik-text);
	background: var(--nik-bg-soft);
	border: 1px solid var(--nik-border); border-radius: var(--nik-radius-sm);
	transition: border-color .15s ease, background .15s ease;
}
.nik-compare-search__input:focus { outline: none; border-color: var(--nik-accent); background: #fff; }
.nik-compare-search__input::placeholder { color: var(--nik-text-faint); }

.nik-compare-search__results {
	margin-top: 8px; max-height: 230px; overflow-y: auto; overscroll-behavior: contain;
	display: flex; flex-direction: column; gap: 6px;
}
.nik-compare-search__msg {
	margin: 0; padding: 10px 4px; text-align: center;
	font-size: 12.5px; font-weight: 600; color: var(--nik-text-faint);
}
.nik-compare-result {
	display: flex; align-items: center; gap: 9px;
	padding: 7px; border: 1px solid var(--nik-border); border-radius: var(--nik-radius-sm);
}
.nik-compare-result__thumb {
	flex-shrink: 0; width: 38px; height: 38px;
	display: flex; align-items: center; justify-content: center;
	background: var(--nik-bg-soft); border-radius: 5px; overflow: hidden;
}
.nik-compare-result__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nik-compare-result__name {
	flex: 1 1 auto; min-width: 0;
	font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--nik-text);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nik-compare-result__add {
	flex-shrink: 0; padding: 6px 12px; cursor: pointer;
	font-family: var(--nik-font); font-size: 12px; font-weight: 800;
	color: var(--nik-accent-600); background: rgba(255,153,0,.1);
	border: 1px solid var(--nik-accent); border-radius: 999px;
	transition: background .15s ease, color .15s ease;
}
.nik-compare-result__add:hover { background: var(--nik-accent); color: #1a1a1a; }
.nik-compare-result__add:disabled {
	color: var(--nik-text-faint); background: var(--nik-bg-soft);
	border-color: var(--nik-border); cursor: default;
}

/* ---------- «مقایسه کن» CTA ---------- */
.nik-compare-drawer__go {
	flex-shrink: 0; margin: 0 14px 14px; padding: 13px 16px; cursor: pointer;
	font-family: var(--nik-font); font-size: 15px; font-weight: 800;
	color: #1a1a1a; background: var(--nik-accent);
	border: 0; border-radius: var(--nik-radius-sm);
	transition: background .15s ease, opacity .15s ease;
}
.nik-compare-drawer__go:hover:not(:disabled) { background: var(--nik-accent-600); }
.nik-compare-drawer__go:disabled { opacity: .45; cursor: default; }

/* =============================================================
   Comparison modal (full-screen)
   ============================================================= */
.nik-compare-modal {
	position: fixed; inset: 0; z-index: 160;
	display: flex; align-items: center; justify-content: center;
	padding: 24px;
	background: rgba(11,28,69,.55);
	opacity: 0; visibility: hidden;
	transition: opacity .25s ease, visibility .25s;
}
.nik-compare-modal.is-open { opacity: 1; visibility: visible; }

.nik-compare-modal__panel {
	width: min(96vw, 1100px); max-height: 92vh;
	display: flex; flex-direction: column;
	background: #fff; color: var(--nik-text);
	border-radius: var(--nik-radius);
	box-shadow: 0 24px 70px -16px rgba(11,28,69,.55);
	transform: translateY(14px) scale(.97);
	transition: transform .25s cubic-bezier(.22,1,.36,1);
}
.nik-compare-modal.is-open .nik-compare-modal__panel { transform: translateY(0) scale(1); }

.nik-compare-modal__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 20px; border-bottom: 1px solid var(--nik-border); flex-shrink: 0;
}
.nik-compare-modal__title { margin: 0; font-size: 17px; font-weight: 800; color: var(--nik-primary); }
.nik-compare-modal__close {
	display: inline-flex; padding: 4px; background: none; border: 0; cursor: pointer;
	color: var(--nik-text-soft); transition: color .15s ease;
}
.nik-compare-modal__close:hover { color: var(--nik-accent-600); }

.nik-compare-modal__body {
	flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
	padding: 4px;
}

/* ---------- The table itself ---------- */
.nik-compare-table__scroll { overflow-x: auto; }
.nik-compare-table {
	width: 100%; border-collapse: collapse;
	font-size: 13px;
}
.nik-compare-table th,
.nik-compare-table td {
	padding: 12px 14px; text-align: center; vertical-align: middle;
	border-bottom: 1px solid var(--nik-border);
}
/* Sticky attribute-label column (inline-start), so it stays put while the
   product columns scroll horizontally on small screens. */
.nik-compare-table__corner,
.nik-compare-table__label {
	position: sticky; inset-inline-start: 0; z-index: 2;
	background: var(--nik-bg-soft);
	text-align: start; font-weight: 700; color: var(--nik-text-soft);
	min-width: 110px;
}
.nik-compare-table__corner { background: #fff; }

.nik-compare-table__product {
	position: relative; min-width: 170px; vertical-align: top;
	background: #fff;
}
.nik-compare-table__remove {
	position: absolute; inset-block-start: 4px; inset-inline-end: 4px;
	display: inline-flex; padding: 4px; background: none; border: 0; cursor: pointer;
	color: var(--nik-text-faint); transition: color .15s ease;
}
.nik-compare-table__remove:hover { color: #c0392b; }
.nik-compare-table__thumb {
	display: flex; align-items: center; justify-content: center;
	height: 110px; margin-bottom: 8px;
}
.nik-compare-table__thumb img { max-width: 100%; max-height: 110px; object-fit: contain; }
.nik-compare-table__name {
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--nik-text); text-decoration: none;
}
.nik-compare-table__name:hover { color: var(--nik-accent-600); }

.nik-compare-table__cell--price { font-weight: 800; color: var(--nik-primary); }
.nik-compare-table__cell--price del { display: block; font-weight: 500; color: var(--nik-text-faint); font-size: 12px; }
.nik-compare-table__empty { color: var(--nik-text-faint); }
.nik-compare__price-out { color: #c0392b; font-weight: 700; }
.nik-compare__price-call { color: var(--nik-accent-600); font-weight: 700; }

.nik-compare-table__view {
	display: inline-block; padding: 9px 16px;
	font-size: 12.5px; font-weight: 800; text-decoration: none;
	color: var(--nik-accent-600); background: rgba(255,153,0,.1);
	border: 1px solid var(--nik-accent); border-radius: var(--nik-radius-sm);
	transition: background .15s ease, color .15s ease;
}
.nik-compare-table__view:hover { background: var(--nik-accent); color: #1a1a1a; }

/* Star rating (percentage-width overlay, mirrors the PDP stars). */
.nik-compare-stars { position: relative; display: inline-block; line-height: 1; font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.nik-compare-stars__off { color: var(--nik-border); }
.nik-compare-stars__on {
	position: absolute; inset-block-start: 0; inset-inline-start: 0;
	overflow: hidden; color: var(--nik-accent); white-space: nowrap;
}

/* =============================================================
   Product-card compare control
   Quiet by default; lit up only when the product is in the cart.
   ============================================================= */
.nik-product { position: relative; }
.nik-product__compare {
	position: absolute; inset-block-start: 50px; inset-inline-start: 10px; z-index: 3;
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; cursor: pointer;
	color: var(--nik-text-soft); background: rgba(255,255,255,.92);
	border: 1px solid var(--nik-border); border-radius: 50%;
	box-shadow: 0 2px 8px -2px rgba(11,28,69,.18);
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.nik-product__compare:hover { color: var(--nik-accent-600); border-color: var(--nik-accent); }
.nik-product__compare.is-active {
	color: #1a1a1a; background: var(--nik-accent); border-color: var(--nik-accent);
}

/* PDP «مقایسه» button active state (compare.js drives it now). */
.nik-pdp-tool.is-active {
	color: var(--nik-accent-600); border-color: var(--nik-accent); background: rgba(255,153,0,.06);
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 600px) {
	.nik-compare-drawer { width: 100vw; }
	.nik-compare-modal { padding: 0; }
	.nik-compare-modal__panel { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
	.nik-compare-table__label, .nik-compare-table__corner { min-width: 92px; }
	.nik-compare-table__product { min-width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
	.nik-compare-drawer,
	.nik-compare-overlay,
	.nik-compare-modal,
	.nik-compare-modal__panel { transition: opacity .2s ease, visibility .2s; }
	.nik-compare-drawer { transform: none; }
	.nik-compare-modal__panel { transform: none; }
}

/* =============================================================
   Nikmehr — Wishlist / Favorites
   A slim side drawer (the "favorites view") with a checkbox per
   row and an «add selected to cart» button. Mirrors the compare
   drawer (compare.css); reuses the .nik-cart-locked scroll-lock
   class and the design tokens from main.css. RTL via logical props.
   ============================================================= */

/* ---------- Overlay ---------- */
.nik-fav-overlay {
	position: fixed; inset: 0; z-index: 140;
	background: rgba(11,28,69,.5);
	opacity: 0; transition: opacity .3s ease;
}
.nik-fav-overlay.is-open { opacity: 1; }

/* =============================================================
   Drawer ("علاقه‌مندی‌ها")
   ============================================================= */
.nik-fav-drawer {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 150;
	width: min(92vw, 380px);
	display: flex; flex-direction: column;
	background: #fff; color: var(--nik-text);
	box-shadow: 0 0 60px -10px rgba(11,28,69,.4);
	/* Parked off-screen toward the inline-start edge until opened (see compare.css
	   for the translateX rationale). Default is the RTL value; LTR overrides. */
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .32s cubic-bezier(.22,1,.36,1), visibility .32s;
}
[dir="ltr"] .nik-fav-drawer { transform: translateX(-100%); }
.nik-fav-drawer.is-open { transform: translateX(0); visibility: visible; }

.nik-fav-drawer__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 18px; border-bottom: 1px solid var(--nik-border); flex-shrink: 0;
}
.nik-fav-drawer__title {
	margin: 0; display: inline-flex; align-items: center; gap: 8px;
	font-size: 16px; font-weight: 800; color: var(--nik-primary);
}
.nik-fav-drawer__count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 22px; height: 22px; padding: 0 6px;
	font-size: 12px; font-weight: 800; line-height: 1;
	color: #1a1a1a; background: var(--nik-accent); border-radius: 999px;
}
.nik-fav-drawer__close {
	display: inline-flex; padding: 4px; background: none; border: 0; cursor: pointer;
	color: var(--nik-text-soft); transition: color .15s ease;
}
.nik-fav-drawer__close:hover { color: var(--nik-accent-600); }

/* "Added" confirmation toast inside the drawer. */
.nik-fav-drawer__toast {
	display: flex; align-items: center; gap: 8px;
	margin: 0; padding: 11px 18px;
	font-size: 13px; font-weight: 700;
	color: var(--nik-success); background: var(--nik-success-bg);
}
.nik-fav-drawer__toast svg { flex-shrink: 0; }

/* "Select all" row. */
.nik-fav-drawer__selectall {
	display: flex; align-items: center; gap: 8px; flex-shrink: 0;
	padding: 11px 16px; border-bottom: 1px solid var(--nik-border);
	font-size: 12.5px; font-weight: 700; color: var(--nik-text-soft); cursor: pointer;
}
.nik-fav-drawer__selectall input { width: 16px; height: 16px; accent-color: var(--nik-accent); cursor: pointer; }

/* The list of favorite products. */
.nik-fav-drawer__list {
	flex: 1 1 auto; min-height: 0;
	overflow-y: auto; overscroll-behavior: contain;
	padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.nik-fav-drawer__empty {
	margin: 0; padding: 28px 18px; text-align: center;
	font-size: 13.5px; font-weight: 600; color: var(--nik-text-faint);
}

.nik-fav-item {
	display: flex; align-items: center; gap: 10px;
	padding: 9px; border: 1px solid var(--nik-border); border-radius: var(--nik-radius);
	background: #fff;
}
.nik-fav-item__pick { flex-shrink: 0; display: inline-flex; align-items: center; min-width: 16px; }
.nik-fav-item__check { width: 17px; height: 17px; accent-color: var(--nik-accent); cursor: pointer; }
.nik-fav-item__thumb {
	flex-shrink: 0; width: 52px; height: 52px;
	display: flex; align-items: center; justify-content: center;
	background: var(--nik-bg-soft); border-radius: var(--nik-radius-sm); overflow: hidden;
}
.nik-fav-item__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nik-fav-item__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nik-fav-item__name {
	font-size: 12.5px; font-weight: 700; line-height: 1.6; color: var(--nik-text);
	text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nik-fav-item__name:hover { color: var(--nik-accent-600); }
.nik-fav-item__price { font-size: 12px; font-weight: 700; color: var(--nik-primary); }
.nik-fav-item__price del { color: var(--nik-text-faint); font-weight: 500; margin-inline-start: 4px; }
.nik-fav-item__view {
	align-self: flex-start; margin-top: 2px;
	font-size: 11.5px; font-weight: 800; text-decoration: none;
	color: var(--nik-accent-600);
}
.nik-fav-item__view:hover { text-decoration: underline; }
.nik-fav-item__remove {
	flex-shrink: 0; display: inline-flex; padding: 5px;
	background: none; border: 0; cursor: pointer;
	color: var(--nik-text-faint); transition: color .15s ease;
}
.nik-fav-item__remove:hover { color: #c0392b; }

/* ---------- «افزودن انتخاب‌شده‌ها به سبد» CTA ---------- */
.nik-fav-drawer__go {
	flex-shrink: 0; margin: 14px; padding: 13px 16px; cursor: pointer;
	font-family: var(--nik-font); font-size: 15px; font-weight: 800;
	color: #1a1a1a; background: var(--nik-accent);
	border: 0; border-radius: var(--nik-radius-sm);
	transition: background .15s ease, opacity .15s ease;
}
.nik-fav-drawer__go:hover:not(:disabled) { background: var(--nik-accent-600); }
.nik-fav-drawer__go:disabled { opacity: .45; cursor: default; }

/* =============================================================
   Heart controls (PDP tool + product card)
   ============================================================= */

/* PDP «علاقه‌مندی» tool active state — filled heart in accent. */
.nik-pdp-tool[data-wishlist].is-active {
	color: #e0245e; border-color: #e0245e; background: rgba(224,36,94,.06);
}
.nik-pdp-tool[data-wishlist].is-active svg { fill: currentColor; }

/* Product-card heart. Top of a vertical stack in the inline-start corner
   (heart above, compare below at top:50px) so both stay clear of the sale-%
   badge, which sits inline-end. Quiet until favorited. */
.nik-product { position: relative; }
.nik-product__fav {
	position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 3;
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; cursor: pointer;
	color: var(--nik-text-soft); background: rgba(255,255,255,.92);
	border: 1px solid var(--nik-border); border-radius: 50%;
	box-shadow: 0 2px 8px -2px rgba(11,28,69,.18);
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.nik-product__fav:hover { color: #e0245e; border-color: #e0245e; }
.nik-product__fav.is-active {
	color: #fff; background: #e0245e; border-color: #e0245e;
}
.nik-product__fav.is-active svg { fill: currentColor; }

/* =============================================================
   Header heart badge
   ============================================================= */
.nik-header__fav-count {
	position: absolute; top: -7px; inset-inline-start: -9px;
	background: #e0245e; color: #fff;
	font-size: 10px; font-weight: 800; min-width: 18px; height: 18px;
	border-radius: 9px; display: grid; place-items: center; padding-inline: 4px;
	border: 2px solid #fff;
	box-shadow: 0 2px 6px rgba(224,36,94,.5);
}
.nik-header__fav-count[hidden] { display: none; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 600px) {
	.nik-fav-drawer { width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
	.nik-fav-drawer,
	.nik-fav-overlay { transition: opacity .2s ease, visibility .2s; }
	.nik-fav-drawer { transform: none; }
}

