.mh-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 5, 5, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.mh-lightbox[hidden] { display: none; }
.mh-lightbox__dialog {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 72rem);
  height: min(100%, 48rem);
}
.mh-lightbox__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: .75rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}
.mh-lightbox__button {
  position: absolute;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 9999px;
  background: rgba(15,15,16,.8);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  transition: background .2s ease;
}
.mh-lightbox__button:hover { background: #dc2626; }
.mh-lightbox__close { top: .5rem; right: .5rem; font-size: 1.5rem; }
.mh-lightbox__previous { left: .5rem; top: 50%; transform: translateY(-50%); }
.mh-lightbox__next { right: .5rem; top: 50%; transform: translateY(-50%); }
body.mh-lightbox-open { overflow: hidden; }
/* Shared header actions + drawers (from homepage) */
.mh-product-card__media {
  position: relative;
  display: block;
}

.mh-product-card__media > .mh-fav-toggle {
  position: absolute;
  top: auto;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  line-height: 0;
  text-decoration: none;
  cursor: var(--cursor-click);
  pointer-events: auto;
  transition: transform .2s ease, color .2s ease;
}

.mh-product-card__media > .mh-fav-toggle:hover {
  transform: scale(1.08);
  color: #fff;
}

.mh-product-card__media > .mh-fav-toggle[aria-pressed="true"] {
  color: #ef4444;
}

.mh-product-card__media > .mh-fav-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .65));
}

.mh-fav-toggle {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f4f4f5;
  line-height: 0;
  text-decoration: none;
  cursor: var(--cursor-click);
  transition: transform .2s ease, color .2s ease;
}

.mh-fav-toggle:hover {
  color: #fff;
}

.mh-fav-toggle svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55));
}

.mh-fav-toggle[aria-pressed="true"] {
  color: #ef4444;
}

.header-action-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e4e4e7;
  line-height: 0;
  cursor: var(--cursor-click);
  transition: color .2s ease;
}

.header-action-btn:hover {
  background: transparent;
  color: #fff;
}

.header-action-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
}

.header-action-btn[aria-label="Количка"] svg {
  width: 26px;
  height: 26px;
}

.header-action-count {
  position: absolute;
  top: calc(50% - 12px);
  right: calc(50% - 12px);
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  transform: translate(45%, -45%);
}

.header-action-count.hidden {
  display: none !important;
}

@media (max-width: 1023px) {
  .header-action-btn {
    width: 28px;
    height: 34px;
  }

  .header-action-btn svg {
    width: 20px;
    height: 20px;
  }

  .header-action-btn[aria-label="Количка"] svg {
    width: 22px;
    height: 22px;
  }

  .header-action-count {
    top: calc(50% - 10px);
    right: calc(50% - 10px);
    min-width: 14px;
    height: 14px;
    transform: translate(40%, -40%);
  }
}

.mh-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  visibility: hidden;
}

.mh-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.mh-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 8, .58);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0;
  transition: opacity .28s ease;
}

.mh-drawer.is-open .mh-drawer__backdrop {
  opacity: 1;
}

.mh-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 80vw);
  height: 100%;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, #1a1b1d 0%, #121314 100%);
  box-shadow: -18px 0 48px rgba(0, 0, 0, .45);
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}

.mh-drawer.is-open .mh-drawer__panel {
  transform: translateX(0);
}

.mh-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mh-drawer__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}

.mh-drawer__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9999px;
  background: rgba(255, 255, 255, .05);
  color: #e4e4e7;
  cursor: var(--cursor-click);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.mh-drawer__close:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
}

.mh-drawer__close svg {
  width: 16px;
  height: 16px;
  display: block;
}

.mh-drawer__body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px 18px;
}

.mh-drawer__empty {
  margin: 0;
  padding: 28px 12px;
  text-align: center;
  color: #a1a1aa;
  font-size: .875rem;
  line-height: 1.5;
}

.mh-profile-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mh-profile-menu__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: #18191b;
  color: #fff;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.mh-profile-menu__link:hover {
  border-color: rgba(239, 68, 68, .45);
  background: rgba(239, 68, 68, .08);
}

.mh-profile-menu__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #a1a1aa;
}

.mh-profile-menu__link:hover .mh-profile-menu__icon {
  color: #f87171;
}

.mh-profile-menu__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mh-profile-menu__link span {
  font-size: .875rem;
  font-weight: 600;
}

.mh-profile-menu__link--muted {
  color: #a1a1aa;
}

.mh-profile-menu__link--muted:hover {
  color: #fff;
}

.mh-fav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mh-fav-list__item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: #18191b;
}

.mh-fav-list__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #09090b;
}

.mh-fav-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mh-fav-list__meta {
  min-width: 0;
}

.mh-fav-list__title {
  margin: 0;
  font-size: .8125rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.mh-fav-list__title a {
  color: inherit;
  text-decoration: none;
}

.mh-fav-list__title a:hover {
  color: #f87171;
}

.mh-fav-list__price {
  margin: 6px 0 0;
  font-size: .75rem;
  color: #ef4444;
  font-weight: 700;
}

.mh-fav-list__price del {
  display: block;
  margin: 0;
  color: #71717a;
  font-weight: 500;
}

.mh-fav-list__price ins {
  display: block;
  margin: .15rem 0 0;
  color: #ef4444;
  font-weight: 700;
  text-decoration: none;
}

.mh-cart-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mh-cart-list__item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: #18191b;
}

.mh-cart-list__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #09090b;
}

.mh-cart-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mh-cart-list__meta {
  min-width: 0;
}

.mh-cart-list__title {
  margin: 0;
  font-size: .8125rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.mh-cart-list__title a {
  color: inherit;
  text-decoration: none;
}

.mh-cart-list__title a:hover {
  color: #f87171;
}

.mh-cart-list__badge {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(220, 38, 38, .18);
  color: #f87171;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mh-cart-list__detail {
  margin: 5px 0 0;
  font-size: .6875rem;
  color: #71717a;
}

.mh-cart-list__price {
  margin: 0;
  text-align: right;
  font-size: .8125rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.mh-cart-list__price--sale {
  color: #f87171;
}

.mh-cart-list__price del {
  display: block;
  margin-top: 2px;
  color: #71717a;
  font-size: .6875rem;
  font-weight: 500;
}

.mh-cart-list__remove {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #71717a;
  font-size: .6875rem;
  cursor: var(--cursor-click);
}

.mh-cart-list__remove:hover {
  color: #f87171;
}

.mh-cart-breakdown {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.mh-cart-breakdown__title {
  margin: 0 0 10px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}

.mh-cart-breakdown__rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mh-cart-breakdown__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .75rem;
}

.mh-cart-breakdown__row dt {
  color: #a1a1aa;
}

.mh-cart-breakdown__row dd {
  margin: 0;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.mh-cart-breakdown__row--discount dd {
  color: #34d399;
}

.mh-cart-breakdown__row--total {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .875rem;
}

.mh-cart-breakdown__row--total dt,
.mh-cart-breakdown__row--total dd {
  color: #fff;
  font-weight: 700;
}

.mh-drawer__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.mh-drawer__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 16px;
  border-radius: 9999px;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.mh-drawer__btn--primary {
  border: 0;
  background: #dc2626;
  color: #fff;
}

.mh-drawer__btn--primary:hover {
  background: #ef4444;
}

.mh-drawer__btn--ghost {
  border: 1px solid rgba(255, 255, 255, .12);
  background: transparent;
  color: #e4e4e7;
}

.mh-drawer__btn--ghost:hover {
  border-color: rgba(255, 255, 255, .25);
  color: #fff;
}

.mh-fav-list__all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  padding: 11px 16px;
  border: 0;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease;
}

.mh-fav-list__all:hover {
  background: #ef4444;
  color: #fff;
}

.mh-fav-list__all[hidden] {
  display: none !important;
}

header.site-header {
  z-index: 90;
  overflow: visible;
}

body.mh-drawer-open {
  overflow: hidden;
}

.mh-drawer .woocommerce-mini-cart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mh-drawer .woocommerce-mini-cart-item {
  position: relative;
  min-height: 82px;
  padding: 8px 34px 8px 82px !important;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: #18191b;
  color: #fff;
  font-size: .8125rem;
  line-height: 1.35;
}

.mh-drawer .woocommerce-mini-cart-item > a:not(.remove) {
  display: block;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.mh-drawer .woocommerce-mini-cart-item img {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 64px;
  height: 64px;
  margin: 0;
  border-radius: 10px;
  object-fit: cover;
  background: #09090b;
}

.mh-drawer .woocommerce-mini-cart-item .remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #71717a !important;
  line-height: 1;
  text-decoration: none;
}

.mh-drawer .woocommerce-mini-cart-item .remove:hover {
  background: rgba(239,68,68,.12);
  color: #f87171 !important;
}

.mh-drawer .woocommerce-mini-cart-item .quantity {
  display: block;
  margin-top: 6px;
  color: #f87171;
  font-size: .75rem;
  font-weight: 700;
}

.mh-drawer .woocommerce-mini-cart__total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #fff;
}

.mh-drawer .woocommerce-mini-cart__buttons {
  display: none;
}

.mh-drawer .woocommerce-mini-cart__empty-message {
  margin: 0;
  padding: 28px 12px;
  color: #a1a1aa;
  font-size: .875rem;
  text-align: center;
}

/* Favourites confirmation toast */
.mh-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 12000;
  display: flex;
  align-items: center;
  gap: .55rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: .7rem 1rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9999px;
  background: rgba(24, 25, 27, .96);
  color: #f4f4f5;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  transform: translate(-50%, calc(100% + 1.5rem));
  opacity: 0;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .22s ease;
}

.mh-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.mh-toast__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #ef4444;
}

.mh-toast__icon svg {
  width: 1rem;
  height: 1rem;
  display: block;
  overflow: visible;
}

.mh-toast__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .mh-toast {
    transition: opacity .15s ease;
    transform: translate(-50%, 0);
  }
}
