/* MI PART V2.2: compact header + phone settings + working cart badge.
   Applied after site.css; does not overwrite gallery, footer or checkout logic. */
.mp-v22-header{box-shadow:0 5px 18px rgba(25,47,79,.045)}
.mp-v22-header .container{width:min(1410px,calc(100% - 46px));max-width:none}
.mp-v22-header .mipart-header-main{
  direction:rtl;display:grid;grid-template-columns:185px minmax(0,1fr) 146px;
  grid-template-areas:'brand search cart';gap:18px;min-height:67px;padding:7px 0;
}
.mp-v22-header .mipart-logo{min-height:46px;max-width:185px}
.mp-v22-header .mipart-logo .brand-logo-image{max-height:57px;max-width:185px;object-fit:contain}
.mp-v22-header .mipart-search{
  justify-self:stretch;max-width:860px;width:100%;min-height:46px;
  padding:4px;border:1px solid #dbe4f1;border-radius:12px;background:#f3f6fa;
}
.mp-v22-header .mipart-search input[name=q]{height:37px;font-size:12px;padding:0 12px}
.mp-v22-header .mipart-search input[name=q]::placeholder{font-size:12px}
.mp-v22-header .mipart-search .mipart-search-button{flex-basis:38px;min-width:38px;width:38px;height:38px;border-radius:9px}
.mp-v22-header .mp-v22-cart{
  grid-area:cart;display:flex;align-items:center;justify-content:center;gap:8px;
  width:146px;height:43px;align-self:center;justify-self:end;
  border:1px solid #123b60;border-radius:11px;background:#153b5c;
  box-shadow:0 7px 15px rgba(18,48,80,.13);
  font-size:12px;font-weight:700;color:#fff;position:relative;transition:background .2s;
}
.mp-v22-header .mp-v22-cart:hover{background:#20567b;color:#fff}
.mp-v22-header .mp-v22-cart .icon-svg svg{width:22px;height:22px}
.mp-v22-header .mp-v22-cart-badge{
  position:absolute;top:-10px;right:15px;direction:ltr;
  min-width:21px;height:21px;padding:0 4px;display:flex;align-items:center;justify-content:center;
  border-radius:99px;background:#ed2536;border:2px solid #fff;color:#fff;
  font:700 11px/1 'Vazirmatn',Tahoma,sans-serif;
  box-shadow:0 4px 10px #ca1c3860;
}
.mp-v22-header .mp-v22-cart-badge[hidden]{display:none!important}
.mp-v22-cart-badge.is-updated{animation:mp-v22-badge-pop .3s ease-out}
@keyframes mp-v22-badge-pop{50%{transform:scale(1.25)}}
.mp-v22-header .mipart-nav{background:#163c5d}
.mp-v22-header .mipart-nav .mipart-nav-list{
  align-items:center;min-height:48px;max-height:none;gap:0;
  overflow-x:auto;overflow-y:hidden;
}
.mp-v22-header .mipart-nav .mipart-nav-list>a{font-size:11.5px;min-height:48px;padding-inline:13px!important}
.mp-v22-header .mp-v22-nav-spacer{flex:1 1 auto;min-width:5px}
.mp-v22-header .mp-v22-phone-list{display:flex;align-items:center;gap:16px;flex:0 0 auto;padding-inline:10px 3px}
.mp-v22-header .mp-v22-phone{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  color:#f2f7ff;text-decoration:none;font-weight:650;font-size:12px;
  white-space:nowrap;direction:ltr;unicode-bidi:isolate;
}
.mp-v22-header .mp-v22-phone svg{flex:0 0 19px;color:#f6f8ff}
.mp-v22-header .mp-v22-phone.is-green span{color:#50df81}
.mp-v22-header .mp-v22-phone:hover span{text-decoration:underline}
/* Stand-alone admin settings page; no styling impact on product editor. */
.mp-v22-admin-contact-form{max-width:780px;display:grid;gap:22px}
.mp-v22-admin-phone-row{min-width:0;border:1px solid #d9e6f7;border-radius:15px;padding:17px;display:grid;gap:12px}
.mp-v22-admin-phone-row legend{font-weight:700;font-size:16px;padding:0 12px;color:#16375f}
.mp-v22-admin-phone-row label{display:grid;gap:8px}
.mp-v22-admin-phone-row input[type=tel]{display:block;width:100%;height:47px;border:1px solid #dce5f1;border-radius:10px;padding:10px 13px;font-size:16px}
.mp-v22-admin-switches{display:flex;flex-wrap:wrap;align-items:center;gap:20px}
.mp-v22-admin-switches label{display:flex;align-items:center;gap:8px;font-size:13px}
.mp-v22-admin-switches input[type=checkbox]{width:17px;height:17px;accent-color:#0a62d0}
@media(max-width:1220px){
  .mp-v22-header .mipart-header-main{grid-template-columns:165px minmax(0,1fr) 122px;gap:12px}
  .mp-v22-header .mp-v22-cart{width:122px}
  .mp-v22-header .mp-v22-phone-list{gap:10px}
  .mp-v22-header .mp-v22-phone{font-size:11px}
}
@media(max-width:900px){
  .mp-v22-header .mipart-nav .mipart-nav-list{overflow-x:auto}
  .mp-v22-header .mp-v22-nav-spacer{min-width:0;flex:0 0 auto}
  .mp-v22-header .mp-v22-phone-list{padding-inline:10px}
}
@media(max-width:650px){
  .mp-v22-header .container{width:calc(100% - 24px)}
  .mp-v22-header .mipart-header-main{
    grid-template-columns:minmax(0,1fr) 125px;
    grid-template-areas:'brand cart' 'search search';
    gap:9px;padding:10px 0;min-height:0;
  }
  .mp-v22-header .mipart-logo{min-height:45px}
  .mp-v22-header .mipart-logo .brand-logo-image{max-width:168px;max-height:49px}
  .mp-v22-header .mp-v22-cart{width:125px;height:40px}
  .mp-v22-header .mipart-search{max-width:none;min-height:42px}
  .mp-v22-header .mipart-search input[name=q]{height:34px}
  .mp-v22-header .mipart-search .mipart-search-button{width:35px;height:35px;flex-basis:35px;min-width:35px}
  .mp-v22-header .mp-v22-phone-list{gap:12px}
  .mp-v22-header .mp-v22-phone{font-size:11px}
}

/* V2.3 — header contact numbers: legible Persian digits, original tel: URI retained. */
.mp-v22-header .mp-v22-phone-list{
  gap:18px!important;
  padding-inline:14px 5px!important;
}
.mp-v22-header .mp-v22-phone{
  font-size:15px!important;
  line-height:1.65!important;
  font-weight:750!important;
  gap:7px!important;
  letter-spacing:0!important;
}
.mp-v22-header .mp-v22-phone>svg{
  width:22px!important;height:22px!important;
  flex:0 0 22px!important;
}
.mp-v22-header .mp-v22-phone>span{
  display:inline-block!important;
  direction:ltr!important;
  unicode-bidi:isolate!important;
  white-space:nowrap!important;
  font-variant-numeric:tabular-nums;
}
@media(max-width:1220px){
  .mp-v22-header .mp-v22-phone-list{gap:12px!important}
  .mp-v22-header .mp-v22-phone{font-size:13.5px!important}
  .mp-v22-header .mp-v22-phone>svg{width:20px!important;height:20px!important;flex-basis:20px!important}
}
@media(max-width:650px){
  .mp-v22-header .mp-v22-phone{font-size:13px!important}
}
