/* ==========================================================================
   Targol Header UI — نوار بالای شیشه‌ای و مدرن + سبد خرید
   محدوده: #masthead (قالب هدر المنتور 1315) — در همه‌ی صفحات
   ========================================================================== */

/* ---------- فونت Peyda (میزبانی محلی، همان فونت دوری/فروشگاه) ---------- */
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-Bold.woff2') format('woff2');
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- پاک‌سازی نوار قدیمی ---------- */
#masthead .elementor-1315 .elementor-element-e8ac18c,
#masthead .elementor-1315 .elementor-element-bdf605f {
  display: none !important;
}
#masthead .elementor-1315 .elementor-element-22a263d {
  position: relative;
  margin: 14px 0 !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 100%) !important;
  box-shadow:
    0 14px 34px -16px rgba(54, 24, 66, 0.42),
    0 3px 10px -5px rgba(54, 24, 66, 0.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.55);
  backdrop-filter: blur(18px) saturate(1.55);
}
#masthead .elementor-1315 .elementor-element-22a263d::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(360px 80px at 82% -30%, rgba(184, 55, 180, 0.12), transparent 70%),
    radial-gradient(280px 70px at 6% 130%, rgba(124, 58, 237, 0.09), transparent 70%);
}
#masthead .elementor-1315 .elementor-element-22a263d::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(184, 55, 180, 0.35), transparent);
  opacity: 0.75;
}

/* ---------- ستون‌بندی تازه (برند حذف شده) ---------- */
@media (min-width: 768px) {
  #masthead .elementor-1315 .elementor-element-c9ef3f5 {
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0;
  }
  #masthead .elementor-1315 .elementor-element-2f3b857 {
    width: auto !important;
    flex: 0 0 auto !important;
  }
  #masthead .elementor-1315 .tgl-cart-col {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto !important;
    flex: 0 0 auto !important;
  }
  #masthead .elementor-1315 .tgl-cart-col > .elementor-widget-wrap {
    width: 100%;
    padding: 4px 0;
  }
}

/* ---------- منو ---------- */
#masthead .elementor-1315 .elementor-element-675d2d6 a.hfe-menu-item,
#masthead .elementor-1315 .elementor-element-675d2d6 a.hfe-sub-menu-item {
  font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif !important;
}
#masthead .elementor-1315 .elementor-element-675d2d6 .hfe-nav-menu > nav > ul.hfe-nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto !important;
}
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item > a.hfe-menu-item {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px !important;
  border-radius: 999px;
  color: #3a2e44 !important;
  font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.1px;
  transition: background-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item > a.hfe-menu-item:hover,
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item > a.hfe-menu-item:focus-visible {
  background-color: rgba(184, 55, 180, 0.09) !important;
  color: #9e016f !important;
  transform: translateY(-1px);
}
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item.current-menu-item > a.hfe-menu-item,
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item.current-menu-ancestor > a.hfe-menu-item {
  background: linear-gradient(135deg, #c13bbe 0%, #8b2fd6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px -8px rgba(158, 1, 111, 0.75);
}
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item.current-menu-item > a.hfe-menu-item:hover,
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item.current-menu-ancestor > a.hfe-menu-item:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #b02fae 0%, #7c27c2 100%) !important;
}
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item > a.hfe-menu-item:focus-visible,
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item > a.hfe-menu-item:active {
  outline: none;
}
#masthead .elementor-1315 .elementor-element-675d2d6 .menu-item > a.hfe-menu-item:focus-visible,
#masthead .elementor-1315 .elementor-element-7f2c3cb a:focus-visible {
  outline: 2px solid #9e016f;
  outline-offset: 2px;
}
#masthead .elementor-1315 .elementor-element-675d2d6 .sub-menu {
  padding: 6px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(184, 55, 180, 0.1);
  box-shadow: 0 16px 36px -16px rgba(54, 24, 66, 0.4) !important;
}
#masthead .elementor-1315 .elementor-element-675d2d6 .sub-menu a.hfe-sub-menu-item {
  border-radius: 9px;
  color: #3a2e44 !important;
  font-size: 13.5px;
  font-weight: 500;
}
#masthead .elementor-1315 .elementor-element-675d2d6 .sub-menu a.hfe-sub-menu-item:hover {
  background: rgba(184, 55, 180, 0.08) !important;
  color: #9e016f !important;
}

/* ---------- اکشن‌های سمت چپ: شبکه‌های اجتماعی + جستجو ---------- */
#masthead .elementor-1315 .elementor-element-7f2c3cb .elementor-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}
#masthead .elementor-1315 .elementor-element-7f2c3cb .elementor-column {
  width: auto !important;
  flex: 0 0 auto !important;
  min-width: 0;
}
#masthead .elementor-1315 .elementor-element-7f2c3cb .elementor-widget-wrap {
  padding: 0 !important;
}
#masthead .elementor-1315 .elementor-element-9a8f9df .elementor-widget-image a,
#masthead .elementor-1315 .elementor-element-011783c .elementor-widget-image a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: rgba(184, 55, 180, 0.07);
  color: #9e016f;
  font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
#masthead .elementor-1315 .elementor-element-9a8f9df .elementor-widget-image a::after {
  content: "بله";
}
#masthead .elementor-1315 .elementor-element-011783c .elementor-widget-image a::after {
  content: "ایتا";
}
#masthead .elementor-1315 .elementor-element-9a8f9df .elementor-widget-image img,
#masthead .elementor-1315 .elementor-element-011783c .elementor-widget-image img {
  display: none !important;
}
#masthead .elementor-1315 .elementor-element-9a8f9df .elementor-widget-image a:hover,
#masthead .elementor-1315 .elementor-element-011783c .elementor-widget-image a:hover {
  background: linear-gradient(135deg, #c13bbe 0%, #8b2fd6 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(158, 1, 111, 0.65);
}

/* ---------- جستجوی آیکنی ---------- */
#masthead .elementor-1315 .elementor-element-81aa1a9 .hfe-search-button-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
#masthead .elementor-1315 .elementor-element-81aa1a9 .hfe-search-icon-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px;
  border-radius: 11px;
  background: rgba(184, 55, 180, 0.07);
  transition: background 0.22s ease, box-shadow 0.22s ease;
}
#masthead .elementor-1315 .elementor-element-81aa1a9 .hfe-search-icon-toggle i {
  position: relative;
  z-index: 2;
  width: auto !important;
  height: auto;
  padding: 0 !important;
  color: #9e016f !important;
  font-size: 14px !important;
  transition: color 0.22s ease;
}
#masthead .elementor-1315 .elementor-element-81aa1a9 .hfe-search-icon-toggle:hover {
  background: linear-gradient(135deg, #c13bbe 0%, #8b2fd6 100%);
  box-shadow: 0 8px 18px -8px rgba(158, 1, 111, 0.65);
}
#masthead .elementor-1315 .elementor-element-81aa1a9 .hfe-search-icon-toggle:hover i {
  color: #ffffff !important;
}
#masthead .elementor-1315 .elementor-element-81aa1a9 input[type="search"].hfe-search-form__input {
  height: 36px;
  padding: 0 12px !important;
  border: 0;
  border-radius: 11px;
  background: transparent;
  box-shadow: none;
  color: #2b2333;
  font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif !important;
  font-size: 13px;
}
#masthead .elementor-1315 .elementor-element-81aa1a9 .hfe-input-focus .hfe-search-form__input,
#masthead .elementor-1315 .elementor-element-81aa1a9 .hfe-input-focus .hfe-search-form__input:focus {
  background: #ffffff;
  box-shadow: 0 8px 22px -10px rgba(54, 24, 66, 0.35);
}
/* باز شدن جستجو به سمت راست (داخل نوار) تا زیر سبد خرید نرود */
#masthead .elementor-1315 .elementor-element-81aa1a9 .hfe-search-button-wrapper.hfe-input-focus .hfe-search-icon-toggle .hfe-search-form__input {
  left: 0 !important;
  right: auto !important;
  width: 260px !important;
  max-width: 260px !important;
  box-sizing: border-box !important;
  padding: 0 12px 0 34px !important;
  z-index: 60;
}

/* ---------- دکمه‌ی سبد خرید ---------- */
#masthead .tgl-cart {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  height: 48px;
  padding: 5px 14px 5px 5px;
  border: 1px solid rgba(184, 55, 180, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, #fdf2fb 0%, #f3effe 100%);
  color: #2b2333;
  font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
#masthead .tgl-cart:hover,
#masthead .tgl-cart:focus-visible {
  border-color: rgba(184, 55, 180, 0.38);
  box-shadow: 0 12px 26px -12px rgba(158, 1, 111, 0.5);
  transform: translateY(-2px);
}
#masthead .tgl-cart:focus-visible {
  outline: 2px solid #9e016f;
  outline-offset: 3px;
}
#masthead .tgl-cart-inner {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
#masthead .tgl-cart-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #c13bbe 0%, #8b2fd6 100%);
  box-shadow: 0 7px 16px -7px rgba(158, 1, 111, 0.8);
  color: #ffffff;
}
#masthead .tgl-cart-icon svg {
  width: 20px;
  height: 20px;
}
#masthead .tgl-cart-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid rgba(184, 55, 180, 0.22);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(54, 24, 66, 0.18);
  color: #9e016f;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}
#masthead .tgl-cart-badge--empty {
  opacity: 0;
  transform: scale(0.6);
}
#masthead .tgl-cart-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.1;
}
#masthead .tgl-cart-label {
  color: #8a8093;
  font-size: 10.5px;
  font-weight: 500;
}
#masthead .tgl-cart-total {
  max-width: 96px;
  overflow: hidden;
  color: #2b2333;
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
}
#masthead .tgl-cart-total .woocommerce-Price-amount {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}
#masthead .tgl-cart-total .woocommerce-Price-currencySymbol {
  color: #8a8093;
  font-size: 9.5px;
  font-weight: 500;
}
#masthead .tgl-cart.has-items .tgl-cart-icon::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(184, 55, 180, 0.35);
  border-radius: 14px;
  animation: tgl-cart-pulse 2.8s ease-out infinite;
}
#masthead .tgl-cart.is-bump .tgl-cart-icon {
  animation: tgl-cart-bump 0.5s ease;
}
@keyframes tgl-cart-pulse {
  0%   { opacity: 0.7; transform: scale(0.96); }
  70%  { opacity: 0;   transform: scale(1.16); }
  100% { opacity: 0;   transform: scale(1.16); }
}
@keyframes tgl-cart-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ---------- حالت چسبیده (Sticky Header Effects) ---------- */
#masthead .elementor-1315 .elementor-element-1e952e9.she-header .elementor-element-22a263d {
  margin: 8px 0 !important;
  box-shadow:
    0 18px 40px -20px rgba(54, 24, 66, 0.55),
    0 4px 12px -6px rgba(54, 24, 66, 0.18) !important;
}

/* ---------- تبلت ---------- */
@media (min-width: 768px) and (max-width: 1100px) {
  #masthead .elementor-1315 .elementor-element-675d2d6 .menu-item > a.hfe-menu-item {
    padding: 0 8px !important;
    font-size: 12.5px;
  }
  #masthead .elementor-1315 .elementor-element-9a8f9df,
  #masthead .elementor-1315 .elementor-element-011783c {
    display: none !important;
  }
  #masthead .tgl-cart-text {
    display: none;
  }
  #masthead .tgl-cart {
    width: 46px;
    padding: 4px 5px;
    justify-content: center;
  }
}

/* ---------- موبایل ---------- */
@media (max-width: 767px) {
  #masthead {
    position: sticky;
    top: 0;
    z-index: 999;
  }
  #masthead .elementor-1315 .elementor-element-39291a6 {
    margin: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 12px 30px -16px rgba(54, 24, 66, 0.5) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
  }
  #masthead .elementor-1315 .elementor-element-39291a6 .elementor-container {
    padding: 0 8px;
  }
  #masthead .elementor-1315 .elementor-element-39291a6 .elementor-widget-wrap {
    padding: 0 !important;
  }
  #masthead .elementor-1315 .elementor-element-79f8723 .hfe-nav-menu {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    min-height: 52px;
  }
  #masthead .elementor-1315 .elementor-element-79f8723 .hfe-nav-menu__toggle {
    position: absolute;
    top: 50%;
    right: 2px;
    left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0 !important;
    border-radius: 12px;
    background: rgba(184, 55, 180, 0.08);
    color: #9e016f;
    transform: translateY(-50%);
  }
  #masthead .elementor-1315 .elementor-element-79f8723 .hfe-nav-menu__toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }
  #masthead .elementor-1315 .elementor-element-79f8723 a.hfe-menu-item,
  #masthead .elementor-1315 .elementor-element-79f8723 a.hfe-sub-menu-item {
    font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    color: #3a2e44 !important;
  }
  #masthead .elementor-1315 .elementor-element-79f8723 .menu-item.current-menu-item > a.hfe-menu-item,
  #masthead .elementor-1315 .elementor-element-79f8723 .menu-item.current-menu-ancestor > a.hfe-menu-item {
    color: #9e016f !important;
  }

  /* پنل منوی بازشوی موبایل */
  #masthead .elementor-1315 .elementor-element-79f8723 nav.hfe-dropdown,
  #masthead .elementor-1315 .elementor-element-79f8723 nav.hfe-nav-menu__layout-horizontal.hfe-dropdown {
    margin-top: 8px !important;
    padding: 8px !important;
    border: 1px solid rgba(184, 55, 180, 0.12) !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 18px 36px -18px rgba(54, 24, 66, 0.45) !important;
  }
  #masthead .elementor-1315 .elementor-element-79f8723 nav.hfe-dropdown .menu-item > a.hfe-menu-item {
    padding: 11px 12px !important;
    border-radius: 10px;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
  }
  #masthead .elementor-1315 .elementor-element-79f8723 nav.hfe-dropdown .menu-item > a.hfe-menu-item:hover {
    background: rgba(184, 55, 180, 0.08) !important;
    color: #9e016f !important;
  }
  #masthead .elementor-1315 .elementor-element-79f8723 nav.hfe-dropdown .menu-item.current-menu-item > a.hfe-menu-item {
    background: linear-gradient(135deg, #c13bbe 0%, #8b2fd6 100%) !important;
    color: #ffffff !important;
  }

  /* سبد خرید فشرده در موبایل */
  #masthead .tgl-cart--mobile {
    position: absolute;
    top: 50%;
    right: auto;
    left: 2px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    justify-content: center;
    transform: translateY(-50%);
  }
  #masthead .tgl-cart--mobile:hover,
  #masthead .tgl-cart--mobile:focus-visible {
    background: transparent;
    box-shadow: none;
    transform: translateY(-50%);
  }
  #masthead .tgl-cart--mobile .tgl-cart-text {
    display: none;
  }
  #masthead .tgl-cart--mobile .tgl-cart-inner {
    gap: 0;
  }
  #masthead .tgl-cart--mobile .tgl-cart-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  #masthead .tgl-cart--mobile .tgl-cart-badge {
    top: -3px;
    left: -3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #masthead .tgl-cart,
  #masthead .tgl-cart-icon,
  #masthead .elementor-1315 .elementor-element-675d2d6 .menu-item > a.hfe-menu-item {
    transition: none !important;
  }
  #masthead .tgl-cart.has-items .tgl-cart-icon::after,
  #masthead .tgl-cart.is-bump .tgl-cart-icon {
    animation: none !important;
  }
}
