/*
  Hermes Header (Roocket-style) + Day/Night theme
  - Uses html/body classes: hms-theme-day | hms-theme-night
  - Toggle handled by assets/js/hms-theme.js
*/

:root{
  --hm-header-radius: 16px;
  --hm-header-shadow: 0 18px 50px rgba(0,0,0,.22);
}

/* Day palette (from reference screenshots) */
html.hms-theme-day{
  --hm-card-bg:#ffffff;
  --hm-text:#0f172a;
    --hm-logo-color:#5055be; /* NEW */
  --hm-muted:#64748b;
  --hm-border:rgba(15,23,42,.10);
  --hm-search-bg:#edeeef;
  --hm-search-text:#0f172a;
  --hm-placeholder:rgba(15,23,42,.55);
  --hm-icon:rgba(15,23,42,.78);
  --hm-nav-bg:#d2d6de;
  --hm-nav-text:rgba(15,23,42,.70);
  --hm-primary:#3b83f6;
  --hm-secondary-bg:#ecf2fe;
  --hm-toggle-bg:#ffffff;
  --hm-toggle-border:rgba(15,23,42,.12);
  --hm-dropdown-bg:#ffffff;
  --hm-dropdown-border:rgba(15,23,42,.10);
  --hm-dropdown-hover:rgba(15,23,42,.05);
  --hm-logo-color:#5055be;
  --hm-text-menu: #fff;
  --hm-text-child-menu: #677489;
  --hm-logo-mobile: #5055be;
   --hm-search: #515962cc;
    

}

/* Night palette (from reference screenshots) */
html.hms-theme-night{
  --hm-card-bg:#0d2438;
    --hm-logo-color:#ffffff;
--hm-logo-color:#ffffff; /* NEW */
  --hm-text:#ffffff;
  --hm-muted:rgba(255,255,255,.72);
  --hm-border:rgba(255,255,255,.10);
  --hm-search-bg:#1b324c;
  --hm-search-text:#ffffff;
  --hm-placeholder:rgba(255,255,255,.65);
  --hm-icon:rgba(255,255,255,.92);
  --hm-nav-bg:#0b253e;
  --hm-nav-text:rgba(255,255,255,.90);
  --hm-primary:#3b83f6;
  --hm-secondary-bg:#122e4b;
  --hm-toggle-bg:#d7dee6;
  --hm-toggle-border:rgba(255,255,255,.18);
  --hm-dropdown-bg:#0f2b45;
  --hm-dropdown-border:rgba(255,255,255,.12);
  --hm-dropdown-hover:rgba(255,255,255,.06);
}
/* Lock header palette inside the header so body/theme CSS cannot override it */
html.hms-theme-day #siteHead.hm-sitehead{
  --hm-card-bg:#ffffff;
  --hm-text:#0f172a;
  --hm-logo-color:#5055be;
  --hm-muted:#64748b;
  --hm-border:rgba(15,23,42,.10);
  --hm-search-bg:#edeeef;
  --hm-search-text:#0f172a;
  --hm-placeholder:rgba(15,23,42,.55);
  --hm-icon:rgba(15,23,42,.78);
  --hm-nav-bg:#d2d6de;
  --hm-nav-text:rgba(15,23,42,.70);
  --hm-primary:#3b83f6;
  --hm-secondary-bg:#ecf2fe;
  --hm-toggle-bg:#ffffff;
  --hm-toggle-border:rgba(15,23,42,.12);
  --hm-dropdown-bg:#ffffff;
  --hm-dropdown-border:rgba(15,23,42,.10);
  --hm-dropdown-hover:rgba(15,23,42,.05);
  --hm-text-menu:#fff;
  --hm-text-child-menu:#677489;
  --hm-logo-mobile:#5055be;
  --hm-search:#515962cc;
}

html.hms-theme-night #siteHead.hm-sitehead{
  --hm-card-bg:#0d2438;
  --hm-logo-color:#ffffff;
  --hm-text:#ffffff;
  --hm-muted:rgba(255,255,255,.72);
  --hm-border:rgba(255,255,255,.10);
  --hm-search-bg:#1b324c;
  --hm-search-text:#ffffff;
  --hm-placeholder:rgba(255,255,255,.65);
  --hm-icon:rgba(255,255,255,.92);
  --hm-nav-bg:#0b253e;
  --hm-nav-text:rgba(255,255,255,.90);
  --hm-primary:#3b83f6;
  --hm-secondary-bg:#122e4b;
  --hm-toggle-bg:#d7dee6;
  --hm-toggle-border:rgba(255,255,255,.18);
  --hm-dropdown-bg:#0f2b45;
  --hm-dropdown-border:rgba(255,255,255,.12);
  --hm-dropdown-hover:rgba(255,255,255,.06);
}

/* Header wrapper */
#siteHead.hm-sitehead{
  margin-top:18px;
  margin-bottom:22px;
  color: var(--hm-text);
  isolation: isolate;

  position: relative;
  z-index: 9999; /* ensure header overlays page content */
}


/* Click-to-open dropdowns (no hover) */
#siteHead.hm-sitehead .hm-menu li.is-open > ul{display:block;}
#siteHead.hm-sitehead .hm-menu li.is-open > .hm-mega-panel{display:block;}

/* Top bar (logo + search + actions) */
#siteHead.hm-sitehead .hm-topbar{
  background:var(--hm-card-bg);
  border-radius:var(--hm-header-radius);
      box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  padding:30px 22px;
}
/* SVG logo color: use currentColor so day/night can control it consistently */
html.hms-theme-day .hm-brand{ color:#5055be; }
html.hms-theme-night .hm-brand{ color:#ffffff; }

.hm-brand svg,
.hm-brand svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}

#siteHead.hm-sitehead .hm-topbar-inner{
  display:flex;
  align-items:center;
  gap:120px;
}

#siteHead.hm-sitehead .hm-logo{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex:0 0 auto;
}

#siteHead.hm-sitehead .hm-actions{
display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    flex-direction: row-reverse;
}

#siteHead.hm-sitehead .hm-logo .custom-logo-link img,
#siteHead.hm-sitehead .hm-logo img{
  max-height:46px;
  width:auto;
}
/* Logo color (inline SVG inherits currentColor) */
#siteHead.hm-sitehead .hm-logo-full,
#siteHead.hm-sitehead .hm-logo-link,
#siteHead.hm-sitehead .hm-logo-fallback{
  color: var(--hm-logo-color);
}


#siteHead.hm-sitehead .hm-logo-svg svg{
  height:46px;
  width:auto;
  display:block;
}

/* Force monochrome (override internal SVG styles too) */
#siteHead.hm-sitehead .hm-logo-svg svg,
#siteHead.hm-sitehead .hm-logo-svg svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Logo color control (works because logo SVG is now inline) */
#siteHead.hm-sitehead .hm-logo-full{ color:var(--hm-logo-color); }

#siteHead.hm-sitehead .hm-logo-full .hm-logo-svg svg{
  height:46px;
  width:auto;
  display:block;
}

#siteHead.hm-sitehead .hm-logo-full .hm-logo-svg svg,
#siteHead.hm-sitehead .hm-logo-full .hm-logo-svg svg *{
  fill:currentColor !important;
  stroke:currentColor !important;
}

/* Day/Night logo switch (SVG as <img>) */
#siteHead .hm-logo-full .hm-logo-day,
#siteHead .hm-logo-full .hm-logo-night{
  display:none;
  height:44px;
  width:auto;
}

/* Day */
html.hms-theme-day #siteHead .hm-logo-full .hm-logo-day{ display:block; }

/* Night */
html.hms-theme-night #siteHead .hm-logo-full .hm-logo-night{ display:block; }

/* Optional: slightly smaller on mobile */
@media (max-width: 575.98px){
  #siteHead .hm-logo-full .hm-logo-day,
  #siteHead .hm-logo-full .hm-logo-night{
    height:36px;
  }
  #siteHead.hm-sitehead .mini-cart-box #minicart-content, #siteHead.hm-sitehead .mini-cart-box #minicart-content.collapsing {
    position: absolute;
    top: inherit !important;}
}

/* Search */
#siteHead.hm-sitehead .hm-search{flex:1 1 auto;}
#siteHead.hm-sitehead .hm-search-form{width:100%;max-width:880px;margin:0 auto;}
#siteHead.hm-sitehead .hm-search-input-wrap{position:relative;border-radius:16px;overflow:hidden;}
#siteHead.hm-sitehead .hm-search-input{
    width: 100%;
    height: 54px;
    font-size: 13px;
    font-weight: 200;
    border-radius: 16px;
    background: var(--hm-search-bg);
    border: 1px solid transparent;
    padding: 0 40px 0 56px;
    color: var(--hm-search-text);
    outline: 0;
    direction: rtl;
    text-align: right;
    transition: border-color .15s ease, box-shadow .15s ease;
}
#siteHead.hm-sitehead .hm-search-input::placeholder{color:var(--hm-placeholder);}
#siteHead.hm-sitehead .hm-search-input:focus{border-color:rgba(59,131,246,.55);box-shadow:0 0 0 4px rgba(59,131,246,.12);}

#siteHead.hm-sitehead .hm-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--hm-search);
}

/* Buttons */
#siteHead.hm-sitehead .hm-btn{
  height:44px;
  padding:0 14px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:500;
  text-decoration:none;
  border:1px solid transparent;
  line-height:1;
  white-space:nowrap;
}

#siteHead.hm-sitehead .hm-btn-primary{background:var(--hm-primary);color:#ffffff;}
#siteHead.hm-sitehead .hm-btn-primary:hover{filter:brightness(.96);}

#siteHead.hm-sitehead .hm-btn-secondary{background:var(--hm-secondary-bg);color:var(--hm-primary);}
#siteHead.hm-sitehead .hm-btn-secondary:hover{filter:brightness(.98);}

#siteHead.hm-sitehead .hm-btn svg{width:24px;height:24px;}

/* Theme toggle */
#siteHead.hm-sitehead .hm-theme-toggle{
    text-decoration: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    background: var(--hm-search-bg);
    align-items: center;
    border: 0px;
    justify-content: center;
   color: var(--hm-icon);

}
html.hms-theme-night #siteHead.hm-sitehead .hm-theme-toggle{color: var(--hm-icon);} /* night: white icon */

#siteHead.hm-sitehead .hm-theme-toggle svg{width:22px;height:22px;}
html.hms-theme-day #siteHead.hm-sitehead .hm-theme-toggle .hm-ico-moon{display:none;}
html.hms-theme-night #siteHead.hm-sitehead .hm-theme-toggle .hm-ico-sun{display:none;}

/* Make legacy link buttons follow header palette */
#siteHead.hm-sitehead .btn.btn-link{ 
    text-decoration: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    background: var(--hm-search-bg);
    align-items: center;
    justify-content: center;
    color: var(--hm-icon);
}
#siteHead.hm-sitehead .btn.btn-link:hover{opacity:.9;}

/* Bottom navigation bar (smaller, bottom radius only) */
#siteHead.hm-sitehead .hm-menubar{
  background:#5055be;
  width:calc(100% - 56px);
  margin:0px auto 0;
  border-radius:0 0 calc(var(--hm-header-radius) - -8px) calc(var(--hm-header-radius) - -8px);
  padding:12px 18px;
  box-shadow:0 18px 50px rgba(0,0,0,.12);
  display:flex;
  justify-content:center;
}
/* Night mode: menubar background */
html.hms-theme-night #siteHead.hm-sitehead .hm-menubar{
  background:#0c243f;
}


#siteHead.hm-sitehead .hm-menu{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:34px;
}

#siteHead.hm-sitehead .hm-menu ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}

#siteHead.hm-sitehead .hm-menu a,
#siteHead.hm-sitehead .hm-menu .hm-menu-toggle{
color: var(--hm-text-menu);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 8px 2px;
    display: inline-flex;
    gap: 8px;
    align-items: flex-start;
}
/* Dark/Night mode: menu link color */
html.hms-theme-night #siteHead.hm-sitehead .hm-menu a,
html.hms-theme-night #siteHead.hm-sitehead .hm-menu .hm-menu-toggle{
  color:#fff;
}
/* Click-to-open dropdowns (no hover) */
#siteHead.hm-sitehead .hm-menu li.is-open > ul{display:block;}
#siteHead.hm-sitehead .hm-menu li.is-open > .hm-mega-panel{display:block;margin-top: 10px;}


#siteHead.hm-sitehead .hm-menu a:hover{opacity:.95;}

#siteHead.hm-sitehead .hm-menu li{position:relative;}

/* Caret for dropdowns */
#siteHead.hm-sitehead .hm-menu li.menu-item-has-children > a:after,
#siteHead.hm-sitehead .hm-menu .cat-menu > li > a:after{
  content:"";
  width:10px;
  height:10px;
  border-left:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(-45deg);
  opacity:.9;
  margin-left:6px;
}

/* Dropdown panel */
#siteHead.hm-sitehead .hm-menu li ul{
  display:none;
  position:absolute;
  top:calc(100% + 12px);
  right:0;
  min-width:220px;
  background:var(--hm-dropdown-bg);
  border:1px solid var(--hm-dropdown-border);
  border-radius:14px;
  padding:8px;
  box-shadow:0 14px 34px rgba(0,0,0,.18);
  z-index:999;
}

/* Open dropdown on click (JS toggles .is-open) */
#siteHead.hm-sitehead .hm-menu li.is-open > ul{display:block;}

/* rotate caret when open */
#siteHead.hm-sitehead .hm-menu li.menu-item-has-children.is-open > a:after{
  transform:rotate(135deg);
}


#siteHead.hm-sitehead .hm-menu li ul li{width:100%;}
#siteHead.hm-sitehead .hm-menu li ul li a{
  width:100%;
  justify-content:flex-start;
  font-size:15px;
  font-weight:600;
  padding:10px 12px;
  border-radius:10px;
    color:var(--hm-text-child-menu);
   
}
#siteHead.hm-sitehead .hm-menu li ul li a:hover{background:var(--hm-dropdown-hover);}

/* Improve dropdown legibility on night */
html.hms-theme-night #siteHead.hm-sitehead .hm-menu li ul li a{color:rgba(255,255,255,.92);}

/* Responsive */
/* Tablet + Mobile (everything below XL): keep header in a single row (no menubar row) */
@media (max-width: 1399.98px){
  #siteHead.hm-sitehead .hm-topbar{padding:14px 14px;}
  #siteHead.hm-sitehead .hm-menubar{display:none;}

  /* Mobile/Tablet layout: actions (left) | logo (center) | burger (right) */
  #siteHead.hm-sitehead .hm-topbar-inner{
           display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        position: relative;
        gap: 12px;
        flex-direction: row-reverse;
  }
.hm-actions .hm-notif,
  .hm-actions .hm-notif-btn,
  .hm-actions .hm-notification,
  .hm-actions .hm-notifications,
  .hm-actions .hm-bell,
  .hm-actions .notification,
  .hm-actions [aria-label*="Ø§Ø¹Ù„Ø§Ù†"],
  .hm-actions [title*="Ø§Ø¹Ù„Ø§Ù†"],
  .hm-actions a[href*="notification"],
  .hm-actions a[href*="notifications"],
  .hm-actions a[href*="notice"]{
    display:none !important;
  }
  .avatar-mob {
    left: 10px;
}
  #siteHead.hm-sitehead .hm-search{display:none;}

  #siteHead.hm-sitehead .hm-actions{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    flex-direction: row-reverse;
  }

  #siteHead.hm-sitehead .hm-logo{
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events:auto;
  }

  #siteHead.hm-sitehead .hm-logo-mobile{
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
  }
  #siteHead.hm-sitehead .hm-logo-mobile img{height:34px;width:auto;display:block;}
  #siteHead.hm-sitehead .hm-logo-fallback{font-weight:700;font-size:16px;fill:var(--hm-logo-mobile);}
  html.hms-theme-night #siteHead.hm-sitehead .hm-logo-fallback{fill:var(--e-a-color-txt-invert);}

  #siteHead.hm-sitehead .hm-burger{
    flex:0 0 auto;
    justify-self:end;
  }
  html.hms-theme-night #siteHead.hm-sitehead .hm-burger{
    background:rgba(255,255,255,.06);
    color:rgba(255,255,255,.92);
  }

  /* Hide theme toggle on mobile/tablet (like reference) */
  #siteHead.hm-sitehead .hm-theme-toggle{display:none !important;}

  /* Icon-only login button on XS */
  #siteHead.hm-sitehead .hm-btn-secondary.d-sm-none{
   width: 60px;
        height: 40px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
  }
}


/* Profile / legacy components inside header should follow palette */
#siteHead.hm-sitehead .profile .profile-url,
#siteHead.hm-sitehead .profile .btn{
  color:var(--hm-text);
}

#siteHead.hm-sitehead .profile .profile-url{
  background:var(--hm-secondary-bg);
  
  border-radius:12px;
  height:44px;
  padding:0 12px;
}

html.hms-theme-night #siteHead.hm-sitehead .profile .profile-url{color:rgba(255,255,255,.92);}

#siteHead.hm-sitehead .hermes-profile-dropdown .hermes-profile-card{
  background:var(--hm-dropdown-bg);
  
}


/* Auth/Profile (Roocket responsive) */
#siteHead.hm-sitehead .hm-auth-btns{display:flex;align-items:center;gap:10px;}
#siteHead.hm-sitehead .hm-btn{display:inline-flex;align-items:center;justify-content:center;border-radius:14px;padding:10px 16px;font-weight:700;text-decoration:none;line-height:1;}
#siteHead.hm-sitehead .hm-btn-primary{background:var(--hm-primary);color:#fff;}
#siteHead.hm-sitehead .hm-btn-secondary{color:var(--hm-primary);}
html.hms-theme-night #siteHead.hm-sitehead .hm-btn-secondary{background:rgba(18,46,75,.95);color:rgba(255,255,255,.92);}
#siteHead.hm-sitehead .hm-login-ico{width:56px;height:56px;border-radius:16px;background:rgba(59,131,246,.10);display:inline-flex;align-items:center;justify-content:center;color:var(--hm-primary);text-decoration:none;}
#siteHead.hm-sitehead .hm-avatar-btn{border:0;background:transparent;padding:0;margin:0;display:inline-flex;align-items:center;gap:10px;color:var(--hm-text);}
#siteHead.hm-sitehead .hm-avatar{width:56px;height:56px;border-radius:16px;background:rgba(59,131,246,.10);display:inline-flex;align-items:center;justify-content:center;overflow:hidden;}
#siteHead.hm-sitehead .hm-avatar img{width:56px;height:56px;object-fit:cover;display:block;}
#siteHead.hm-sitehead .hm-avatar-label{font-weight:700;}
#siteHead.hm-sitehead .hm-account-collapse{position:absolute;left:0;top:calc(100% + 12px);z-index:9999;}
html[dir="rtl"] #siteHead.hm-sitehead .hm-account-collapse{left:auto;right:0;}
#siteHead.hm-sitehead .hm-account-card{background:var(--hm-dropdown-bg);border:1px solid var(--hm-dropdown-border);border-radius:16px;box-shadow:0 16px 40px rgba(0,0,0,.12);min-width:220px;padding:12px;}
#siteHead.hm-sitehead .hm-account-head{padding:8px 10px;border-bottom:1px solid var(--hm-dropdown-border);margin-bottom:8px;}
#siteHead.hm-sitehead .hm-account-name{font-weight:800;}
#siteHead.hm-sitehead .hm-account-links{list-style:none;margin:0;padding:0;}
#siteHead.hm-sitehead .hm-account-links li a{display:block;padding:10px 10px;border-radius:12px;color:var(--hm-text);text-decoration:none;}
#siteHead.hm-sitehead .hm-account-links li a:hover{background:var(--hm-dropdown-hover);}
/* =========================
   Night-mode fixes (header icons + profile dropdown)
   ========================= */
html.hms-theme-night #siteHead.hm-sitehead .btn.btn-link,
html.hms-theme-night #siteHead.hm-sitehead .btn.btn-link svg,
html.hms-theme-night #siteHead.hm-sitehead .mini-cart-box .cart-fragment,
html.hms-theme-night #siteHead.hm-sitehead .mini-cart-box .cart-fragment svg,
html.hms-theme-night #siteHead.hm-sitehead .hermes-header-notif-icon,
html.hms-theme-night #siteHead.hm-sitehead .hermes-header-notif-icon svg{
  color: var(--hm-icon) !important;
}

html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-dropdown{
  background: var(--hm-dropdown-bg) !important;
  border: 1px solid var(--hm-dropdown-border) !important;
}

html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-card{
  background: var(--hm-dropdown-bg) !important;
  color: rgba(255,255,255,.92) !important;
}

html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-name{
  color: rgba(255,255,255,.95) !important;
}

html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-status-left,
html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-status-right,
html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-status-label,
html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-status-text,
html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-wallet-amount{
  color: rgba(255,255,255,.80) !important;
}

html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-divider{
  border-top-color: rgba(255,255,255,.12) !important;
}

html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-menu-item{
  color: rgba(255,255,255,.92) !important;
}

html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-menu-item:hover{
  background: rgba(255,255,255,.06) !important;
  color: rgba(255,255,255,.98) !important;
}

html.hms-theme-night #siteHead.hm-sitehead .hermes-profile-menu-item.is-logout:hover{
  background: rgba(239,68,68,.15) !important;
  color: #ef4444 !important;
}
#siteHead.hm-sitehead .hm-menu a:hover {
    color: #FFC107;
}

/* ===== Hermes patch: header mini cart modal UI ===== */

/* =========================
   Mini cart modal (header)
   ========================= */

.hms-minicart-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease;

  /* باید بالاتر از منو/آواتار/مود باشد */
  z-index:10001;
}



.hms-minicart-backdrop.is-active{
  opacity:1;
  pointer-events:auto;
}

/* Make the bootstrap collapse behave like a modal */
#siteHead.hm-sitehead .mini-cart-box{
  position:relative;
}
body.hms-minicart-open #siteHead.hm-sitehead .mini-cart-box{
  z-index:10002;
}
body.hms-minicart-open #siteHead.hm-sitehead .mini-cart-box > button,
body.hms-minicart-open #siteHead.hm-sitehead .mini-cart-box .btn{
  position:relative;
  z-index:10003;
}
#siteHead.hm-sitehead .mini-cart-box #minicart-content{
  z-index:10004 !important;
}


/* Mini cart dropdown: anchored under cart icon (RTL) */
#siteHead.hm-sitehead .mini-cart-box #minicart-content, #siteHead.hm-sitehead .mini-cart-box #minicart-content.collapsing {
position: absolute;
    top: 50px;
    left: 0px;
    transform: none !important;
    width: min(390px, calc(100vw - 24px)) !important;
    overflow: auto !important;
    z-index: 10004 !important;
    border-radius: 10px !important;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .18);
    background: var(--hm-dropdown-bg, #fff) !important;
    border: 1px solid var(--hm-dropdown-border, rgba(15, 23, 42, .10)) !important;
    padding: 14px 14px 12px !important;
    transition: none !important;
    direction: rtl !important;
}
/* When mini cart is open: force profile/avatar UNDER the blur backdrop */
body.hms-minicart-open #siteHead.hm-sitehead .profile,
body.hms-minicart-open #siteHead.hm-sitehead .profile .btn,
body.hms-minicart-open #siteHead.hm-sitehead .profile .avatar-mob,
body.hms-minicart-open #siteHead.hm-sitehead .profile .avatar-mob img{
  position: relative !important;
  z-index: 0 !important;         /* must be LOWER than backdrop */
  pointer-events: none !important;/* no clicks while cart is open */
}

@media (max-width: 576px){
  #siteHead.hm-sitehead .mini-cart-box #minicart-content,
  #siteHead.hm-sitehead .mini-cart-box #minicart-content.collapsing{
    width:min(360px, calc(100vw - 18px)) !important;
    border-radius:18px !important;
    padding:12px 12px 10px !important;
  }
}

#siteHead.hm-sitehead .mini-cart-box #minicart-content .close{
  display:none !important;
}

/* Inner UI */
.hms-minicart{direction:rtl;}
.hms-minicart-head{
display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .35);
    margin-bottom: 14px;
    flex-direction: row-reverse;
}

.hms-minicart-viewcart{
display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    text-decoration: none;
    color: var(--hm-primary, #3b82f6) !important;
    font-weight: 400;
    flex-direction: row-reverse;
}
.hms-minicart-viewcart:hover{opacity:.9;}


.hms-minicart-count{
  color:rgba(100,116,139,.9);
  font-weight:400;
}

.hms-minicart-list{list-style:none;margin:0;padding:0;}

.hms-minicart-item{
border-radius: 10px;
    background: #fff;
    padding: 12px;
    margin: 0 0 12px;
    transition: background .18s ease, border-color .18s ease;
}

.hms-minicart-item-inner{
display: flex;
    gap: 15px;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: space-around;
}

.hms-minicart-remove{
  width:20px;
  height:20px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:rgba(100,116,139,.9);
  text-decoration:none;
}
.hms-minicart-remove:hover{background:rgba(239,68,68,.12);color:#ef4444;}

.hms-minicart-title{
font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    color: #334155 !important;
}
.hms-minicart-title a{color:inherit;text-decoration:none;}
.hms-minicart-title a:hover{opacity:.92;}

.hms-minicart-price{
  color:rgba(100,116,139,.9);
  font-weight:800;
  font-size:15px;
}

.hms-minicart-thumb img{
  width:70px;

  object-fit:cover;
  border-radius:5px!important;
  display:block;
  transition: transform .18s ease;
}

.hms-minicart-item:hover{
  background:rgba(59,130,246,.12);
  border-color:rgba(59,130,246,.25);
}

.hms-minicart-item:hover .hms-minicart-thumb img{
  transform: rotate(-7deg) skewX(-3deg);
}

.hms-minicart-footer{
  padding-top:6px;
}

.hms-minicart-total-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 8px;
}

.hms-minicart-total-label{
  font-weight:300;
  font-size:17px;
  color:rgba(100,116,139,.9);
}

.hms-minicart-total-value{
  font-weight:900;
  font-size:22px;
  color:rgba(15,23,42,.92);
}

.hms-minicart-checkout{
width: 100%;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(59, 130, 246, .12);
    color: var(--hm-primary, #3b82f6) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
}

.hms-minicart-checkout:hover{
  background:rgba(59,130,246,.16);
}

.hms-minicart-checkout svg{transform:scaleX(-1);} /* RTL arrow */
/* --- Mini Cart: Dark Mode tweaks --- */
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-item{
  background: transparent !important; /* remove item background in dark mode */
}

html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-title,
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-title a{
  color: #ffffff !important; /* title/link should be white */
}

html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-price{
  color: rgb(162 175 193 / 90%) !important; /* requested price color */
}
/* Trash (remove) SVG icon should be white in dark mode */
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-remove,
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-remove svg{
  color:#fff !important; /* makes currentColor strokes white */
}

/* If remove icon is not wrapped by .hms-minicart-remove, make any inline svg in items white */
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-item svg{
  color:#fff;
}

/* Cart count badge (hms-minicart-count) – ensure readable in dark mode */
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-count{
  color:#c5c5c5 !important;
}

/* Total row colors in mini cart popup */
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-total-row .hms-minicart-total-label{
  color:#fff !important;
}
/* View cart link color in dark mode */
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-viewcart,
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-viewcart a{
  color: #6db3ff !important;
}
/* Checkout button/link in mini cart should be white in dark mode */
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-checkout,
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-checkout a,
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-checkout span,
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-checkout svg{
 background: #fff !important; /* svg uses currentColor */
}

html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-total-row .hms-minicart-total-value,
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-total-row .woocommerce-Price-amount,
html.hms-theme-night #siteHead.hm-sitehead .hms-minicart-total-row .woocommerce-Price-currencySymbol{
color: rgb(250 250 250 / 90%) !important;
}


.hms-minicart-empty{
  padding:24px 8px;
  text-align:center;
  color:rgba(100,116,139,.9);
  font-weight:800;
}

@media (max-width: 576px){
  .hms-minicart-title{font-size:12px;}
  .hms-minicart-checkout{font-size:14px;height:50px;}
  .hms-minicart-item-inner{grid-template-columns:40px 1fr 86px;}
  .hms-minicart-thumb img{width:76px;height:54px;}
}
