/* ============================================================
   ابر باران — استایل مشترک هدر و فوتر
   ============================================================ */

@keyframes abrBump { 50% { transform: scale(1.5); } }
@keyframes abrShine { to { background-position: -200% 0; } }
@keyframes abrFlow { to { background-position: 300% 0; } }
@keyframes abrSpin { to { transform: rotate(360deg); } }
@keyframes abrPing { to { transform: scale(1.7); opacity: 0; } }
@keyframes abrMarquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------
   متغیرهای پایه (هر طرح مقدار پیش‌فرض خودش را دارد)
   --------------------------------------------------------------- */
.abr-header {
	--abr-bg: #fff;
	--abr-root-bg: transparent;
	--abr-text: #1b2038;
	--abr-muted: #5b6179;
	--abr-accent: #6d5dfc;
	--abr-accent2: var(--abr-accent);
	--abr-accent3: var(--abr-accent2);
	--abr-on-accent: #fff;
	--abr-hover-bg: #f3f4f8;
	--abr-border: #e6e8f0;
	--abr-search-bg: #f4f5f9;
	--abr-search-text: var(--abr-text);
	--abr-search-border: var(--abr-accent);
	--abr-btn-bg: var(--abr-accent);
	--abr-btn-text: var(--abr-on-accent);
	--abr-btn-hover-bg: var(--abr-btn-bg);
	--abr-btn-hover-text: var(--abr-btn-text);
	--abr-badge-bg: var(--abr-accent);
	--abr-badge-text: var(--abr-on-accent);
	--abr-dd-bg: #fff;
	--abr-dd-text: var(--abr-text);
	--abr-dd-border: var(--abr-border);
	--abr-mobile-bg: var(--abr-dd-bg);
	--abr-mobile-text: var(--abr-dd-text);
	--abr-topbar-bg: var(--abr-accent);
	--abr-topbar-text: var(--abr-on-accent);
	--abr-radius: 12px;
	--abr-icon: 20px;
}

/* ---------------------------------------------------------------
   ریست امن (جلوگیری از تداخل با استایل قالب‌ها)
   --------------------------------------------------------------- */
.abr-hw { position: relative; z-index: 99; }
.abr-header,
.abr-header *,
.abr-header *::before,
.abr-header *::after,
.abr-footer,
.abr-footer *,
.abr-footer *::before,
.abr-footer *::after { box-sizing: border-box; }

.abr-header,
.abr-footer { position: relative; margin: 0; line-height: 1.6; text-align: start; font-family: inherit; }

.abr-header a,
.abr-footer a { text-decoration: none; background: none; box-shadow: none; border: 0; }
.abr-header a:hover,
.abr-header a:focus,
.abr-footer a:hover,
.abr-footer a:focus { text-decoration: none; }

.abr-header ul,
.abr-footer ul,
.abr-header li,
.abr-footer li { list-style: none; margin: 0; padding: 0; }
.abr-header p,
.abr-footer p { margin: 0; }
.abr-header h3,
.abr-header h4,
.abr-footer h3,
.abr-footer h4 { margin: 0; padding: 0; letter-spacing: normal; text-transform: none; }

.abr-header button,
.abr-header button:hover,
.abr-header button:focus,
.abr-header button:active,
.abr-footer button,
.abr-footer button:hover,
.abr-footer button:focus,
.abr-footer button:active {
	font: inherit; color: inherit; background: transparent; border: 0; border-radius: 0;
	box-shadow: none; padding: 0; margin: 0; text-transform: none; text-decoration: none;
	letter-spacing: inherit; line-height: inherit; cursor: pointer; min-height: 0; min-width: 0;
	-webkit-appearance: none; appearance: none;
}
.abr-header input,
.abr-header input:focus,
.abr-header input:hover,
.abr-footer input,
.abr-footer input:focus,
.abr-footer input:hover,
.abr-footer select,
.abr-footer select:focus {
	font: inherit; color: inherit; background: transparent; border: 0; box-shadow: none; outline: 0;
	padding: 0; margin: 0; height: auto; min-height: 0; border-radius: 0; width: auto; max-width: 100%;
	-webkit-appearance: none; appearance: none;
}
.abr-header input::-webkit-search-cancel-button,
.abr-header input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.abr-header :focus-visible,
.abr-footer :focus-visible { outline: 2px solid var(--abr-accent, #4f46e5); outline-offset: 3px; }
.abr-header input:focus-visible,
.abr-footer input:focus-visible { outline: 0; }

/* آیکون‌ها */
.abr-i {
	width: var(--abr-icon, 20px); height: var(--abr-icon, 20px); flex: none; fill: none;
	stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
	display: block; max-width: none;
}

/* تصویر لوگو */
.abr-logo-img { display: block; max-width: 100%; height: auto; }
.abr-logo--img .abr-logo-img { max-height: 56px; width: auto; }
.abr-logo--fa .abr-logo-text { letter-spacing: 0 !important; text-transform: none !important; }

/* ---------------------------------------------------------------
   شمارنده‌ها
   --------------------------------------------------------------- */
.abr-cnt {
	display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; font-size: 11px; font-weight: 600; font-style: normal; line-height: 1;
	background: var(--abr-badge-bg); color: var(--abr-badge-text);
}
.abr-cnt--zero { display: none !important; }
.abr-cnt.bump { animation: abrBump .4s; }
.abr-cart-data { display: none !important; }

/* ---------------------------------------------------------------
   همبرگر
   --------------------------------------------------------------- */
.abr-burger { display: none; width: 42px; height: 42px; place-items: center; flex: none; }
.abr-burger .abr-i-close { display: none; }
.abr-header.is-open .abr-burger .abr-i-open { display: none; }
.abr-header.is-open .abr-burger .abr-i-close { display: block; }

/* ---------------------------------------------------------------
   منو و زیرمنو
   --------------------------------------------------------------- */
.abr-nav { min-width: 0; }
.abr-menu { display: flex; align-items: center; gap: var(--abr-menu-gap, 0); }
.abr-mi { position: relative; display: flex; align-items: center; }
.abr-ml { display: flex; align-items: center; gap: 6px; }
.abr-ml span { display: inline-block; }

.abr-subbtn { display: grid; place-items: center; width: 22px; height: 22px; margin-inline-start: -6px; flex: none; opacity: .7; }
.abr-subbtn .abr-i { width: 14px; height: 14px; }

.abr-header .abr-sub {
	position: absolute; inset-inline-start: 0; top: 100%; min-width: 210px; z-index: 40;
	background: var(--abr-dd-bg); color: var(--abr-dd-text); border: 1px solid var(--abr-dd-border);
	border-radius: min(var(--abr-radius, 12px), 16px); padding: 8px; display: block;
	box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .28);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s;
}
.abr-header .abr-mi:hover > .abr-sub,
.abr-header .abr-mi:focus-within > .abr-sub,
.abr-header .abr-mi.is-open > .abr-sub { opacity: 1; visibility: visible; transform: none; }
.abr-header .abr-sub .abr-mi { display: block; width: 100%; }
.abr-header .abr-sub .abr-ml { padding: 9px 12px; border-radius: 9px; white-space: nowrap; color: var(--abr-dd-text); font-size: 14px; flex-direction: row; background: none; height: auto; }
.abr-header .abr-sub .abr-ml:hover,
.abr-header .abr-sub .current-menu-item > .abr-ml { background: var(--abr-hover-bg); color: var(--abr-accent); }
.abr-header .abr-sub .abr-sub { inset-inline-start: 100%; top: -8px; }
.abr-header .abr-sub .abr-subbtn { position: absolute; inset-inline-end: 6px; top: 8px; }
.abr-header .abr-sub .abr-subbtn .abr-i { transform: rotate(90deg); }

/* ---------------------------------------------------------------
   جستجو (اجزای مشترک)
   --------------------------------------------------------------- */
.abr-search { position: relative; display: flex; align-items: center; min-width: 0; }
.abr-sform { display: flex; align-items: center; gap: 8px; min-width: 0; width: 100%; margin: 0; }
.abr-sin { min-width: 0; flex: 1; font-size: 14px; color: var(--abr-search-text); }
.abr-sin::placeholder { color: inherit; opacity: .55; }
.abr-sbtn, .abr-act, .abr-search-toggle { display: grid; place-items: center; flex: none; }
.abr-search-toggle { display: none; }

.abr-header .abr-sug {
	display: none; position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60;
	width: min(var(--abr-sug-w, 380px), calc(100vw - 24px)); background: var(--abr-dd-bg); color: var(--abr-dd-text);
	border: 1px solid var(--abr-dd-border); border-radius: 18px; padding: 14px;
	box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .35);
}
.abr-header .abr-search.is-open .abr-sug { display: block; }
.abr-chips-wrap p { font-size: 12px; opacity: .65; margin-bottom: 10px; }
.abr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.abr-header .abr-chips a { padding: 6px 14px; border-radius: 20px; background: var(--abr-hover-bg); color: var(--abr-accent); font-size: 13px; transition: .2s; }
.abr-header .abr-chips a:hover { background: var(--abr-accent); color: var(--abr-on-accent); }
.abr-live { display: none; }
.abr-search.has-live .abr-chips-wrap { display: none; }
.abr-search.has-live .abr-live { display: block; }

.abr-header a.abr-lv { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; color: var(--abr-dd-text); transition: background .2s; }
.abr-header a.abr-lv:hover,
.abr-header a.abr-lv:focus { background: var(--abr-hover-bg); }
.abr-lv img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--abr-hover-bg); }
.abr-lv-t { flex: 1; min-width: 0; font-size: 13px; line-height: 1.6; }
.abr-lv-p { font-size: 12px; opacity: .8; margin-top: 2px; display: block; }
.abr-lv-p del { opacity: .6; margin-inline-end: 6px; }
.abr-lv-p ins { text-decoration: none; }
.abr-header a.abr-lv-all { display: block; text-align: center; padding: 10px; font-weight: 600; font-size: 13px; color: var(--abr-accent); margin-top: 4px; border-top: 1px solid var(--abr-dd-border); }
.abr-lv-msg { padding: 10px; font-size: 13px; opacity: .75; text-align: center; }

/* جستجوی پنلی */
.abr-header .abr-search--panel {
	display: none; position: absolute; top: 100%; inset-inline: 0; z-index: 45; padding: 14px var(--abr-padx, 24px);
	background: var(--abr-dd-bg); color: var(--abr-dd-text); border-bottom: 1px solid var(--abr-dd-border);
	box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .3); justify-content: center;
}
.abr-header.is-search .abr-search--panel { display: flex; }
.abr-header .abr-search--panel .abr-sform {
	max-width: 680px; height: 48px; padding: 0 8px 0 18px; border-radius: 999px; background: var(--abr-search-bg);
	border: 1.5px solid transparent; color: var(--abr-search-text); transition: border-color .25s, box-shadow .25s;
}
.abr-header .abr-search--panel .abr-sform:focus-within { border-color: var(--abr-search-border); }
.abr-header .abr-search--panel .abr-sbtn { width: 36px; height: 36px; border-radius: 50%; background: var(--abr-accent); color: var(--abr-on-accent); }
.abr-header .abr-search--panel { --abr-sug-w: 680px; }
.abr-header .abr-search--panel .abr-sug { inset-inline: var(--abr-padx, 24px); width: auto; max-width: 680px; margin-inline: auto; top: calc(100% - 4px); }

/* ---------------------------------------------------------------
   مینی‌کارت ووکامرس
   --------------------------------------------------------------- */
.abr-cartwrap { position: relative; display: flex; align-items: center; }
.abr-header .abr-minicart {
	position: absolute; top: calc(100% + 12px); inset-inline-end: 0; width: 330px; max-width: calc(100vw - 24px); z-index: 70;
	background: var(--abr-dd-bg); color: var(--abr-dd-text); border: 1px solid var(--abr-dd-border); border-radius: 16px; padding: 16px;
	box-shadow: 0 24px 44px -18px rgba(0, 0, 0, .35);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .25s, visibility .25s;
	text-align: start; font-size: 13px; font-weight: 400;
}
.abr-cartwrap.has-mini::after { content: ""; position: absolute; top: 100%; inset-inline: 0; height: 14px; }
.abr-cartwrap.has-mini:hover .abr-minicart,
.abr-cartwrap.has-mini:focus-within .abr-minicart,
.abr-cartwrap.has-mini.is-open .abr-minicart { opacity: 1; visibility: visible; transform: none; }

.abr-minicart ul.woocommerce-mini-cart { max-height: 300px; overflow: auto; margin: 0 0 12px; padding: 0; }
.abr-minicart li.woocommerce-mini-cart-item { position: relative; display: block; min-height: 56px; padding: 0 0 12px; margin: 0 0 12px; padding-inline-start: 64px; border-bottom: 1px solid var(--abr-dd-border); overflow: hidden; }
.abr-minicart li.woocommerce-mini-cart-item img { position: absolute; inset-inline-start: 0; top: 0; width: 52px; height: 52px; object-fit: cover; border-radius: 8px; margin: 0; float: none; }
.abr-header .abr-minicart li.woocommerce-mini-cart-item a:not(.remove) { display: block; font-weight: 600; font-size: 13px; line-height: 1.6; color: var(--abr-dd-text); }
.abr-header .abr-minicart a.remove { position: absolute !important; inset-inline-end: 0; top: 0; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; font-size: 16px; color: var(--abr-dd-text) !important; background: var(--abr-hover-bg) !important; }
.abr-header .abr-minicart a.remove:hover { background: var(--abr-accent) !important; color: var(--abr-on-accent) !important; }
.abr-minicart .quantity { display: block; font-size: 12px; opacity: .8; }
.abr-minicart p.woocommerce-mini-cart__total { display: flex; justify-content: space-between; margin: 0 0 12px; font-weight: 600; }
.abr-minicart p.woocommerce-mini-cart__buttons { display: grid; gap: 8px; margin: 0; }
.abr-header .abr-minicart a.button { display: block; text-align: center; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; background: var(--abr-hover-bg); color: var(--abr-dd-text); border: 0; line-height: 1.5; margin: 0; }
.abr-header .abr-minicart a.button.checkout { background: var(--abr-accent); color: var(--abr-on-accent); }
.abr-header .abr-minicart a.button:hover { filter: brightness(.94); }
.abr-minicart .woocommerce-mini-cart__empty-message { margin: 0; text-align: center; opacity: .75; padding: 6px 0; }

/* ---------------------------------------------------------------
   هدر چسبان
   --------------------------------------------------------------- */
.abr-hw.is-sticky-on .abr-header { z-index: 99; }
.abr-header.is-fixed { position: fixed; top: var(--abr-top, 0); inset-inline: 0; width: 100%; }
.abr-header.is-fixed.is-hidden { transform: translateY(-120%); }
.abr-header.is-animated { transition: transform .35s ease, box-shadow .3s; }
.abr-header.is-fixed:not(.abr-hd--dark):not(.abr-hd--future):not(.abr-hd--capsule) { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35); }

/* ---------------------------------------------------------------
   شبکه‌های اجتماعی (مشترک هدر/فوتر)
   --------------------------------------------------------------- */
.abr-soc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.abr-soc a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; transition: .2s; }
.abr-soc .abr-i { width: 19px; height: 19px; }
.abr-soc-txt { font-size: 10.5px; font-weight: 700; line-height: 1; }

/* ---------------------------------------------------------------
   حرکت کمتر
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.abr-header *, .abr-header *::before, .abr-header *::after,
	.abr-footer *, .abr-footer *::before, .abr-footer *::after { animation: none !important; transition: none !important; }
}
