/* Dorna PC Header v3 — compact, search-first, resilient against global/Tailwind styles. */
:root {
  --dpcv3-purple: #4B12E9;
  --dpcv3-purple-dark: #28145F;
  --dpcv3-yellow: #FCBB13;
  --dpcv3-ink: #211D2E;
  --dpcv3-muted: #777184;
  --dpcv3-line: #EAE6F2;
  --dpcv3-soft: #F8F7FB;
  --dpcv3-shadow: 0 18px 48px rgba(32, 20, 72, .16);
}

#dpc-v3-benefits, #dpc-v3-benefits *, #dpc-header-v3, #dpc-header-v3 * { box-sizing: border-box; }
#dpc-v3-benefits {
  position: relative; z-index: 1001; width: 100%; margin: 0; padding: 0;
  background: #24134F; color: #F7F4FF; direction: rtl;
  font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 11px; line-height: 1.5;
}
#dpc-v3-benefits .dpcv3-benefits__inner {
  width: min(1320px, calc(100% - 40px)); min-height: 31px; margin: 0 auto; padding: 4px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 6px 24px;
}
#dpc-v3-benefits .dpcv3-benefit { display: inline-flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; color: #F7F4FF; font-weight: 550; }
#dpc-v3-benefits .dpcv3-benefit--consult { color: #FFE39A; }
#dpc-v3-benefits .dpcv3-benefit__mark { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: rgba(252,187,19,.16); color: #FCBB13; font-size: 10px; font-weight: 900; line-height: 1; }

#dpc-header-v3 {
  position: sticky; top: 0; z-index: 1000; width: 100%; margin: 0; padding: 0;
  background: #fff; color: var(--dpcv3-ink); direction: rtl; isolation: isolate;
  border-bottom: 1px solid #ECE8F4; box-shadow: 0 5px 20px rgba(35, 23, 71, .045);
  font-family: "Vazirmatn", Tahoma, sans-serif; transition: box-shadow .18s ease;
}
#dpc-header-v3 a { color: inherit; text-decoration: none !important; }
#dpc-header-v3 a:hover { color: var(--dpcv3-purple); }
#dpc-header-v3 button, #dpc-header-v3 input { margin: 0; font-family: inherit !important; letter-spacing: normal !important; text-transform: none !important; }
#dpc-header-v3 button { cursor: pointer; }
#dpc-header-v3 svg { display: block !important; width: 20px !important; height: 20px !important; min-width: 20px; max-width: 20px !important; min-height: 20px; max-height: 20px !important; overflow: visible; flex: 0 0 20px; }
#dpc-header-v3 svg, #dpc-header-v3 svg * { fill: none !important; stroke: currentColor !important; }
#dpc-header-v3 .dpcv3-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
#dpc-header-v3 :focus-visible { outline: 3px solid rgba(75,18,233,.35) !important; outline-offset: 3px !important; }

#dpc-header-v3 .dpcv3-main {
  width: min(1320px, calc(100% - 40px)); min-height: 79px; margin: 0 auto; padding: 10px 0;
  display: grid; grid-template-columns: 214px minmax(0, 1fr) 210px; align-items: center; gap: 22px; direction: rtl;
  transition: min-height .18s ease, padding .18s ease, gap .18s ease;
}
#dpc-header-v3 .dpcv3-brand { display: inline-flex; align-items: center; justify-self: start; min-width: 0; gap: 10px; }
#dpc-header-v3 .dpcv3-brand img { display: block; width: 49px; height: 49px; min-width: 49px; object-fit: contain; flex: 0 0 49px; }
#dpc-header-v3 .dpcv3-brand__words { display: block; min-width: 0; line-height: 1.45; }
#dpc-header-v3 .dpcv3-brand__words strong { display: block; color: #28145F; font-size: 22px; line-height: 1.35; font-weight: 900; white-space: nowrap; letter-spacing: -.4px; }
#dpc-header-v3 .dpcv3-brand__words strong b { color: var(--dpcv3-purple); font-weight: 950; }
#dpc-header-v3 .dpcv3-brand__words small { display: block; margin-top: 2px; color: #827B91; font-size: 10px; line-height: 1.45; font-weight: 500; white-space: nowrap; }

#dpc-header-v3 .dpcv3-search {
  position: relative; display: flex !important; flex-direction: row; align-items: center; gap: 10px;
  width: 100%; min-width: 0; height: 49px; margin: 0; padding: 4px 5px 4px 4px;
  border: 1px solid #E4DFED !important; border-radius: 13px; background: #F8F7FB !important;
  box-shadow: none !important; direction: rtl; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
#dpc-header-v3 .dpcv3-search:focus-within { border-color: rgba(75,18,233,.6) !important; background: #fff !important; box-shadow: 0 0 0 4px rgba(75,18,233,.07) !important; }
#dpc-header-v3 .dpcv3-search__icon { width: 21px !important; height: 21px !important; min-width: 21px; max-width: 21px !important; color: #7A718F; }
#dpc-header-v3 .dpcv3-search input[type="search"] {
  display: block !important; flex: 1 1 auto !important; width: 100% !important; min-width: 0 !important; height: 100% !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; outline: none !important;
  background: transparent !important; color: #292336 !important; box-shadow: none !important; appearance: none; -webkit-appearance: none;
  font-size: 13px !important; line-height: 1.5 !important; font-weight: 500 !important; text-align: right !important;
}
#dpc-header-v3 .dpcv3-search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
#dpc-header-v3 .dpcv3-search input::placeholder { color: #9690A2 !important; opacity: 1; }
#dpc-header-v3 .dpcv3-search__shortcut { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; padding: 3px 6px; border: 1px solid #E4DFEB; border-bottom-width: 2px; border-radius: 6px; background: #fff; color: #8D869C; font: 10px/1.3 Arial, sans-serif; direction: ltr; white-space: nowrap; }
#dpc-header-v3 .dpcv3-search__submit {
  display: inline-flex !important; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px;
  width: auto; min-width: 94px; height: 39px; padding: 0 12px !important; margin: 0 !important;
  border: 0 !important; border-radius: 10px !important; background: var(--dpcv3-purple) !important; color: #fff !important;
  box-shadow: none !important; font-size: 12px !important; line-height: 1 !important; font-weight: 800 !important; white-space: nowrap;
  appearance: none !important; -webkit-appearance: none !important; transition: background .15s ease, transform .15s ease;
}
#dpc-header-v3 .dpcv3-search__submit:hover { background: #3810B7 !important; transform: translateY(-1px); }
#dpc-header-v3 .dpcv3-search__submit svg { width: 17px !important; height: 17px !important; min-width: 17px; max-width: 17px !important; color: #fff; }

#dpc-header-v3 .dpcv3-actions { display: flex; align-items: center; justify-self: end; gap: 8px; min-width: 0; direction: rtl; }
#dpc-header-v3 .dpcv3-action { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 5px 8px; border: 1px solid transparent; border-radius: 11px; color: #504960; background: transparent; font-size: 11px; line-height: 1.35; font-weight: 750; white-space: nowrap; transition: background .15s ease, border-color .15s ease, color .15s ease; }
#dpc-header-v3 .dpcv3-action > svg, #dpc-header-v3 .dpcv3-action__cart-icon > svg { width: 21px !important; height: 21px !important; min-width: 21px; max-width: 21px !important; color: #5C4C80; }
#dpc-header-v3 .dpcv3-action:hover { background: #F7F4FF; border-color: #EBE5FA; }
#dpc-header-v3 .dpcv3-action--cart { padding-inline: 11px; border-color: #F0D881; background: #FFF8D9; color: #2B2050; }
#dpc-header-v3 .dpcv3-action--cart:hover { background: #FFEFAC; border-color: #E8C74F; color: #28145F; }
#dpc-header-v3 .dpcv3-action__cart-icon { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; }
#dpc-header-v3 .dpcv3-action__cart-icon > svg { color: #4B12E9; }
#dpc-header-v3 .dpcv3-action__count { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid #FFF8D9; border-radius: 99px; background: #4B12E9; color: #fff; font-size: 9px; line-height: 1; font-weight: 900; }

#dpc-header-v3 .dpcv3-nav { width: 100%; margin: 0; padding: 0; border-top: 1px solid #F0EDF5; background: #fff; }
#dpc-header-v3 .dpcv3-nav__inner { position: relative; display: flex; align-items: center; gap: 23px; width: min(1320px, calc(100% - 40px)); min-height: 43px; margin: 0 auto; padding: 0; direction: rtl; }
#dpc-header-v3 .dpcv3-category-wrap { position: relative; z-index: 2; flex: 0 0 auto; }
#dpc-header-v3 .dpcv3-category-toggle {
  display: inline-flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
  min-width: 0 !important; min-height: 33px !important; width: auto !important; margin: 0 !important; padding: 0 12px !important;
  border: 0 !important; border-radius: 8px !important; background: #4B12E9 !important; color: #fff !important;
  box-shadow: none !important; font-size: 12px !important; line-height: 1 !important; font-weight: 800 !important; white-space: nowrap;
  appearance: none !important; -webkit-appearance: none !important; transition: background .15s ease;
}
#dpc-header-v3 .dpcv3-category-toggle:hover, #dpc-header-v3 .dpcv3-category-toggle[aria-expanded="true"] { background: #3810B7 !important; }
#dpc-header-v3 .dpcv3-category-toggle > svg:first-child { width: 17px !important; height: 17px !important; min-width: 17px; max-width: 17px !important; color: #fff; }
#dpc-header-v3 .dpcv3-category-toggle .dpcv3-chevron { width: 14px !important; height: 14px !important; min-width: 14px; max-width: 14px !important; transition: transform .15s ease; }
#dpc-header-v3 .dpcv3-category-toggle[aria-expanded="true"] .dpcv3-chevron { transform: rotate(180deg); }
#dpc-header-v3 .dpcv3-nav-links { display: flex; align-items: center; gap: clamp(15px, 2vw, 27px); min-width: 0; }
#dpc-header-v3 .dpcv3-nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; color: #5D566D; font-size: 12px; line-height: 1.4; font-weight: 650; white-space: nowrap; }
#dpc-header-v3 .dpcv3-nav-link:hover { color: var(--dpcv3-purple); }
#dpc-header-v3 .dpcv3-nav-link--best { color: #8C4711; font-weight: 850; }
#dpc-header-v3 .dpcv3-nav-link--best > span { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 6px; background: #FFF1BC; color: #9B6900; font-size: 13px; }
#dpc-header-v3 .dpcv3-nav-promise { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; color: #797285; font-size: 10px; font-weight: 600; white-space: nowrap; }
#dpc-header-v3 .dpcv3-nav-promise i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #20A36B; box-shadow: 0 0 0 3px #E3F6EC; }

#dpc-header-v3 .dpcv3-category-panel[hidden] { display: none !important; }
#dpc-header-v3 .dpcv3-category-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 2000; width: min(760px, calc(100vw - 32px)); max-height: min(72vh, 620px); overflow: auto; padding: 20px; border: 1px solid #E7E1F0; border-radius: 15px; background: #fff; color: #282238; box-shadow: var(--dpcv3-shadow); text-align: right; }
#dpc-header-v3 .dpcv3-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 13px; padding: 0 0 13px; border-bottom: 1px solid #F0ECF4; }
#dpc-header-v3 .dpcv3-panel-heading strong { display: block; color: #282038; font-size: 15px; line-height: 1.5; font-weight: 900; }
#dpc-header-v3 .dpcv3-panel-heading div > span { display: block; margin-top: 3px; color: #81798F; font-size: 11px; line-height: 1.7; }
#dpc-header-v3 .dpcv3-panel-heading > a, #dpc-header-v3 .dpcv3-panel-footer a { display: inline-flex; align-items: center; gap: 6px; color: #4B12E9; font-size: 11px; font-weight: 850; white-space: nowrap; }
#dpc-header-v3 .dpcv3-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
#dpc-header-v3 .dpcv3-category-link { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 52px; padding: 8px; border: 1px solid #F0EDF5; border-radius: 10px; color: #393245; font-size: 12px; line-height: 1.5; font-weight: 700; transition: border-color .15s ease, background .15s ease; }
#dpc-header-v3 .dpcv3-category-link:hover { border-color: #DDD2FF; background: #FAF8FF; }
#dpc-header-v3 .dpcv3-category-link__icon { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 33px; border-radius: 9px; background: #F1EDFF; color: #4B12E9; }
#dpc-header-v3 .dpcv3-category-link__icon svg { width: 18px !important; height: 18px !important; min-width: 18px; max-width: 18px !important; }
#dpc-header-v3 .dpcv3-category-link > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
#dpc-header-v3 .dpcv3-category-link__arrow { margin-inline-start: auto; color: #A69DBA; font-size: 15px; flex: 0 0 auto; }
#dpc-header-v3 .dpcv3-panel-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 15px; margin-top: 13px; padding: 12px 13px; border-radius: 10px; background: #F8F6FC; color: #736B83; font-size: 11px; line-height: 1.7; }

#dpc-header-v3.is-compact { box-shadow: 0 8px 24px rgba(35, 23, 71, .10); }
#dpc-header-v3.is-compact .dpcv3-main { min-height: 66px; padding-block: 6px; gap: 18px; }
#dpc-header-v3.is-compact .dpcv3-brand img { width: 42px; height: 42px; min-width: 42px; flex-basis: 42px; }
#dpc-header-v3.is-compact .dpcv3-brand__words strong { font-size: 20px; }
#dpc-header-v3.is-compact .dpcv3-search { height: 45px; }
#dpc-header-v3.is-compact .dpcv3-nav__inner { min-height: 40px; }
#dpc-header-v3.is-compact .dpcv3-nav-link { min-height: 39px; }

@media (max-width: 1120px) {
  #dpc-header-v3 .dpcv3-main { grid-template-columns: 195px minmax(0,1fr) 178px; gap: 13px; }
  #dpc-header-v3 .dpcv3-brand__words small { display: none; }
  #dpc-header-v3 .dpcv3-actions { gap: 4px; }
  #dpc-header-v3 .dpcv3-action { gap: 5px; padding-inline: 6px; font-size: 10px; }
  #dpc-header-v3 .dpcv3-nav__inner { gap: 16px; }
  #dpc-header-v3 .dpcv3-nav-links { gap: 17px; }
  #dpc-header-v3 .dpcv3-nav-promise { display: none; }
}
@media (max-width: 820px) {
  #dpc-v3-benefits .dpcv3-benefits__inner { width: calc(100% - 24px); justify-content: center; flex-wrap: wrap; gap: 3px 15px; padding-block: 5px; }
  #dpc-v3-benefits .dpcv3-benefit { font-size: 10px; }
  #dpc-header-v3 .dpcv3-main { width: calc(100% - 24px); grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand actions" "search search"; gap: 10px 12px; min-height: 0; padding-block: 11px; }
  #dpc-header-v3 .dpcv3-brand { grid-area: brand; gap: 8px; }
  #dpc-header-v3 .dpcv3-brand img { width: 43px; height: 43px; min-width: 43px; flex-basis: 43px; }
  #dpc-header-v3 .dpcv3-brand__words strong { font-size: 19px; }
  #dpc-header-v3 .dpcv3-brand__words small { display: none; }
  #dpc-header-v3 .dpcv3-search { grid-area: search; height: 45px; gap: 8px; border-radius: 11px; }
  #dpc-header-v3 .dpcv3-search input[type="search"] { font-size: 12px !important; }
  #dpc-header-v3 .dpcv3-search__shortcut { display: none; }
  #dpc-header-v3 .dpcv3-search__submit { width: 40px; min-width: 40px; height: 35px; padding: 0 !important; border-radius: 8px !important; }
  #dpc-header-v3 .dpcv3-search__submit span { display: none; }
  #dpc-header-v3 .dpcv3-actions { grid-area: actions; gap: 5px; }
  #dpc-header-v3 .dpcv3-action { min-height: 39px; padding: 4px; border: 0; }
  #dpc-header-v3 .dpcv3-action__label { display: none; }
  #dpc-header-v3 .dpcv3-action > svg, #dpc-header-v3 .dpcv3-action__cart-icon > svg { width: 21px !important; height: 21px !important; }
  #dpc-header-v3 .dpcv3-action--cart { padding-inline: 7px; border: 1px solid #F0D881; }
  #dpc-header-v3 .dpcv3-nav__inner { width: 100%; min-height: 43px; padding-inline: 12px; gap: 12px; }
  #dpc-header-v3 .dpcv3-nav-links { flex: 1 1 auto; gap: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #dpc-header-v3 .dpcv3-nav-links::-webkit-scrollbar { display: none; }
  #dpc-header-v3 .dpcv3-nav-link { min-height: 42px; font-size: 11px; }
  #dpc-header-v3 .dpcv3-category-toggle { min-height: 32px !important; padding-inline: 10px !important; font-size: 11px !important; }
  #dpc-header-v3 .dpcv3-category-toggle .dpcv3-chevron { display: none !important; }
  #dpc-header-v3 .dpcv3-category-panel { top: calc(100% + 5px); right: 10px; width: calc(100vw - 20px); padding: 13px; max-height: min(72vh, 560px); }
  #dpc-header-v3 .dpcv3-panel-heading { align-items: flex-start; }
  #dpc-header-v3 .dpcv3-panel-heading strong { font-size: 13px; }
  #dpc-header-v3 .dpcv3-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  #dpc-header-v3 .dpcv3-category-link { min-height: 47px; gap: 6px; padding: 6px; font-size: 11px; }
  #dpc-header-v3 .dpcv3-category-link__icon { width: 27px; height: 27px; flex-basis: 27px; }
  #dpc-header-v3 .dpcv3-category-link__icon svg { width: 16px !important; height: 16px !important; min-width: 16px; max-width: 16px !important; }
  #dpc-header-v3 .dpcv3-panel-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  #dpc-header-v3.is-compact .dpcv3-main { min-height: 0; padding-block: 8px; gap: 8px 12px; }
  #dpc-header-v3.is-compact .dpcv3-brand img { width: 40px; height: 40px; min-width: 40px; flex-basis: 40px; }
  #dpc-header-v3.is-compact .dpcv3-search { height: 42px; }
}
@media (max-width: 430px) {
  #dpc-v3-benefits .dpcv3-benefits__inner { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); justify-content: stretch; gap: 4px 6px; width: calc(100% - 16px); padding-block: 5px; }
  #dpc-v3-benefits .dpcv3-benefit { justify-content: center; gap: 4px; font-size: 9px; white-space: nowrap; }
  #dpc-v3-benefits .dpcv3-benefit--guarantee { grid-column: 1 / -1; justify-self: center; }
  #dpc-v3-benefits .dpcv3-benefit--installments { display: none; }
  #dpc-header-v3 .dpcv3-main { width: calc(100% - 20px); gap: 8px; }
  #dpc-header-v3 .dpcv3-brand img { width: 38px; height: 38px; min-width: 38px; flex-basis: 38px; }
  #dpc-header-v3 .dpcv3-brand__words strong { font-size: 17px; }
  #dpc-header-v3 .dpcv3-actions { gap: 3px; }
  #dpc-header-v3 .dpcv3-action { padding: 3px; }
  #dpc-header-v3 .dpcv3-action > svg, #dpc-header-v3 .dpcv3-action__cart-icon > svg { width: 19px !important; height: 19px !important; min-width: 19px; max-width: 19px !important; }
  #dpc-header-v3 .dpcv3-search { height: 43px; }
  #dpc-header-v3 .dpcv3-search__icon { width: 18px !important; height: 18px !important; min-width: 18px; max-width: 18px !important; }
  #dpc-header-v3 .dpcv3-nav__inner { padding-inline: 10px; gap: 9px; }
  #dpc-header-v3 .dpcv3-category-toggle { padding-inline: 8px !important; gap: 6px !important; font-size: 10px !important; }
  #dpc-header-v3 .dpcv3-category-toggle > svg:first-child { width: 15px !important; height: 15px !important; min-width: 15px; max-width: 15px !important; }
  #dpc-header-v3 .dpcv3-nav-links { gap: 15px; }
  #dpc-header-v3 .dpcv3-nav-link { font-size: 10px; }
  #dpc-header-v3 .dpcv3-category-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #dpc-v3-benefits *, #dpc-header-v3, #dpc-header-v3 * { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
