/* =========================================================
   The Miners — Cart popup (тёмная тема, как логин и мега-меню)
   ---------------------------------------------------------
   Все селекторы начинаются с #cart-widget (ID сильнее классов
   Shoptet). !important — только там, где Shoptet перебивает.
   display / position / top попапа не трогаем — ими управляет
   JS Shoptet.
   ========================================================= */

/* ---------- Карточка ---------- */
#cart-widget.cart-widget {
    --mn-bg: #000;
    --mn-text: #ffffff;
    --mn-muted: #a3a3a3;
    --mn-line: #5c5c5c;
    --mn-accent: #DCFF50;
    --mn-stepper: #d9d9d9;
    --mn-scrim: rgba(0, 0, 0, .45);           /* затемнение страницы под попапом */
    --mn-note-bg: rgba(255, 255, 255, .07);   /* плашка «бесплатная доставка» */
    --mn-accent-ink: var(--mn-accent);        /* акцентный текст: лайм на тёмном */
    --mn-dark: #111111;
    --mn-radius: 12px;
    --mn-radius-card: 32px;
    --mn-img: 88px;
    --mn-pad-x: 48px;

    box-sizing: border-box;
    width: 540px !important;
    max-width: calc(100vw - 32px);
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    background: var(--mn-bg) !important;
    border: 0 !important;
    border-radius: 0 0 var(--mn-radius-card) var(--mn-radius-card) !important;
    /* Затемнение страницы под открытой корзиной: огромная тень карточки,
       обрезанная clip-path по её верхнему краю — хедер остаётся ярким,
       а окно «вырастает» из него, а не висит в воздухе */
    box-shadow: 0 0 0 100vmax var(--mn-scrim) !important;
    clip-path: inset(0 -100vmax -100vmax -100vmax);
    color: var(--mn-text);
    font-size: 15px;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
}

/* Стрелочка-«хвостик» Shoptet над попапом не нужна */
#cart-widget.cart-widget::before {
    display: none !important;
}

#cart-widget *,
#cart-widget *::before,
#cart-widget *::after {
    box-sizing: border-box;
}

#cart-widget .popup-widget-inner {
    width: 100%;
    max-width: none;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 28px var(--mn-pad-x) 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* ---------- Список товаров ----------
   Если товаров много — список скроллится, кнопка остаётся видна */
#cart-widget .cart-widget-products {
    max-height: min(60vh, 520px) !important;
    margin: 0 calc(var(--mn-pad-x) * -1) !important;   /* скроллбар у края карточки */
    padding: 0 var(--mn-pad-x) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;    /* без горизонтального скролла */
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--mn-line) transparent;
}

#cart-widget .cart-widget-products::-webkit-scrollbar { width: 6px; }
#cart-widget .cart-widget-products::-webkit-scrollbar-thumb {
    background: var(--mn-line);
    border-radius: 3px;
}

#cart-widget .cart-widget-products-inner {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* На ПК Shoptet раскладывает части товара абсолютным позиционированием,
   float'ами и фикс. ширинами — из-за этого название наезжало на счётчик,
   а фото уезжало. Сбрасываем всё, раскладку целиком делает наша grid-сетка. */
#cart-widget .cart-widget-product > * {
    position: static !important;
    float: none !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    transform: none;
}

/* ---------- Товар ----------
   ┌───────┬──────────────────────┬────────┐
   │       │ NAME / вариант       │  цена  │
   │ фото  ├──────────────────────┴────────┤
   │       │                ×   [– 1 +]    │
   └───────┴───────────────────────────────┘          */
#cart-widget .cart-widget-product {
    position: relative;
    display: grid !important;
    grid-template-columns: var(--mn-img) 1fr auto auto;
    grid-template-areas:
        "img name name name"
        "img .    del  qty";
    column-gap: 20px;
    row-gap: 12px;
    align-items: start;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 20px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--mn-line) !important;
}

#cart-widget .cart-widget-product:first-child { padding-top: 4px !important; }
#cart-widget .cart-widget-product:last-child  { border-bottom: 0 !important; }

/* Фото */
#cart-widget .cart-widget-product > .cart-widget-product-image {
    grid-area: img;
    width: var(--mn-img) !important;
    height: var(--mn-img) !important;
    margin: 0 !important;
    padding: 6px !important;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

#cart-widget .cart-widget-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

#cart-widget .cart-widget-product-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: contain;
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

#cart-widget .cart-widget-product-image a:hover img {
    transform: scale(1.06) rotate(-2deg);
}

/* «pcs» — в дизайне нет */
#cart-widget .cart-widget-product-unit {
    display: none !important;
}

/* Название + цена (в одном блоке Shoptet → раскладываем flex'ом) */
#cart-widget .cart-widget-product-name {
    grid-area: name;
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
}

/* Shoptet обрезает длинные названия (фикс. высота / line-clamp /
   overflow:hidden) — сбрасываем, название переносится целиком */
#cart-widget .cart-widget-product-name,
#cart-widget .cart-widget-product-name strong,
#cart-widget .cart-widget-product-name a,
#cart-widget .cart-widget-product-variant {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    line-clamp: none !important;
}

#cart-widget .cart-widget-product-name strong {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 900;
    overflow-wrap: anywhere;          /* очень длинные слова тоже переносятся */
}

#cart-widget .cart-widget-product-name a {
    display: block !important;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: var(--mn-text) !important;
    transition: color .2s ease;
}

#cart-widget .cart-widget-product-name a:hover {
    color: var(--mn-accent) !important;
}

/* Вариант (1000g, Pack…) — строкой ниже, светлее */
#cart-widget .cart-widget-product-variant {
    display: block !important;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--mn-muted) !important;
}

/* Цена */
#cart-widget .cart-widget-product-name > span[data-testid="cartWidgetProductPrice"],
#cart-widget .cart-widget-product-name > span:last-child {
    flex-shrink: 0;
    font-size: 17px;
    font-weight: 900;
    white-space: nowrap;
    color: var(--mn-text) !important;
}

/* ---------- Счётчик количества [– 1 +] ---------- */
#cart-widget .cart-widget-product-amount {
    grid-area: qty;
    align-self: end;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

#cart-widget .quantity-form {
    margin: 0;
}

#cart-widget .quantity {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    height: 26px;
    margin: 0;
    padding: 0 2px;
    background: var(--mn-stepper) !important;
    border: 0 !important;
    border-radius: 6px;
    overflow: hidden;
}

/* Пустые span-тултипы Shoptet не должны занимать место */
#cart-widget .quantity .increase-tooltip,
#cart-widget .quantity .decrease-tooltip {
    position: absolute !important;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* В разметке «+» идёт перед «−» — переставляем как в дизайне */
#cart-widget .quantity .decrease { order: 1; }
#cart-widget .quantity label     { order: 2; }
#cart-widget .quantity .increase { order: 3; }

#cart-widget .quantity label {
    display: block;
    margin: 0;
    padding: 0;
}

#cart-widget .quantity .amount {
    width: 32px !important;
    height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--mn-dark) !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

#cart-widget .quantity .amount::-webkit-outer-spin-button,
#cart-widget .quantity .amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#cart-widget .quantity .amount:focus {
    outline: none;
    background: #fff !important;
}

#cart-widget .quantity .increase,
#cart-widget .quantity .decrease {
    position: static !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-size: 14px;
    line-height: 1;
    color: var(--mn-dark) !important;
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease;
}

/* Иконки Shoptet на ::before/::after убираем — используем текст «+ / −» */
#cart-widget .quantity .increase::before,
#cart-widget .quantity .increase::after,
#cart-widget .quantity .decrease::before,
#cart-widget .quantity .decrease::after {
    content: none !important;
}

#cart-widget .quantity .increase__sign,
#cart-widget .quantity .decrease__sign {
    display: block !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: inherit;
}

#cart-widget .quantity .increase:hover,
#cart-widget .quantity .decrease:hover {
    background: var(--mn-accent) !important;
}

#cart-widget .quantity .increase:active,
#cart-widget .quantity .decrease:active {
    transform: scale(.88);
}

/* ---------- Удаление товара ---------- */
#cart-widget .cart-widget-product-delete {
    grid-area: del;
    align-self: end;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
}

#cart-widget .cart-widget-product-delete form,
#cart-widget .cart-widget-product-delete .inline {
    display: block;
    margin: 0;
}

#cart-widget .remove-item {
    position: static !important;
    display: block !important;
    width: 26px !important;
    height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 16px !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    cursor: pointer;
    opacity: .7;
    transition: opacity .2s ease, background-color .2s ease, transform .25s ease;
}

#cart-widget .remove-item::before,
#cart-widget .remove-item::after {
    content: none !important;
}

#cart-widget .remove-item:hover,
#cart-widget .remove-item:focus-visible {
    opacity: 1;
    background-color: rgba(255, 255, 255, .1) !important;
    transform: rotate(90deg);
}

/* ---------- Сообщение о бесплатной доставке ----------
   Shoptet позиционирует его абсолютно → текст налезал на товар и кнопку.
   Возвращаем в поток и оформляем плашкой с иконкой грузовика. */
#cart-widget .cart-free-shipping {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    float: none !important;
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: auto !important;
    height: auto !important;
    margin: 16px 0 0 !important;
    padding: 12px 16px !important;
    background: var(--mn-note-bg) !important;
    border: 0 !important;
    border-radius: 10px;
    box-shadow: none !important;
    font-size: 13px;
    line-height: 1.4;
    text-align: left !important;
    color: var(--mn-muted) !important;
}

/* Иконка грузовика */
#cart-widget .cart-free-shipping::before {
    content: "";
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    background-color: var(--mn-accent-ink);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M2 6h11v10H2zM13 9h4.5L21 12.5V16h-8z'/%3E%3Ccircle cx='6' cy='17.5' r='1.8' fill='black'/%3E%3Ccircle cx='17' cy='17.5' r='1.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M2 6h11v10H2zM13 9h4.5L21 12.5V16h-8z'/%3E%3Ccircle cx='6' cy='17.5' r='1.8' fill='black'/%3E%3Ccircle cx='17' cy='17.5' r='1.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

#cart-widget .cart-free-shipping > div {
    position: static !important;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    color: inherit !important;
}

/* Сумма и «FREE» — выделяем */
#cart-widget .cart-free-shipping strong {
    font-weight: 800;
    white-space: nowrap;
    color: var(--mn-accent-ink) !important;
}

/* ---------- Кнопка «Proceed to cart» ---------- */
#cart-widget .cart-widget-button {
    position: static !important;      /* на мобилке Shoptet фиксирует её внизу экрана */
    width: auto !important;
    margin: 0 !important;
    padding: 20px var(--mn-pad-x) 40px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

#cart-widget .cart-widget-button .btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100% !important;
    height: 50px !important;
    margin: 0 !important;
    padding: 0 24px !important;
    background: var(--mn-accent) !important;
    border: 1px solid var(--mn-accent) !important;
    border-radius: var(--mn-radius) !important;
    box-shadow: none !important;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none !important;
    text-decoration: none !important;
    color: var(--mn-dark) !important;
    transition: background-color .25s ease, color .25s ease, transform .15s ease;
}

/* Иконку-стрелку Shoptet заменяем своей, она «едет» при наведении */
#cart-widget .cart-widget-button .btn::before {
    content: none !important;
}

#cart-widget .cart-widget-button .btn::after {
    content: "→" !important;
    display: inline-block !important;
    position: static !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: 18px;
    line-height: 1;
    transition: transform .25s ease;
}

#cart-widget .cart-widget-button .btn:hover,
#cart-widget .cart-widget-button .btn:focus-visible {
    background: transparent !important;
    color: var(--mn-accent) !important;
}

#cart-widget .cart-widget-button .btn:hover::after {
    transform: translateX(4px);
}

#cart-widget .cart-widget-button .btn:active {
    transform: scale(.98);
}

/* ---------- Пустая корзина ----------
   Когда товаров нет, Shoptet убирает у inner класс .full */
#cart-widget .popup-widget-inner:not(.full) {
    padding-top: 36px !important;
    padding-bottom: 8px !important;
    font-size: 16px;
    color: var(--mn-muted) !important;
}

#cart-widget .popup-widget-inner:not(.full) * {
    color: inherit !important;
}

/* Загрузка (Shoptet вешает класс на loader-wrapper при изменении кол-ва) */
#cart-widget.loader-wrapper .loader,
#cart-widget .loader {
    background: rgba(0, 0, 0, .55) !important;
    border-radius: inherit;
}

/* =========================================================
   АНИМАЦИИ
   ========================================================= */

/* Открытие: выезжает из-под шапки */
#cart-widget.cart-widget[aria-hidden="false"] {
    animation: mn-cart-drop .45s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes mn-cart-drop {
    from { opacity: 0; translate: 0 -16px; }
    to   { opacity: 1; translate: 0 0; }
}

/* Закрытие: гаснет и уезжает вверх (Chrome/Edge 117+, Safari 17.4+, FF 129+) */
#cart-widget.cart-widget[aria-hidden="true"] {
    opacity: 0;
    translate: 0 -16px;
    pointer-events: none;
    transition:
        opacity .25s ease-in,
        translate .25s cubic-bezier(.7, 0, .84, 0),
        display .25s allow-discrete,
        visibility .25s allow-discrete;
}

/* Товары появляются по очереди */
#cart-widget[aria-hidden="false"] .cart-widget-product,
#cart-widget[aria-hidden="false"] .cart-free-shipping,
#cart-widget[aria-hidden="false"] .cart-widget-button {
    animation: mn-cart-rise .5s cubic-bezier(.16, 1, .3, 1) both;
}

#cart-widget[aria-hidden="false"] .cart-widget-product:nth-child(1) { animation-delay: .06s; }
#cart-widget[aria-hidden="false"] .cart-widget-product:nth-child(2) { animation-delay: .11s; }
#cart-widget[aria-hidden="false"] .cart-widget-product:nth-child(3) { animation-delay: .16s; }
#cart-widget[aria-hidden="false"] .cart-widget-product:nth-child(4) { animation-delay: .21s; }
#cart-widget[aria-hidden="false"] .cart-widget-product:nth-child(n+5) { animation-delay: .26s; }
#cart-widget[aria-hidden="false"] .cart-free-shipping                { animation-delay: .20s; }
#cart-widget[aria-hidden="false"] .cart-widget-button              { animation-delay: .22s; }

@keyframes mn-cart-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    #cart-widget,
    #cart-widget *,
    #cart-widget *::before,
    #cart-widget *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================================
   МОБИЛЬНАЯ ВЕРСИЯ — на всю ширину, сливается с шапкой
   ========================================================= */
@media (max-width: 767px) {
    #cart-widget.cart-widget {
        --mn-radius-card: 16px;
        --mn-img: 64px;
        --mn-pad-x: 24px;

        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;          /* Shoptet тянул попап до низа экрана */
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
    }

    #cart-widget .popup-widget-inner {
        padding-top: 20px !important;
    }

    #cart-widget .cart-widget-products {
        max-height: 60vh !important;
        max-height: 60dvh !important;
    }

    #cart-widget .cart-widget-product {
        column-gap: 16px;
    }

    #cart-widget .cart-widget-product-name a,
    #cart-widget .cart-widget-product-name > span:last-child {
        font-size: 15px;
    }

    #cart-widget .cart-widget-button {
        padding-bottom: 32px !important;
    }

    @keyframes mn-cart-drop {
        from { opacity: 0; translate: 0 -24px; }
        to   { opacity: 1; translate: 0 0; }
    }
}

/* =========================================================
   СВЕТЛАЯ ТЕМА — когда хедер светлый (e-shop и т.п.)
   Класс body.mn-header-light ставит popup-tone.js.
   Меняем переменные + пару мест, где цвет задан не через них.
   ========================================================= */
body.mn-header-light #cart-widget.cart-widget {
    --mn-bg: #ffffff;                         /* как хедер — одна «шторка» */
    --mn-scrim: rgba(20, 20, 20, .35);
    --mn-text: #111111;
    --mn-muted: #6b6b6b;
    --mn-line: #dcdcdc;
    --mn-stepper: #e6e6e6;
    --mn-note-bg: #ececec;
    --mn-accent-ink: var(--mn-text);          /* лайм на светлом не читается → чёрный */

    border: 0 !important;                     /* без серой рамки по краю */
}

/* Белая плашка фото на светлом фоне — с тонкой рамкой */
body.mn-header-light #cart-widget .cart-widget-product > .cart-widget-product-image {
    box-shadow: inset 0 0 0 1px var(--mn-line);
}

/* Название при наведении: лайм на светлом не читается — подчёркиваем */
body.mn-header-light #cart-widget .cart-widget-product-name a:hover {
    color: var(--mn-text) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

body.mn-header-light #cart-widget .remove-item:hover,
body.mn-header-light #cart-widget .remove-item:focus-visible {
    background-color: rgba(0, 0, 0, .06) !important;
}

/* Кнопка: на hover — чёрная с лаймовым текстом (прозрачная на светлом пропадала бы) */
body.mn-header-light #cart-widget .cart-widget-button .btn:hover,
body.mn-header-light #cart-widget .cart-widget-button .btn:focus-visible {
    background: var(--mn-dark) !important;
    border-color: var(--mn-dark) !important;
    color: var(--mn-accent) !important;
}

body.mn-header-light #cart-widget .loader {
    background: rgba(255, 255, 255, .6) !important;
}

/* Плавная смена темы, если хедер меняет цвет на скролле */
#cart-widget.cart-widget {
    transition: background-color .3s ease, box-shadow .3s ease;
}

/* =========================================================
   СТЫК ХЕДЕРА И КОРЗИНЫ
   Пока корзина открыта — убираем нижнюю линию/тень хедера
   (Shoptet рисует её на #header или его внутренних блоках),
   чтобы хедер и корзина читались как одна «шторка».
   ========================================================= */
body:has(#cart-widget[aria-hidden="false"]) #header,
body:has(#cart-widget[aria-hidden="false"]) #header .header-top,
body:has(#cart-widget[aria-hidden="false"]) #header .header-bottom,
body:has(#cart-widget[aria-hidden="false"]) #header .navigation-wrapper {
    border-bottom-color: transparent !important;
    box-shadow: none !important;
}

body:has(#cart-widget[aria-hidden="false"]) #header::after,
body:has(#cart-widget[aria-hidden="false"]) #header .header-top::after {
    border-bottom-color: transparent !important;
    box-shadow: none !important;
}

/* Карточку чуть поднимаем — закрывает субпиксельный зазор на стыке */
@media (min-width: 768px) {
    #cart-widget.cart-widget {
        margin-top: -1px !important;
    }
}

/* Попап начинается ровно под хедером: --mn-offset считает popup-tone.js
   (на сколько Shoptet «задвинул» попап на хедер). -1px закрывает
   субпиксельный зазор на стыке. Правило в конце файла — главнее
   margin из блоков выше. */
#cart-widget.cart-widget {
    margin-top: calc(var(--mn-offset, 0px) - 1px) !important;
}

/* =========================================================
   ШОВ МЕЖДУ ХЕДЕРОМ И ПОПАПОМ
   Линию рисует какой-то элемент хедера Shoptet — вместо охоты
   за ним просто закрываем стык полоской цвета карточки (4px
   вверх, только в ширину окна). clip-path — многоугольник:
   над карточкой пропускает только эту полоску, а затемнение
   по бокам по-прежнему начинается от верхнего края карточки.
   ========================================================= */
#cart-widget.cart-widget {
    clip-path: polygon(
        -100vmax 0,
        0 0,
        0 -4px,
        100% -4px,
        100% 0,
        calc(100% + 100vmax) 0,
        calc(100% + 100vmax) calc(100% + 100vmax),
        -100vmax calc(100% + 100vmax)
    ) !important;
}

#cart-widget.cart-widget::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: -4px !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: auto !important;
    height: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--mn-bg) !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: none;
    z-index: 5;
}

/* Попап — поверх хедера. Иначе хедер Shoptet (и .navigation-wrapper)
   рисуется над верхним краем карточки и даёт линию на стыке */
#cart-widget.cart-widget {
    z-index: 10001 !important;
}
