﻿/*
 * MrTehranLitePlus R1
 * Targeted navigation/header extension on top of MrTehranLite.
 * Scope: Base.ascx only via .mtlp-shell.
 */

:root {
  --mtlp-orange: #ff5a24;
  --mtlp-orange-hover: #ea4613;
  --mtlp-drawer-width: 430px;
}

body.mtlp-lock { overflow: hidden !important; }
body.mtlp-skin-active .kco-launcher { display: none !important; }

.mtlp-shell .mtlp-header-main-row { position: relative; }
.mtlp-shell .mtlp-header-actions {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  direction: rtl;
}

.mtlp-shell .mtlp-header-tool {
  position: relative;
  min-width: 62px;
  min-height: 58px;
  margin: 0;
  padding: 5px 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff !important;
  text-decoration: none !important;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.2;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
  box-sizing: border-box;
}
.mtlp-shell .mtlp-header-tool:hover,
.mtlp-shell .mtlp-header-tool:focus {
  background: rgba(255,255,255,.14);
  color: #fff !important;
  text-decoration: none !important;
  outline: 0;
}
.mtlp-shell .mtlp-header-tool:active { transform: translateY(1px); }
.mtlp-shell .mtlp-header-tool > i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  margin: 0;
  padding: 0;
  color: #fff !important;
  font-size: 22px;
  line-height: 1;
}
.mtlp-shell .mtlp-header-tool > span,
.mtlp-shell .mtlp-header-tool .mtlp-tool-label {
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  text-align: center;
}

/* BasketPreview is kept native; only its trigger is restyled into the header tool. */
.mtlp-shell .mtlp-basket-host {
  min-width: 66px;
  padding: 0;
  overflow: visible;
}
.mtlp-shell .mtlp-basket-host .btn-show-basket {
  width: 66px !important;
  min-width: 66px !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 5px 6px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #fff !important;
  cursor: pointer;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  box-sizing: border-box !important;
  transition: background-color .18s ease, transform .18s ease;
}
.mtlp-shell .mtlp-basket-host .btn-show-basket:hover,
.mtlp-shell .mtlp-basket-host .btn-show-basket:focus,
.mtlp-shell .mtlp-basket-host .btn-show-basket.active {
  background: rgba(255,255,255,.14) !important;
}
.mtlp-shell .mtlp-basket-host .btn-show-basket:before {
  content: "\f291" !important;
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-family: "Font Awesome 7 Free" !important;
  font-weight: 900 !important;
  font-size: 22px !important;
  line-height: 1 !important;
}
.mtlp-shell .mtlp-basket-host .btn-show-basket.active:before { content: "\f00d" !important; }
.mtlp-shell .mtlp-basket-host .btn-show-basket:after {
  content: "سبد خرید" !important;
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  white-space: nowrap;
}
.mtlp-shell .mtlp-basket-count {
  position: absolute;
  z-index: 8;
  top: 1px;
  right: 1px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--karen-primary);
  border-radius: 999px;
  background: var(--mtlp-orange);
  color: #fff !important;
  font: 700 11px/16px Tahoma, sans-serif;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}

/* Native basket box is anchored under the new header basket action on desktop. */
@media screen and (min-width: 1200px) {
  .mtlp-shell .mtlp-basket-host .basket-preview-wrap {
    position: absolute !important;
    z-index: 1095 !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: 380px !important;
    max-width: min(380px, 94vw) !important;
    transform: translateY(-10px) !important;
    opacity: 0 !important;
    pointer-events: none;
  }
  .mtlp-shell .mtlp-basket-host .basket-preview-wrap.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto;
  }
}

/* Desktop category trigger before the existing main menu. */
.mtlp-shell .mtlp-nav-row { min-height: 56px; }
.mtlp-shell .mtlp-nav-inner {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  direction: rtl;
}
.mtlp-shell .mtlp-category-trigger {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  background: var(--mtlp-orange);
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}
.mtlp-shell .mtlp-category-trigger:hover,
.mtlp-shell .mtlp-category-trigger:focus {
  background: var(--mtlp-orange-hover);
  color: #fff !important;
  outline: 0;
}
.mtlp-shell .mtlp-category-trigger:active { transform: translateY(1px); }
.mtlp-shell .mtlp-category-trigger i,
.mtlp-shell .mtlp-category-trigger span { color: #fff !important; }
.mtlp-shell .mtlp-category-trigger i { font-size: 18px; }
.mtlp-shell .mtlp-desktop-menu-slot { flex: 1 1 auto; min-width: 0; }
.mtlp-shell .mtlp-main-nav { width: 100%; }
.mtlp-shell .mtlp-main-menu { margin-top: 0 !important; }

/* R1.1: Base is intentionally single-column. Category HTML is kept only inside the shared drawer. */
.mtlp-shell .mtlp-page-body .mtlp-content-full {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  border-right: 0 !important;
}
.mtlp-shell .mtlp-category-server-pane {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Shared drawer. Desktop category button opens categories; mobile menu exposes both tabs. */
.mtlp-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147480500;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.mtlp-navigation-drawer {
  position: fixed !important;
  z-index: 2147480600 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: min(var(--mtlp-drawer-width), 94vw) !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid var(--karen-border) !important;
  background: var(--karen-surface) !important;
  color: var(--karen-text) !important;
  box-shadow: -12px 0 38px rgba(0,0,0,.20);
  transform: translate3d(104%,0,0);
  transition: transform .25s ease;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
body.mtlp-drawer-open .mtlp-drawer-overlay { opacity: 1; pointer-events: auto; }
body.mtlp-drawer-open .mtlp-navigation-drawer { transform: translate3d(0,0,0); }
.mtlp-drawer-head {
  flex: 0 0 auto;
  min-height: 78px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--karen-border);
  background: var(--karen-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mtlp-drawer-heading { display: flex; flex-direction: column; min-width: 0; }
.mtlp-drawer-heading strong { color: var(--karen-text) !important; font-size: 17px; line-height: 1.6; }
.mtlp-drawer-heading span { color: var(--karen-text-muted) !important; font-size: 13px; line-height: 1.6; }
.mtlp-drawer-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--karen-border);
  border-radius: 12px;
  background: var(--karen-surface-muted);
  color: var(--karen-text) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mtlp-drawer-close i { color: var(--karen-text) !important; font-size: 20px; }
.mtlp-drawer-tabs {
  flex: 0 0 auto;
  min-height: 58px;
  display: none;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--karen-border);
  background: var(--karen-surface-muted);
}
.mtlp-drawer-tab {
  position: relative;
  min-height: 58px;
  border: 0;
  background: transparent;
  color: var(--karen-text-muted) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.mtlp-drawer-tab i,
.mtlp-drawer-tab span { color: inherit !important; }
.mtlp-drawer-tab:after {
  content: "";
  position: absolute;
  right: 16px;
  left: 16px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.mtlp-drawer-tab.is-active { color: var(--karen-primary) !important; background: rgba(var(--karen-primary-rgb),.05); }
.mtlp-drawer-tab.is-active:after { background: var(--karen-primary); }
.mtlp-drawer-body { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.mtlp-drawer-panel {
  position: absolute;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: var(--karen-surface);
}
.mtlp-drawer-panel[hidden] { display: none !important; }

/* Category menu keeps its original server-rendered HTML; only drawer sizing is normalized. */
.mtlp-category-drawer-slot,
.mtlp-category-drawer-slot #RightPane,
.mtlp-category-drawer-slot .fsh-category-menu-wrap,
.mtlp-category-drawer-slot .wi-menu { width: 100% !important; max-width: 100% !important; }
.mtlp-category-drawer-slot .fsh-category-menu-wrap { margin: 0 !important; }

/* Main menu inside mobile drawer: same BootstrapMenu HTML, no Ajax/duplicate menu. */
.mtlp-mobile-menu-slot .mtlp-main-nav {
  position: static !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.mtlp-mobile-menu-slot .mtlp-main-menu {
  float: none !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.mtlp-mobile-menu-slot .mtlp-main-menu > li {
  float: none !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}
.mtlp-mobile-menu-slot .mtlp-main-menu > li > a {
  width: 100% !important;
  min-height: 50px;
  padding: 12px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--karen-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--karen-text) !important;
  display: flex !important;
  align-items: center;
  white-space: normal !important;
  font-size: 14px;
}
.mtlp-mobile-menu-slot .mtlp-main-menu > li > a:hover,
.mtlp-mobile-menu-slot .mtlp-main-menu > li > a:focus,
.mtlp-mobile-menu-slot .mtlp-main-menu > li > a:visited { color: var(--karen-text) !important; }
.mtlp-mobile-menu-slot .mtlp-main-menu > li.active > a { color: var(--karen-primary) !important; background: rgba(var(--karen-primary-rgb),.06) !important; }
.mtlp-mobile-menu-slot .mtlp-main-menu .dropdown-menu {
  position: static !important;
  float: none !important;
  display: block;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-right: 2px solid rgba(var(--karen-primary-rgb),.18) !important;
  border-radius: 0 !important;
  background: var(--karen-surface-muted) !important;
  box-shadow: none !important;
}
.mtlp-mobile-menu-slot .mtlp-main-menu .dropdown-menu > li > a {
  min-height: 44px;
  padding: 9px 16px !important;
  color: var(--karen-text) !important;
  white-space: normal !important;
}
.mtlp-mobile-menu-slot .mtlp-main-menu > li.mtlp-mobile-overflow > a { display: none !important; }
.mtlp-mobile-menu-slot .mtlp-main-menu > li.mtlp-mobile-overflow > .dropdown-menu {
  display: block !important;
  border-right: 0 !important;
  background: transparent !important;
}
.mtlp-mobile-menu-slot .mtlp-main-menu > li.mtlp-mobile-overflow > .dropdown-menu > li > a {
  min-height: 50px;
  padding: 12px 10px !important;
  border-bottom: 1px solid var(--karen-border) !important;
  background: transparent !important;
}

@media screen and (max-width: 1199px) {
  .mtlp-shell > header { padding-top: 12px; }
  .mtlp-shell .mtlp-header-main-row {
    margin: 0 -8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    direction: rtl;
  }
  .mtlp-shell .mtlp-header-logo {
    order: 1;
    float: none !important;
    flex: 0 0 100%;
    width: 100%;
    padding: 0 8px;
    text-align: center;
  }
  .mtlp-shell .mtlp-header-logo a { margin-bottom: 9px; }
  .mtlp-shell .mtlp-menu-trigger {
    order: 2;
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    min-height: 54px;
    padding: 4px 3px;
    display: inline-flex !important;
  }
  .mtlp-shell .mtlp-header-search {
    order: 3;
    float: none !important;
    flex: 1 1 110px;
    width: auto !important;
    min-width: 90px;
    padding: 0 4px;
    text-align: center;
  }
  .mtlp-shell .mtlp-header-actions {
    order: 4;
    float: none !important;
    flex: 0 0 auto;
    width: auto !important;
    min-height: 54px;
    padding: 0 4px;
    gap: 1px;
    display: flex !important;
    align-items: center;
  }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool,
  .mtlp-shell .mtlp-menu-trigger {
    min-height: 54px;
    border-radius: 8px;
  }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool { min-width: 47px; padding: 3px 2px; }
  .mtlp-shell .mtlp-custom-order-action { width: 60px; min-width: 60px !important; }
  .mtlp-shell .mtlp-header-tool > i { width: 25px; height: 24px; font-size: 20px; }
  .mtlp-shell .mtlp-header-tool > span { font-size: 10.5px; line-height: 1.25; }
  .mtlp-shell .mtlp-custom-order-action > span { max-width: 58px; white-space: normal; }
  .mtlp-shell .mtlp-basket-host { min-width: 48px !important; width: 48px; }
  .mtlp-shell .mtlp-basket-host .btn-show-basket {
    width: 48px !important;
    min-width: 48px !important;
    min-height: 54px !important;
    padding: 3px 2px !important;
  }
  .mtlp-shell .mtlp-basket-host .btn-show-basket:before { width: 25px !important; height: 24px !important; font-size: 20px !important; }
  .mtlp-shell .mtlp-basket-host .btn-show-basket:after { font-size: 10.5px !important; }
  .mtlp-shell .mtlp-basket-count {
    top: -1px;
    right: -1px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-width: 2px;
    font-size: 10px;
    line-height: 14px;
  }

  /* Search internals are deliberately not restyled; only its available width changes. */
  .mtlp-shell .mtlp-header-search > div.js__header-search-box { width: 100%; }

  /* Original desktop category trigger is intentionally absent on mobile/tablet. */
  .mtlp-shell .mtlp-nav-row { display: none !important; }

  .mtlp-drawer-tabs { display: grid; }
  .mtlp-navigation-drawer { width: min(var(--mtlp-drawer-width), 94vw) !important; }
  .mtlp-drawer-head { min-height: 70px; padding: 11px 13px; }
  .mtlp-drawer-panel { padding: 10px; }

  /* Native basket preview becomes a header-associated floating card on small screens. */
  .mtlp-shell .mtlp-basket-host .basket-preview-wrap {
    position: fixed !important;
    z-index: 2147480700 !important;
    top: 136px !important;
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    transform: translateY(-10px) !important;
    opacity: 0 !important;
    pointer-events: none;
  }
  .mtlp-shell .mtlp-basket-host .basket-preview-wrap.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto;
  }
}

@media screen and (max-width: 480px) {
  .mtlp-shell > header { padding-right: 8px; padding-left: 8px; }
  .mtlp-shell .mtlp-header-main-row { margin-right: 0; margin-left: 0; }
  .mtlp-shell .mtlp-header-logo { padding-right: 0; padding-left: 0; }
  .mtlp-shell .mtlp-menu-trigger { flex-basis: 43px; width: 43px; min-width: 43px; }
  .mtlp-shell .mtlp-header-search { flex-basis: 82px; min-width: 76px; padding-right: 2px; padding-left: 2px; }
  .mtlp-shell .mtlp-header-actions { padding-right: 1px; padding-left: 0; }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool { min-width: 43px; width: 43px; }
  .mtlp-shell .mtlp-custom-order-action { min-width: 56px !important; width: 56px !important; }
  .mtlp-shell .mtlp-basket-host { min-width: 43px !important; width: 43px !important; }
  .mtlp-shell .mtlp-basket-host .btn-show-basket { width: 43px !important; min-width: 43px !important; }
  .mtlp-shell .mtlp-header-tool > span,
  .mtlp-shell .mtlp-basket-host .btn-show-basket:after { font-size: 10px !important; }
  .mtlp-navigation-drawer { width: min(420px, 96vw) !important; }
}

/* ================================================================
 * R1.2 — Mobile header hierarchy refinement
 * - Description moves to a slim darker strip at the top of header.
 * - Row 1: Menu + right-aligned brand title | Login + Basket on left.
 * - Row 2: Existing search box + Custom Order; search internals unchanged.
 * Desktop is intentionally untouched.
 * ================================================================ */
@media screen and (max-width: 1199px) {
  .mtlp-shell > header {
    padding-top: 0 !important;
  }

  .mtlp-shell .mtlp-header-main-row {
    position: relative;
    margin-right: -8px;
    margin-left: -8px;
    padding: 34px 8px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    direction: rtl;
  }

  /* Keep one source of truth for the portal description, but present it as
     a dedicated slim strip. The darker tone is derived from the current
     brand header instead of hard-coding a site color. */
  .mtlp-shell .mtlp-header-logo {
    position: static !important;
    order: 2;
    float: none !important;
    flex: 0 0 calc(100% - 144px);
    width: calc(100% - 144px) !important;
    min-width: 0;
    margin: 0;
    padding: 0 8px;
    text-align: right;
  }
  .mtlp-shell .mtlp-header-logo a {
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 0;
    text-align: right;
  }
  .mtlp-shell .mtlp-header-logo a strong {
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: #fff;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mtlp-shell .mtlp-header-logo a span {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    left: 0;
    height: 28px;
    margin: 0;
    padding: 0 12px;
    background: rgba(0, 0, 0, .12);
    color: rgba(255, 255, 255, .72);
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 11.5px;
    line-height: 28px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
  }

  /* The wrapper no longer owns a row on mobile; its children become direct
     flex items so Login/Basket can share the brand row while Custom Order
     stays beside Search on the row below. */
  .mtlp-shell .mtlp-header-actions {
    display: contents !important;
  }

  .mtlp-shell .mtlp-menu-trigger {
    order: 1;
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    min-height: 54px;
    margin: 0;
    padding: 4px 3px;
    display: inline-flex !important;
  }
  .mtlp-shell .mtlp-login-action {
    order: 3;
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px !important;
  }
  .mtlp-shell .mtlp-basket-host {
    order: 4;
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px !important;
  }

  /* Second mobile row: keep original search component styling; only the
     available width/placement changes. */
  .mtlp-shell .mtlp-header-search {
    order: 5;
    float: none !important;
    flex: 0 0 calc(100% - 64px);
    width: calc(100% - 64px) !important;
    min-width: 0;
    margin-top: 6px;
    padding: 0 4px 0 0;
    text-align: center;
  }
  .mtlp-shell .mtlp-custom-order-action {
    order: 6;
    flex: 0 0 64px;
    width: 64px !important;
    min-width: 64px !important;
    margin-top: 6px;
  }
  .mtlp-shell .mtlp-header-search > div.js__header-search-box {
    width: 100%;
  }

  /* Basket preview follows the new two-row header height. */
  .mtlp-shell .mtlp-basket-host .basket-preview-wrap {
    top: 150px !important;
  }
}

@media screen and (max-width: 480px) {
  .mtlp-shell .mtlp-header-main-row {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }
  .mtlp-shell .mtlp-menu-trigger {
    flex-basis: 43px;
    width: 43px;
    min-width: 43px;
  }
  .mtlp-shell .mtlp-header-logo {
    flex-basis: calc(100% - 129px);
    width: calc(100% - 129px) !important;
    padding-right: 7px;
    padding-left: 7px;
  }
  .mtlp-shell .mtlp-login-action {
    flex-basis: 43px;
    width: 43px;
    min-width: 43px !important;
  }
  .mtlp-shell .mtlp-basket-host {
    flex-basis: 43px;
    width: 43px;
    min-width: 43px !important;
  }
  .mtlp-shell .mtlp-header-search {
    flex-basis: calc(100% - 58px);
    width: calc(100% - 58px) !important;
    padding-right: 0;
    padding-left: 3px;
  }
  .mtlp-shell .mtlp-custom-order-action {
    flex-basis: 58px;
    width: 58px !important;
    min-width: 58px !important;
  }
}

/* ========================================================================== 
 * R1.3 — Header composition aligned to approved desktop/mobile mockup
 * ========================================================================== */

/* Shared header rhythm */
.mtlp-shell > .mtlp-header {
  padding: 0 !important;
  background: var(--karen-primary) !important;
  color: #fff !important;
}
.mtlp-shell .mtlp-mobile-description { display: none; }
.mtlp-shell .mtlp-header-main-row {
  min-height: 138px;
  margin: 0 !important;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(360px, 1fr) minmax(280px, 360px);
  grid-template-areas: "actions search brand";
  align-items: center;
  column-gap: 28px;
  direction: ltr;
}
.mtlp-shell .mtlp-header-logo {
  grid-area: brand;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  padding: 0 !important;
  float: none !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  direction: rtl;
  text-align: right;
}
.mtlp-shell .mtlp-header-logo .mtlp-brand-link {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  text-decoration: none !important;
  text-align: right;
}
.mtlp-shell .mtlp-header-logo .mtlp-brand-link strong {
  display: block;
  margin: 0;
  padding: 0;
  color: #fff !important;
  font-size: 29px;
  font-weight: 900;
  line-height: 1.45;
  text-align: right;
}
.mtlp-shell .mtlp-header-logo .mtlp-brand-link .mtlp-desktop-description {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.52) !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
  text-align: right;
  white-space: normal;
}
.mtlp-shell .mtlp-header-search {
  grid-area: search;
  width: 100% !important;
  max-width: 760px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 !important;
  float: none !important;
}
.mtlp-shell .mtlp-header-search > div.js__header-search-box {
  width: 100%;
  min-height: 48px;
}
.mtlp-shell .mtlp-header-actions {
  grid-area: actions;
  min-height: 68px;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  direction: rtl;
}
.mtlp-shell .mtlp-header-actions .mtlp-header-tool {
  min-width: 74px;
  min-height: 64px;
  padding: 4px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent !important;
}
.mtlp-shell .mtlp-header-actions .mtlp-header-tool:hover,
.mtlp-shell .mtlp-header-actions .mtlp-header-tool:focus {
  background: rgba(255,255,255,.10) !important;
}
.mtlp-shell .mtlp-header-actions .mtlp-header-tool > i,
.mtlp-shell .mtlp-basket-host .btn-show-basket:before {
  font-size: 24px !important;
}
.mtlp-shell .mtlp-header-actions .mtlp-header-tool > span,
.mtlp-shell .mtlp-basket-host .btn-show-basket:after {
  font-size: 12px !important;
  font-weight: 700 !important;
}
.mtlp-shell .mtlp-basket-host,
.mtlp-shell .mtlp-basket-host .btn-show-basket {
  width: 74px !important;
  min-width: 74px !important;
  min-height: 64px !important;
}
.mtlp-shell .mtlp-basket-count {
  top: 1px;
  right: 6px;
  border-color: var(--karen-primary) !important;
}

/* Darker lower navigation bar: utility actions + regular site menu */
.mtlp-shell .mtlp-nav-row {
  min-height: 82px;
  margin: 0 !important;
  background: rgba(0,0,0,.10);
  border-top: 1px solid rgba(255,255,255,.035);
}
.mtlp-shell .mtlp-nav-inner {
  min-height: 82px;
  width: 100%;
  margin: 0;
  padding: 0 22px;
  display: flex;
  align-items: stretch;
  gap: 0;
  direction: rtl;
}
.mtlp-shell .mtlp-utility-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  direction: rtl;
  order: 1;
}
.mtlp-shell .mtlp-utility-action {
  position: relative;
  width: 165px;
  min-height: 82px;
  margin: 0;
  padding: 9px 10px 8px;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.07);
  border-radius: 0;
  background: transparent;
  color: #fff !important;
  text-decoration: none !important;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color .18s ease;
  box-sizing: border-box;
}
.mtlp-shell .mtlp-utility-action:first-child { border-right: 1px solid rgba(255,255,255,.07); }
.mtlp-shell .mtlp-utility-action:hover,
.mtlp-shell .mtlp-utility-action:focus {
  background: rgba(255,255,255,.07);
  color: #fff !important;
  text-decoration: none !important;
  outline: 0;
}
.mtlp-shell .mtlp-utility-action i {
  color: #fff !important;
  font-size: 23px;
  line-height: 1;
}
.mtlp-shell .mtlp-utility-action span {
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}
.mtlp-shell .mtlp-desktop-menu-slot {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.mtlp-shell .mtlp-desktop-menu-slot .mtlp-main-nav,
.mtlp-shell .mtlp-desktop-menu-slot .mtlp-main-menu { width: auto !important; }
.mtlp-shell .mtlp-desktop-menu-slot .mtlp-main-menu {
  display: flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}
.mtlp-shell .mtlp-desktop-menu-slot .mtlp-main-menu > li > a {
  padding-top: 29px !important;
  padding-bottom: 29px !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
}

/* Basket panel stays anchored under the upper-left basket action. */
@media screen and (min-width: 1200px) {
  .mtlp-shell .mtlp-basket-host .basket-preview-wrap {
    top: 74px !important;
    left: 0 !important;
  }
}

/* --------------------------------------------------------------------------
 * Mobile / tablet
 * -------------------------------------------------------------------------- */
@media screen and (max-width: 1199px) {
  .mtlp-shell > .mtlp-header { padding: 0 !important; }
  .mtlp-shell .mtlp-mobile-description {
    display: block !important;
    min-height: 31px;
    padding: 5px 12px 4px;
    background: rgba(0,0,0,.10);
    color: rgba(255,255,255,.55) !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.8;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mtlp-shell .mtlp-header-main-row {
    min-height: 0;
    margin: 0 !important;
    padding: 12px 14px 14px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "actions brand"
      "search search";
    align-items: center;
    column-gap: 10px;
    row-gap: 14px;
    direction: ltr;
  }
  .mtlp-shell .mtlp-header-logo {
    grid-area: brand;
    width: auto !important;
    max-width: 280px;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    direction: rtl;
  }
  .mtlp-shell .mtlp-menu-trigger {
    flex: 0 0 50px;
    width: 50px;
    min-width: 50px !important;
    height: 60px;
    min-height: 60px !important;
    padding: 3px 2px !important;
    border-radius: 10px;
    background: transparent !important;
  }
  .mtlp-shell .mtlp-menu-trigger:hover,
  .mtlp-shell .mtlp-menu-trigger:focus { background: rgba(255,255,255,.10) !important; }
  .mtlp-shell .mtlp-menu-trigger > i { font-size: 23px !important; }
  .mtlp-shell .mtlp-menu-trigger > span { font-size: 10.5px !important; }
  .mtlp-shell .mtlp-brand-link {
    min-width: 0;
    margin: 0 !important;
  }
  .mtlp-shell .mtlp-header-logo .mtlp-brand-link strong {
    max-width: 205px;
    font-size: 25px;
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mtlp-shell .mtlp-desktop-description { display: none !important; }

  .mtlp-shell .mtlp-header-actions {
    grid-area: actions;
    min-height: 60px;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    direction: rtl;
  }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool,
  .mtlp-shell .mtlp-basket-host,
  .mtlp-shell .mtlp-basket-host .btn-show-basket {
    width: 56px !important;
    min-width: 56px !important;
    height: 60px !important;
    min-height: 60px !important;
    padding: 3px 2px !important;
    border-radius: 9px !important;
    background: transparent !important;
  }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool > i,
  .mtlp-shell .mtlp-basket-host .btn-show-basket:before { font-size: 22px !important; }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool > span,
  .mtlp-shell .mtlp-basket-host .btn-show-basket:after {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  .mtlp-shell .mtlp-basket-count {
    top: 0;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 14px;
  }
  .mtlp-shell .mtlp-header-search {
    grid-area: search;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 6px !important;
    float: none !important;
  }
  .mtlp-shell .mtlp-header-search > div.js__header-search-box {
    width: 100% !important;
    min-height: 54px;
    margin: 0 !important;
  }

  .mtlp-shell .mtlp-nav-row {
    min-height: 78px;
    background: rgba(0,0,0,.10);
  }
  .mtlp-shell .mtlp-nav-inner {
    min-height: 78px;
    padding: 0 !important;
    display: block !important;
  }
  .mtlp-shell .mtlp-utility-actions {
    width: 100%;
    min-height: 78px;
    display: flex !important;
    align-items: stretch;
  }
  .mtlp-shell .mtlp-utility-action {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 78px;
    padding: 8px 4px 7px;
  }
  .mtlp-shell .mtlp-utility-action i { font-size: 22px; }
  .mtlp-shell .mtlp-utility-action span {
    max-width: 100%;
    font-size: 11.5px;
    white-space: normal;
    line-height: 1.45;
  }
  .mtlp-shell .mtlp-desktop-menu-slot { display: none !important; }

  /* Mobile menu still opens the shared two-tab drawer. */
  .mtlp-shell .mtlp-drawer-tabs { display: grid !important; }

  /* Basket preview remains attached to the mobile header instead of bottom nav. */
  .mtlp-shell .mtlp-basket-host .basket-preview-wrap {
    position: fixed !important;
    top: 108px !important;
    right: 12px !important;
    left: 12px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    z-index: 2147480400 !important;
  }
}

@media screen and (max-width: 480px) {
  .mtlp-shell .mtlp-header-main-row {
    padding-right: 8px;
    padding-left: 8px;
    column-gap: 4px;
  }
  .mtlp-shell .mtlp-header-logo { gap: 6px; }
  .mtlp-shell .mtlp-menu-trigger {
    flex-basis: 44px;
    width: 44px;
    min-width: 44px !important;
  }
  .mtlp-shell .mtlp-header-logo .mtlp-brand-link strong {
    max-width: 174px;
    font-size: 23px;
  }
  .mtlp-shell .mtlp-header-actions { gap: 2px; }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool,
  .mtlp-shell .mtlp-basket-host,
  .mtlp-shell .mtlp-basket-host .btn-show-basket {
    width: 50px !important;
    min-width: 50px !important;
  }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool > span,
  .mtlp-shell .mtlp-basket-host .btn-show-basket:after { font-size: 9.5px !important; }
  .mtlp-shell .mtlp-utility-action span { font-size: 10.5px; }
}

/* R1.3 conflict guards for legacy R1.2 mobile declarations. */
@media screen and (max-width: 1199px) {
  .mtlp-shell .mtlp-nav-row { display: block !important; }
  .mtlp-shell .mtlp-utility-actions .mtlp-custom-order-action {
    order: 0 !important;
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    margin-top: 0 !important;
  }
}
.mtlp-shell .mtlp-utility-action[hidden] { display: none !important; }
.mtlp-shell .mtlp-utility-action .mtlp-utility-glyph {
  color: #fff !important;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}
@media screen and (max-width:1199px) {
  .mtlp-shell .mtlp-utility-action .mtlp-utility-glyph { font-size: 24px; }
}


/* ========================================================================== 
 * R1.4 — Header alignment / typography / search direction / basket behavior
 * ========================================================================== */

/* Buttons and navigation labels use normal weight; brand title remains bold. */
.mtlp-shell .mtlp-header-tool > span,
.mtlp-shell .mtlp-basket-host .btn-show-basket:after,
.mtlp-shell .mtlp-utility-action span,
.mtlp-shell .mtlp-desktop-menu-slot .mtlp-main-menu > li > a,
.mtlp-shell .mtlp-mobile-menu-slot .mtlp-main-menu a,
.mtlp-shell .mtlp-drawer-tab,
.mtlp-shell .mtlp-drawer-close,
.mtlp-shell .mtlp-category-trigger {
  font-weight: 400 !important;
}

/* Persian search flow: text starts from the right, search action remains on the left. */
.mtlp-shell .mtlp-header-search,
.mtlp-shell .mtlp-header-search > .js__header-search-box {
  direction: rtl !important;
}
.mtlp-shell .mtlp-header-search > .js__header-search-box {
  flex-direction: row !important;
}
.mtlp-shell .mtlp-header-search input[type="search"] {
  direction: rtl !important;
  text-align: right !important;
}

/* Basket gets exactly one hover surface: the native trigger itself. */
.mtlp-shell .mtlp-basket-host {
  background: transparent !important;
}
.mtlp-shell .mtlp-basket-host:hover,
.mtlp-shell .mtlp-basket-host:focus,
.mtlp-shell .mtlp-basket-host:focus-within {
  background: transparent !important;
}

@media screen and (min-width: 1200px) {
  /* Symmetric side columns keep Search visually centered while title/actions
     sit against the standard inner header padding. */
  .mtlp-shell .mtlp-header-main-row {
    padding: 18px 28px !important;
    grid-template-columns: minmax(240px, 320px) minmax(360px, 1fr) minmax(240px, 320px) !important;
    column-gap: 28px !important;
  }
  .mtlp-shell .mtlp-header-logo {
    justify-content: flex-start !important; /* RTL flex-start = physical right */
  }
  .mtlp-shell .mtlp-header-actions {
    justify-content: flex-end !important;   /* RTL flex-end = physical left */
  }
  .mtlp-shell .mtlp-nav-inner {
    padding-right: 28px !important;
    padding-left: 28px !important;
  }
}

@media screen and (max-width: 1199px) {
  /* No separate top description strip on mobile. Description returns beneath title. */
  .mtlp-shell .mtlp-mobile-description { display: none !important; }
  .mtlp-shell .mtlp-header-logo {
    justify-content: flex-start !important; /* physical right in RTL */
    align-items: center !important;
  }
  .mtlp-shell .mtlp-menu-trigger {
    order: 0 !important;
  }
  .mtlp-shell .mtlp-brand-link {
    order: 1 !important;
  }
  .mtlp-shell .mtlp-header-logo .mtlp-brand-link .mtlp-desktop-description {
    position: static !important;
    z-index: auto !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    display: block !important;
    margin-top: 2px !important;
    color: rgba(255,255,255,.52) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
    text-align: right !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .mtlp-shell .mtlp-header-actions {
    justify-content: flex-end !important; /* RTL flex-end = physical left */
  }
}

/* ========================================================================== 
 * R1.5 — Basket badge anchor / quick-action alignment / category drawer parity
 * ========================================================================== */

/* Basket badge must be anchored to the basket action itself, never to the page. */
.mtlp-shell .mtlp-basket-host {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  line-height: 1 !important;
}
.mtlp-shell .mtlp-basket-count {
  top: -3px !important;
  right: 2px !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
}

/* Login and basket are two equal quick actions: same box, vertical rhythm and label weight. */
.mtlp-shell .mtlp-header-actions {
  align-items: center !important;
}
.mtlp-shell .mtlp-login-action,
.mtlp-shell .mtlp-basket-host,
.mtlp-shell .mtlp-basket-host .btn-show-basket {
  align-self: center !important;
}
.mtlp-shell .mtlp-login-action > span,
.mtlp-shell .mtlp-basket-host .btn-show-basket:after {
  font-family: inherit !important;
  font-weight: 400 !important;
  font-variation-settings: "wght" 400;
}

/* Category drawer now follows the same flat list language as the Menu tab. */
.mtlp-shell .mtlp-category-drawer-slot .fsh-category-menu-wrap {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu,
.mtlp-shell .mtlp-category-drawer-slot .wi-menu ul {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
  box-shadow: none !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu {
  padding: 0 !important;
  background: transparent !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li > a {
  width: 100% !important;
  min-height: 50px;
  margin: 0 !important;
  padding: 12px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--karen-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--karen-text) !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  text-decoration: none !important;
  white-space: normal !important;
  transition: background-color .16s ease, color .16s ease !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li > a:hover,
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li > a:focus {
  padding-right: 10px !important;
  background: rgba(var(--karen-primary-rgb),.06) !important;
  color: var(--karen-primary) !important;
  text-decoration: none !important;
  outline: 0 !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li > a:before {
  flex: 0 0 auto;
  padding-left: 7px !important;
  color: var(--karen-primary) !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li.active > a,
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li.wi-active > a {
  background: rgba(var(--karen-primary-rgb),.06) !important;
  color: var(--karen-primary) !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li > ul {
  border: 0 !important;
  border-right: 2px solid rgba(var(--karen-primary-rgb),.18) !important;
  background: var(--karen-surface-muted) !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li > ul li > a {
  min-height: 44px;
  padding: 9px 16px !important;
}
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li > ul li > a:hover,
.mtlp-shell .mtlp-category-drawer-slot .wi-menu li > ul li > a:focus {
  padding-right: 16px !important;
}

@media screen and (max-width: 1199px) {
  .mtlp-shell .mtlp-basket-count {
    top: -2px !important;
    right: 0 !important;
  }
  .mtlp-shell .mtlp-header-actions .mtlp-header-tool,
  .mtlp-shell .mtlp-basket-host,
  .mtlp-shell .mtlp-basket-host .btn-show-basket {
    align-self: center !important;
  }
}


/* ==========================================================================
 * R1.6 — Account label specificity fix
 * ========================================================================== */
/* R1.3 had a more-specific !important selector for generic header-tool labels.
   Match/exceed that specificity so Account really resolves to normal weight. */
html body .mtlp-shell .mtlp-header-actions .mtlp-header-tool.mtlp-login-action > span {
  font-family: inherit !important;
  font-weight: normal !important;
  font-variation-settings: "wght" 400 !important;
}


/* ==========================================================================
 * R1.8 — theme/runtime UX integration
 * ========================================================================== */

/* Basket update toast must remain readable over its success surface. */
.mtlp-shell .farashop__notify,
.mtlp-shell .farashop__notify .notify__basket,
.mtlp-shell .farashop__notify .notify__icon,
.mtlp-shell .farashop__notify .notify__close,
.mtlp-shell .farashop__notify .notify__icon i,
.mtlp-shell .farashop__notify .notify__close i {
  color: #fff !important;
}

/* BasketPreview intentionally suppresses its native trigger on checkout.
   The skin fallback keeps the header affordance visible and anchored. */
.mtlp-shell .mtlp-checkout-basket-fallback[hidden] { display: none !important; }
.mtlp-shell .mtlp-checkout-basket-fallback {
  border: 0 !important;
  box-shadow: none !important;
  font: inherit !important;
}
.mtlp-shell .mtlp-checkout-basket-fallback > span {
  font-weight: 400 !important;
  font-variation-settings: "wght" 400 !important;
}

/* HOTFIX10: limit the narrow brand-description cap to phones up to 400px only. */
@media screen and (max-width: 400px) {
  .mtlp-shell .mtlp-header-logo .mtlp-brand-link .mtlp-desktop-description {
    max-width: 200px !important;
  }
}
@media screen and (min-width: 401px) and (max-width: 1199px) {
  .mtlp-shell .mtlp-header-logo .mtlp-brand-link .mtlp-desktop-description {
    max-width: none !important;
  }
}

/* Karen Profile: map historic blue UI accents to the active site palette. */
.mtlp-shell .karen-profile .kp-primary {
  background: var(--karen-primary) !important;
  color: #fff !important;
}
.mtlp-shell .karen-profile .kp-primary:hover,
.mtlp-shell .karen-profile .kp-primary:focus {
  background: var(--karen-complementary) !important;
}
.mtlp-shell .karen-profile .kp-link,
.mtlp-shell .karen-profile .kp-product-link,
.mtlp-shell .karen-profile .kp-relation a {
  color: var(--karen-primary) !important;
}
.mtlp-shell .karen-profile input:focus,
.mtlp-shell .karen-profile textarea:focus,
.mtlp-shell .karen-profile select:focus {
  border-color: var(--karen-primary) !important;
  outline-color: rgba(var(--karen-primary-rgb), .12) !important;
}
.mtlp-shell .karen-profile button:focus-visible,
.mtlp-shell .karen-profile a:focus-visible,
.mtlp-shell .karen-profile input:focus-visible,
.mtlp-shell .karen-profile select:focus-visible,
.mtlp-shell .karen-profile textarea:focus-visible {
  outline-color: rgba(var(--karen-primary-rgb), .24) !important;
}
.mtlp-shell .karen-profile .kp-notice:not(.error) {
  background: rgba(var(--karen-primary-rgb), .08) !important;
  color: var(--karen-primary) !important;
}
.mtlp-shell .karen-profile .kp-sidebar nav button.active,
.mtlp-shell .karen-profile .kp-sidebar nav button:hover {
  background: rgba(var(--karen-primary-rgb), .08) !important;
  color: var(--karen-primary) !important;
}
.mtlp-shell .karen-profile .kp-sidebar nav button.active {
  border-color: rgba(var(--karen-primary-rgb), .24) !important;
  box-shadow: 0 7px 18px rgba(var(--karen-primary-rgb), .14) !important;
}
.mtlp-shell .karen-profile .kp-sidebar nav button.active .kp-nav-icon,
.mtlp-shell .karen-profile .kp-sidebar nav button:hover .kp-nav-icon,
.mtlp-shell .karen-profile .kp-sidebar nav button.active .kp-nav-icon:before {
  color: var(--karen-primary) !important;
}
.mtlp-shell .karen-profile .kp-sidebar nav button.active .kp-nav-icon {
  background: rgba(var(--karen-primary-rgb), .12) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--karen-primary-rgb), .16) !important;
}
.mtlp-shell .karen-profile .kp-status--info {
  background: rgba(var(--karen-primary-rgb), .09) !important;
  color: var(--karen-primary) !important;
}
.mtlp-shell .karen-profile .kp-secondary {
  background: var(--karen-surface) !important;
  border-color: var(--karen-border) !important;
  color: var(--karen-primary) !important;
}
.mtlp-shell .karen-profile .kp-unread { background: var(--karen-primary) !important; }
.mtlp-shell .karen-profile .kp-color-option.is-selected {
  border-color: var(--karen-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--karen-primary-rgb), .10) !important;
}
.mtlp-shell .karen-profile .kp-message.system-event {
  background: rgba(var(--karen-primary-rgb), .07) !important;
  border-color: rgba(var(--karen-primary-rgb), .20) !important;
  color: var(--karen-primary) !important;
}
.mtlp-shell .karen-profile .kp-request-help {
  background: var(--karen-surface-muted) !important;
  border-color: var(--karen-border) !important;
  color: var(--karen-text-muted) !important;
}
.mtlp-shell .karen-profile .kp-proposal.is-active,
.mtlp-shell .karen-profile .kp-proposal[open] {
  border-color: rgba(var(--karen-primary-rgb), .28) !important;
  box-shadow: 0 7px 22px rgba(var(--karen-primary-rgb), .10) !important;
}
.mtlp-shell .karen-profile .kp-proposal-decision,
.mtlp-shell .karen-profile .kp-special-payment:not(.is-paid):not(.is-failed) {
  background: rgba(var(--karen-primary-rgb), .05) !important;
  border-color: rgba(var(--karen-primary-rgb), .20) !important;
}

/* Profile dark mode: convert fixed white profile surfaces to Karen surface tokens. */
.mtlp-shell[data-karen-theme="dark"] .karen-profile { color: var(--karen-text) !important; }
.mtlp-shell[data-karen-theme="dark"] .karen-profile :is(.kp-auth-card,.kp-sidebar,.kp-card,.kp-stat,.kp-table-wrap,.kp-table tr,.kp-empty,.kp-confirm) {
  background: var(--karen-surface) !important;
  border-color: var(--karen-border) !important;
  color: var(--karen-text) !important;
}
.mtlp-shell[data-karen-theme="dark"] .karen-profile :is(input,textarea,select) {
  background: var(--karen-surface-muted) !important;
  border-color: var(--karen-border) !important;
  color: var(--karen-text) !important;
}
.mtlp-shell[data-karen-theme="dark"] .karen-profile :is(.kp-table th,.kp-order-summary div,.kp-relation,.kp-input-suffix>span,.kp-password button,.kp-color-option) {
  background: var(--karen-surface-muted) !important;
  border-color: var(--karen-border) !important;
  color: var(--karen-text) !important;
}
.mtlp-shell[data-karen-theme="dark"] .karen-profile :is(.kp-auth-card>p,.kp-help,.kp-muted,.kp-user span,.kp-order-summary span,.kp-relation-label,small) {
  color: var(--karen-text-muted) !important;
}

/* Custom Order overlay is shared runtime; skin supplies the active palette. */
body.mtlp-skin-active .kco-root .kco-launcher,
body.mtlp-skin-active .kco-root .kco-progress span,
body.mtlp-skin-active .kco-root .kco-btn-primary {
  background: var(--karen-primary) !important;
}
body.mtlp-skin-active .kco-root .kco-btn-pay {
  background: var(--karen-complementary) !important;
}
body.mtlp-skin-active .kco-root .kco-service:hover,
body.mtlp-skin-active .kco-root .kco-input:focus {
  border-color: var(--karen-primary) !important;
}
body.mtlp-skin-active .kco-root .kco-input:focus {
  box-shadow: 0 0 0 3px rgba(var(--karen-primary-rgb), .10) !important;
}
body.mtlp-skin-active .kco-root .kco-choice.kco-selected {
  border-color: var(--karen-primary) !important;
  background: rgba(var(--karen-primary-rgb), .08) !important;
  color: var(--karen-primary) !important;
}
body.mtlp-skin-active .kco-root .kco-price {
  background: rgba(var(--karen-complementary-rgb), .08) !important;
}
body.mtlp-skin-active .kco-root .kco-price strong { color: var(--karen-complementary) !important; }
body.mtlp-skin-active .kco-root .kco-btn-light {
  background: var(--karen-surface-muted) !important;
  color: var(--karen-text) !important;
}
body.mtlp-skin-active .kco-root .kco-panel {
  background: var(--karen-surface) !important;
  color: var(--karen-text) !important;
}
body.mtlp-skin-active .kco-root :is(.kco-service,.kco-input,.kco-choice) {
  background: var(--karen-surface) !important;
  color: var(--karen-text) !important;
  border-color: var(--karen-border) !important;
}
body.mtlp-skin-active .kco-root :is(.kco-header,.kco-summary-row) { border-color: var(--karen-border) !important; }
body.mtlp-skin-active .kco-root :is(.kco-subtitle,.kco-intro p,.kco-service span,.kco-progress-label,.kco-summary-row span,.kco-expiry,.kco-terms,.kco-identity-hint) {
  color: var(--karen-text-muted) !important;
}
body.mtlp-skin-active .kco-root :is(.kco-info,.kco-terms,.kco-identity) {
  background: var(--karen-surface-muted) !important;
  border-color: var(--karen-border) !important;
}
@media(max-width:640px) {
  body.mtlp-skin-active .kco-root .kco-nav { background: var(--karen-surface) !important; }
}


/* HOTFIX8 — Full-width compact header mirrors original header's grid, not a 1420px menu bar.
   Real header search and basket nodes are moved, never duplicated. */
.mtlp-shell .mtlp-sticky-bar {
  position:fixed; top:0; left:0; right:0; z-index:1200; display:none;
  background:var(--karen-primary,#087c67); color:#fff;
  box-shadow:0 4px 16px rgba(0,0,0,.16); box-sizing:border-box;
}
body.mtlp-sticky-visible .mtlp-shell .mtlp-sticky-bar {display:block;}
.mtlp-shell .mtlp-sticky-inner {
  position:relative; box-sizing:border-box; width:100%; max-width:none; margin:0;
  min-height:52px; padding:2px 28px;
  display:grid; grid-template-areas:"tools search menu";
  grid-template-columns:minmax(240px,320px) minmax(360px,1fr) minmax(240px,320px);
  column-gap:28px; align-items:center; direction:ltr;
}
.mtlp-shell .mtlp-sticky-action {
  position:relative; display:inline-flex; flex-direction:column; justify-content:center; align-items:center; gap:2px;
  min-width:0; min-height:48px; margin:0; padding:2px 7px; box-sizing:border-box;
  border:0; border-radius:9px; background:transparent; color:#fff !important;
  font-family:inherit !important; font-weight:400 !important; font-size:11px !important;
  text-decoration:none !important; line-height:1.2 !important; cursor:pointer;
}
.mtlp-shell .mtlp-sticky-action:hover,.mtlp-shell .mtlp-sticky-action:focus-visible {
  background:rgba(255,255,255,.13); color:#fff !important; outline:0;
}
.mtlp-shell .mtlp-sticky-action i {font-size:22px; line-height:1; color:#fff !important;}
.mtlp-shell .mtlp-sticky-action > span {font-size:11px !important; line-height:1.25 !important; font-weight:400 !important; color:#fff !important; white-space:nowrap;}
.mtlp-shell .mtlp-sticky-menu {grid-area:menu; width:66px; justify-self:end; direction:rtl;}
.mtlp-shell .mtlp-sticky-tools {
  grid-area:tools; justify-self:start; display:flex; align-items:center;
  justify-content:flex-end; direction:rtl; gap:5px;
}
.mtlp-shell .mtlp-sticky-tools .mtlp-sticky-account {width:66px; min-width:66px;}
.mtlp-shell .mtlp-sticky-basket-slot {position:relative; width:66px; min-width:66px; height:48px;}
.mtlp-shell .mtlp-sticky-basket-slot .mtlp-basket-host {position:relative !important; width:66px !important; min-width:66px !important;}
.mtlp-shell .mtlp-sticky-basket-slot .btn-show-basket {
  width:66px !important; min-width:66px !important; height:48px !important; min-height:48px !important;
  padding:2px 5px !important; gap:2px !important;
}
.mtlp-shell .mtlp-sticky-basket-slot .btn-show-basket:before {font-size:22px !important; width:27px !important; height:24px !important;}
.mtlp-shell .mtlp-sticky-basket-slot .btn-show-basket:after {font-size:11px !important; font-weight:400 !important;}
.mtlp-shell .mtlp-sticky-basket-slot .mtlp-basket-count {top:-2px !important; right:2px !important;}
.mtlp-shell .mtlp-sticky-custom-order:not([hidden]) {display:inline-flex; width:80px; min-width:80px;}
.mtlp-shell .mtlp-sticky-custom-order .mtlp-utility-glyph {font-size:22px !important; line-height:1 !important; color:#fff !important; font-weight:400 !important;}
.mtlp-shell .mtlp-sticky-search-area {grid-area:search; position:relative; min-width:0; width:100%; max-width:760px; justify-self:center; direction:rtl;}
.mtlp-shell .mtlp-sticky-search-button {display:none;}
.mtlp-shell .mtlp-sticky-search-panel {position:static; display:flex; width:100%; margin:0; padding:0; align-items:center; background:transparent; border:0; box-shadow:none;}
.mtlp-shell .mtlp-sticky-search-slot {display:block; width:100%; min-width:0;}
.mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search {
  display:block !important; float:none !important; width:100% !important; max-width:760px !important;
  min-width:0 !important; margin:0 !important; padding:0 !important; text-align:center;
}
/* Identical real header-search palette and icon, adapted to the narrow bar. */
.mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search > div.js__header-search-box {
  width:100% !important; min-height:46px; display:flex !important; align-items:center;
  flex-direction:row !important; direction:rtl !important;
  background:rgba(255,255,255,.25) !important; border:0 !important;
  border-radius:50px !important; box-shadow:none !important;
}
.mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search input {
  display:block; flex:1 1 auto; width:100% !important; min-width:0 !important;
  height:46px !important; border:0 !important; outline:0 !important;
  background:transparent !important; color:#fff !important; padding:0 15px !important;
  font-family:inherit !important; font-size:14px !important; font-weight:400 !important;
  direction:rtl !important; text-align:right !important;
}
.mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search input::placeholder {color:#fff !important; opacity:.55 !important;}
.mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search input:focus::placeholder {opacity:1 !important;}
.mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search .search-box__btn-search {
  display:flex !important; align-items:center !important; justify-content:center !important;
  flex:0 0 auto; height:46px !important; margin:0 !important; padding:9px 15px !important;
  border:0 !important; background:transparent !important; text-align:center !important;
}
.mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search .search-box__btn-search i {
  display:flex !important; align-items:center !important; justify-content:center !important;
  margin:0 !important; padding:0 !important; line-height:1 !important;
  color:#fff !important; font-size:20px !important;
}
.mtlp-shell .mtlp-sticky-action[hidden], .mtlp-shell .mtlp-sticky-search-panel[hidden] {display:none !important;}
/* Native two-tab category/menu drawer must work on desktop too. */
.mtlp-shell .mtlp-drawer-tabs {display:grid !important;}
.mtlp-shell .mtlp-back-to-top {
 position:fixed; z-index:1100; right:14px; bottom:18px; width:38px; height:38px;
 display:flex; align-items:center; justify-content:center; border:0; border-radius:11px;
 color:#fff; background:var(--karen-primary,#087c67); box-shadow:0 3px 12px rgba(0,0,0,.18);
 cursor:pointer; opacity:.93; transition:transform .15s,opacity .15s;
}
.mtlp-shell .mtlp-back-to-top[hidden] {display:none !important;}
.mtlp-shell .mtlp-back-to-top:hover {transform:translateY(-2px); opacity:1; background:var(--karen-complementary,var(--karen-primary,#087c67));}
.mtlp-shell .mtlp-back-to-top i {color:#fff !important; font-size:16px;}
@media (min-width:1200px) {
 body.mtlp-sticky-visible .mtlp-shell .mtlp-sticky-basket-slot .basket-preview-wrap {
  position:absolute !important; top:calc(100% + 8px) !important; left:0 !important; right:auto !important;
  bottom:auto !important; width:380px !important; max-width:min(380px,94vw) !important;
  max-height:calc(100dvh - 85px); overflow-y:auto;
 }
}
@media (max-width:1199px) {
 .mtlp-shell .mtlp-sticky-inner {
  min-height:60px; padding:0 5px; display:grid; direction:rtl;
  grid-template-areas:none; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; align-items:stretch;
 }
 .mtlp-shell .mtlp-sticky-inner:has(.mtlp-sticky-custom-order:not([hidden])) {grid-template-columns:repeat(5,minmax(0,1fr));}
 .mtlp-shell .mtlp-sticky-tools {display:contents;}
 .mtlp-shell .mtlp-sticky-menu {grid-area:auto; width:100%; justify-self:stretch;}
 .mtlp-shell .mtlp-sticky-search-area {grid-area:auto; position:static; width:100%; max-width:none; justify-self:stretch;}
 .mtlp-shell .mtlp-sticky-search-button {display:flex; width:100%;}
 .mtlp-shell .mtlp-sticky-action {width:100%; min-width:0; min-height:60px; padding:5px 1px; gap:4px; font-size:10px !important;}
 .mtlp-shell .mtlp-sticky-action > span {font-size:10.5px !important;}
 .mtlp-shell .mtlp-sticky-action i {font-size:23px;}
 .mtlp-shell .mtlp-sticky-tools .mtlp-sticky-account {width:100%; min-width:0;}
 .mtlp-shell .mtlp-sticky-custom-order:not([hidden]) {width:100%; min-width:0; display:flex;}
 .mtlp-shell .mtlp-sticky-custom-order .mtlp-utility-glyph {font-size:24px !important;}
 .mtlp-shell .mtlp-sticky-basket-slot {width:100%; min-width:0; height:60px; display:flex; align-items:center; justify-content:center;}
 .mtlp-shell .mtlp-sticky-basket-slot .mtlp-basket-host {width:100% !important; min-width:0 !important; height:60px;}
 .mtlp-shell .mtlp-sticky-basket-slot .btn-show-basket {width:100% !important; min-width:0 !important; height:60px !important; min-height:60px !important; padding:5px 0 !important;}
 .mtlp-shell .mtlp-sticky-basket-slot .btn-show-basket:before {font-size:23px !important;}
 .mtlp-shell .mtlp-sticky-basket-slot .btn-show-basket:after {font-size:10.5px !important;}
 .mtlp-shell .mtlp-sticky-search-panel:not([hidden]) {
  position:absolute; top:100%; left:0; right:0; width:100%; box-sizing:border-box;
  display:flex; align-items:center; padding:10px 18px 14px;
  background:var(--karen-primary,#087c67) !important; border:0; border-radius:0 0 13px 13px;
  box-shadow:0 12px 24px rgba(0,0,0,.16); direction:rtl;
 }
 .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search {display:block !important; width:100% !important; max-width:none !important;}
 .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search > div.js__header-search-box {min-height:52px;}
 .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search input {height:52px !important; font-size:15px !important;}
 .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search .search-box__btn-search {height:52px !important;}
 body.mtlp-sticky-visible .mtlp-shell .mtlp-sticky-basket-slot .basket-preview-wrap {
  position:fixed !important; top:calc(var(--mtlp-bar-height,60px) + 6px) !important;
  left:10px !important; right:10px !important; bottom:auto !important; width:auto !important;
  max-width:none !important; max-height:calc(100dvh - var(--mtlp-bar-height,60px) - 16px);
  overflow-y:auto; z-index:1250 !important;
 }
}
@media (max-width:767px) {
 .mtlp-shell .mtlp-back-to-top {right:10px; bottom:76px; width:36px; height:36px; border-radius:10px;}
}
/* Product floating tabs sit *under* the compact bar, not behind it. */
body.mtlp-sticky-visible .mtlp-shell .karen-product-detail-v2 .kpd-section-nav {
 top:calc(var(--mtlp-bar-height,60px) + 6px) !important;
 scroll-margin-top:calc(var(--mtlp-bar-height,60px) + 6px);
}
body.mtlp-sticky-visible .mtlp-shell .karen-product-detail-v2 .kpd-related {top:calc(var(--mtlp-bar-height,60px) + 15px) !important;}
body.mtlp-sticky-visible .mtlp-shell .farashop__product-details .product-details__tab .wi-tab-header {top:calc(var(--mtlp-bar-height,60px) + 6px) !important;}
body.mtlp-sticky-visible .mtlp-shell .farashop__product-details :is(.sticky-wrapper,.product-details__sticky-tabs,.product-details__tab-sticky) {top:calc(var(--mtlp-bar-height,60px) + 6px) !important;}
body.mtlp-sticky-visible .mtlp-shell .karen-product-detail-v2 .js__kpd-section {scroll-margin-top:calc(var(--mtlp-bar-height,60px) + 82px) !important;}

/* User-requested: no "cart updated" success toast; native cart access still works. */
.mtlp-shell .mtlp-basket-host .js__farashop__notify {display:none !important;}
/* Only product list/category and keyword result pagination buttons are themed. Restore default "بیشتر بخوانید". */
.mtlp-shell :is(.products-list__load-more .js__products-list-load-more,.farashop__search-load-more-button) {
 display:inline-flex !important; align-items:center; justify-content:center;
 background:var(--karen-primary,#087c67) !important; border:1px solid var(--karen-primary,#087c67) !important;
 border-radius:9px !important; padding:11px 22px !important; min-height:44px;
 color:#fff !important; font-family:inherit !important; font-size:14px !important; font-weight:400 !important;
 line-height:1.6 !important; text-align:center !important; text-decoration:none !important; cursor:pointer;
 box-shadow:0 3px 10px rgba(0,0,0,.08); transition:filter .2s,box-shadow .2s,transform .2s;
}
.mtlp-shell :is(.products-list__load-more .js__products-list-load-more,.farashop__search-load-more-button):hover,
.mtlp-shell :is(.products-list__load-more .js__products-list-load-more,.farashop__search-load-more-button):focus-visible {
 background:var(--karen-primary,#087c67) !important; border-color:var(--karen-primary,#087c67) !important;
 color:#fff !important; filter:brightness(.87); box-shadow:0 5px 14px rgba(0,0,0,.14);
}
.mtlp-shell .products-list__load-more .js__products-list-load-more[disabled] {opacity:.62; cursor:wait;}
@media(prefers-reduced-motion:reduce) {.mtlp-shell .mtlp-back-to-top,.mtlp-shell .mtlp-sticky-action {transition:none !important;}}


/* HOTFIX9 — targeted fixes after live validation (MrTehranLitePlus only). */
/* Remove legacy orange separator strokes from the shared menu drawer. */
.mtlp-shell .mtlp-mobile-menu-slot .mtlp-main-menu > li,
.mtlp-shell .mtlp-mobile-menu-slot .mtlp-main-menu > li > a {
  border-left:0 !important;
  border-right:0 !important;
  box-shadow:none !important;
}
.mtlp-shell .mtlp-mobile-menu-slot .mtlp-main-menu > li:before,
.mtlp-shell .mtlp-mobile-menu-slot .mtlp-main-menu > li:after,
.mtlp-shell .mtlp-mobile-menu-slot .mtlp-main-menu > li > a:before,
.mtlp-shell .mtlp-mobile-menu-slot .mtlp-main-menu > li > a:after {
  content:none !important;
  display:none !important;
}
/* Cart badge is an overlay; it must not affect the basket icon and label alignment. */
.mtlp-shell .mtlp-sticky-basket-slot,
.mtlp-shell .mtlp-sticky-basket-slot .mtlp-basket-host {
  position:relative !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  align-items:center !important;
  overflow:visible !important;
}
.mtlp-shell .mtlp-sticky-basket-slot .btn-show-basket {
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  align-items:center !important;
  flex:0 0 auto !important;
}
.mtlp-shell .mtlp-sticky-basket-slot .mtlp-basket-count {
  position:absolute !important;
  flex:none !important;
  top:0 !important;
  right:8px !important;
  margin:0 !important;
  transform:none !important;
}
/* Compact desktop search gets clear breathing space and the native-sized icon. */
@media(min-width:1200px) {
  .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search > div.js__header-search-box {min-height:38px !important; height:38px !important;}
  .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search input {height:38px !important;}
  .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search .search-box__btn-search {height:38px !important; padding:6px 12px !important;}
  .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search .search-box__btn-search i {font-size:17px !important;}
}
/* Mobile search typography and magnifier are the same scale as the original mobile header. */
@media(max-width:1199px) {
  .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search input {font-size:13px !important; font-weight:400 !important;}
  .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search input::placeholder {font-size:13px !important; font-weight:400 !important;}
  .mtlp-shell .mtlp-sticky-search-slot .mtlp-header-search .search-box__btn-search i {font-size:17px !important;}
  .mtlp-shell .mtlp-sticky-basket-slot .mtlp-basket-count {right:calc(50% - 23px) !important; top:1px !important;}
}

/* HOTFIX12 — basket badge anchored to the icon's upper-right edge.
   Do not centre the badge over the glyph. Anchor from physical LEFT so
   two-digit counts grow outward, not across the basket graphic.
   Both native header and the reparented sticky basket use this rule. */
.mtlp-shell .mtlp-header-actions .mtlp-basket-host .mtlp-basket-count,
.mtlp-shell .mtlp-sticky-basket-slot .mtlp-basket-host .mtlp-basket-count {
  position: absolute !important;
  top: 0 !important;
  left: calc(50% + 8px) !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 8 !important;
  pointer-events: none !important;
}
/* HOTFIX13: in the 52px desktop sticky bar, align the 20px badge with the
   icon corner while keeping its whole circle inside the header's top edge.
   Native header and mobile sticky badge remain unchanged. */
@media screen and (min-width:1200px) {
  .mtlp-shell .mtlp-sticky-basket-slot .mtlp-basket-host .mtlp-basket-count {
    top: 14px !important;
  }
}
