/* Корзина (2026-11-28): боковая панель со сдвигом страницы + окно «Товар добавлен» */
:root { --mc-w: 420px; }
html { overflow-x: hidden; }
body { transition: margin .38s cubic-bezier(.2, .8, .2, 1); }
html.mc-open { overflow: hidden; }
@media (min-width: 761px) {
  html.mc-open body { margin-left: calc(var(--mc-w) * -1); margin-right: var(--mc-w); }
}

.mc-overlay {
  position: fixed; inset: 0; z-index: 2147483600; background: rgba(10, 37, 64, .35);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.mc-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 2147483601; display: flex; flex-direction: column;
  width: var(--mc-w); max-width: 100vw; background: #fff; outline: none;
  box-shadow: -24px 0 60px rgba(10, 37, 64, .2);
  transform: translateX(100%); transition: transform .38s cubic-bezier(.2, .8, .2, 1);
  font-size: 14px; color: #1f2937;
}
html.mc-open .mc-overlay { opacity: 1; visibility: visible; }
html.mc-open .mc-drawer { transform: none; }

.mc-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid #eef1f6; }
.mc-title { color: #0a2540; font-family: 'Metall Bold', 'Montserrat', sans-serif; font-size: 22px; line-height: 1.1; }
.mc-sub { margin-top: 2px; color: #8a94a6; font-size: 13px; }
.mc-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: #f3f6fa; color: #0a2540; cursor: pointer; transition: background .2s; }
.mc-close:hover { background: #e6ecf5; }

.mc-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 14px; }
.mc-item { position: relative; display: flex; gap: 12px; padding: 14px 8px; border-bottom: 1px solid #f1f4f8; transition: opacity .2s; }
.mc-item.is-busy { opacity: .6; }
.mc-item.is-removing { opacity: .3; pointer-events: none; }
.mc-item__img { flex: 0 0 72px; width: 72px; height: 72px; border: 1px solid #eef1f6; border-radius: 14px; background: #fff; overflow: hidden; }
.mc-item__img img { width: 100%; height: 100%; object-fit: contain; }
.mc-item__body { flex: 1 1 auto; min-width: 0; padding-right: 26px; }
.mc-item__name { display: -webkit-box; overflow: hidden; color: #111827 !important; font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mc-item__name:hover { color: #3d6fd6 !important; }
.mc-item__price { margin-top: 3px; color: #8a94a6; font-size: 12px; }
.mc-item__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.mc-item__sum { color: #0a2540; font-size: 15px; white-space: nowrap; }
.mc-item__del { position: absolute; top: 12px; right: 4px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: #a0a8b6; cursor: pointer; }
.mc-item__del:hover { background: #fee2e2; color: #dc2626; }
.mc-qty { display: inline-flex; align-items: center; border: 1px solid #e5eaf2; border-radius: 10px; overflow: hidden; }
.mc-qty__btn { width: 32px; height: 32px; padding: 0; border: 0; background: #f7f9fc; color: #0a2540; font-size: 16px; cursor: pointer; }
.mc-qty__btn:hover { background: #eef3ff; color: #3d6fd6; }
.mc-qty__val { min-width: 40px; color: #0a2540; font-weight: 700; text-align: center; }

.mc-empty { padding: 60px 20px; text-align: center; }
.mc-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; margin-bottom: 16px; border-radius: 50%; background: #f3f6fa; color: #8a94a6; }
.mc-empty__title { margin-bottom: 6px; color: #0a2540; font-size: 18px; font-weight: 700; }
.mc-empty__text { color: #64748b; font-size: 14px; }

.mc-foot { padding: 16px 22px 22px; border-top: 1px solid #eef1f6; background: #fbfcfe; }
.mc-total { display: flex; align-items: baseline; justify-content: space-between; }
.mc-total span { color: #64748b; font-size: 15px; }
.mc-total b { color: #0a2540; font-size: 24px; }
.mc-note { margin: 2px 0 14px; color: #8a94a6; font-size: 12px; }
.mc-checkout { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px; border-radius: 14px; background: linear-gradient(135deg, #ff8a1f, #ff6a00); color: #fff !important; font-size: 16px; font-weight: 700; text-decoration: none; box-shadow: 0 12px 28px rgba(255, 106, 0, .3); transition: transform .2s; }
.mc-checkout:hover { transform: translateY(-1px); }
.mc-continue { width: 100%; margin-top: 10px; padding: 12px; border: 1px solid #e5eaf2; border-radius: 14px; background: #fff; color: #0a2540; font-size: 14px; font-weight: 600; cursor: pointer; }
.mc-continue:hover { border-color: #3d6fd6; color: #3d6fd6; }

.mc-loading { display: flex; justify-content: center; gap: 6px; padding: 30px 0; }
.mc-loading i { width: 8px; height: 8px; border-radius: 50%; background: #3d6fd6; animation: mcDot .9s infinite ease-in-out; }
.mc-loading i:nth-child(2) { animation-delay: .15s; }
.mc-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes mcDot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }

/* ---------- окно «Товар добавлен в корзину» ---------- */
#showroom_pop_cart.added_to_cart {
  box-sizing: border-box; width: 440px; max-width: calc(100vw - 32px); padding: 30px 28px 26px;
  border-radius: 24px; background: #fff; text-align: left; font-size: 14px; color: #1f2937;
}
#showroom_pop_cart > span {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding-right: 30px;
  color: #0a2540; font-family: 'Metall Bold', 'Montserrat', sans-serif; font-size: 20px; line-height: 1.2; text-align: left;
}
#showroom_pop_cart > span::before {
  content: ''; flex: 0 0 40px; height: 40px; border-radius: 50%;
  background: #dcfce7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 20px no-repeat;
}
#showroom_pop_cart .added_cart_tovar { margin-bottom: 18px; }
.mac-prod { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid #eef1f6; border-radius: 16px; background: #fbfcfe; }
.mac-prod__img { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 12px; background: #fff; overflow: hidden; }
.mac-prod__img img { width: 100%; height: 100%; object-fit: contain; }
.mac-prod__body { min-width: 0; }
.mac-prod__name { display: block; color: #111827 !important; font-size: 15px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.mac-prod__meta { margin-top: 6px; color: #64748b; font-size: 13px; }
.mac-prod__meta b { color: #0a2540; }
.mac-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 0 4px; color: #64748b; font-size: 14px; }
.mac-total b { color: #0a2540; font-size: 20px; white-space: nowrap; }
#showroom_pop_cart .to_the_cart {
  display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 15px;
  border: 0; border-radius: 14px; background: linear-gradient(135deg, #ff8a1f, #ff6a00); color: #fff !important;
  font-size: 16px; font-weight: 700; text-decoration: none; box-shadow: 0 12px 28px rgba(255, 106, 0, .3);
}
#showroom_pop_cart .cl_added_cart {
  display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 13px;
  border: 1px solid #e5eaf2; border-radius: 14px; background: #fff; color: #0a2540; font-size: 14px; font-weight: 600; cursor: pointer;
}
#showroom_pop_cart .cl_added_cart:hover { border-color: #3d6fd6; color: #3d6fd6; }
@media (prefers-reduced-motion: reduce) {
  body, .mc-drawer, .mc-overlay { transition: none; }
}

/* закреплённая шапка едет вместе со страницей */
header.header { transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 761px) {
  html.mc-open header.header { transform: translateX(calc(var(--mc-w) * -1)); }
}
@media (min-width: 761px) {
  html.mc-open body { margin-left: calc(var(--mc-shift, var(--mc-w)) * -1); margin-right: var(--mc-shift, var(--mc-w)); }
  html.mc-open header.header { transform: translateX(calc(var(--mc-shift, var(--mc-w)) * -1)); }
}
