/* ==========================================================================
   NENO — mini koszyk (panel z prawej)
   ========================================================================== */

.nmc {
    --nmc-ink: #1f1b18;
    --nmc-text: #2b2623;
    --nmc-muted: #8d847d;
    --nmc-line: #ece6e0;
    --nmc-soft: #faf7f4;
    --nmc-brand: #877364;
    --nmc-brand-d: #6f5d50;
    --nmc-green: #336a5d;
    --nmc-font: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    position: fixed;
    inset: 0;
    z-index: 100002;
    font-family: var(--nmc-font);
    color: var(--nmc-text);
}

.nmc[hidden] {
    display: none !important;
}

.nmc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .3s ease;
}

.nmc-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 545px;
    max-width: 100%;
    background: #fff;
    box-shadow: -20px 0 60px rgba(31, 27, 24, .12);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.22, .8, .3, 1);
    outline: none;
}

.nmc.is-open .nmc-backdrop {
    opacity: 1;
}

.nmc.is-open .nmc-panel {
    transform: translateX(0);
}

body.nmc-lock {
    overflow: hidden;
}

.nmc-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

/* Ładowanie */
.nmc-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .55);
    z-index: 5;
}

.nmc.is-busy .nmc-loading {
    display: flex;
}

.nmc-loading span {
    width: 34px;
    height: 34px;
    border: 3px solid var(--nmc-line);
    border-top-color: var(--nmc-ink);
    border-radius: 50%;
    animation: nmc-spin .7s linear infinite;
}

.nmc.is-empty-loading .nmc-loading {
    background: #fff;
}

@keyframes nmc-spin {
    to { transform: rotate(360deg); }
}

/* Nagłówek */
.nmc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 26px 22px 34px;
    border-bottom: 1px solid var(--nmc-line);
}

.nmc-title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.1;
    color: var(--nmc-ink);
}

.nmc-title small {
    font-family: var(--nmc-font);
    font-style: normal;
    font-weight: 500;
    font-size: 17px;
    color: var(--nmc-muted);
    vertical-align: middle;
}

.nmc-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--nmc-line);
    border-radius: 50%;
    background: #fff;
    color: var(--nmc-ink);
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease;
}

.nmc-close:hover {
    border-color: var(--nmc-brand);
    transform: rotate(90deg);
}

/* Lista */
.nmc-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 34px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cfc6be transparent;
}

.nmc-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nmc-item {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 22px 0;
    border-bottom: 1px solid var(--nmc-line);
    list-style: none;
    transition: background .6s ease;
}

.nmc-item:first-child {
    padding-top: 2px;
}

.nmc-item:last-child {
    border-bottom: 0;
}

.nmc-item.is-new {
    animation: nmc-flash 1.6s ease;
}

@keyframes nmc-flash {
    0%, 40% { background: #f5efe8; }
    100% { background: transparent; }
}

.nmc-thumb {
    display: block;
    width: 95px;
    height: 95px;
    border: 1px solid var(--nmc-line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.nmc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.nmc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.nmc-name {
    color: var(--nmc-ink) !important;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none !important;
}

a.nmc-name:hover {
    color: var(--nmc-brand) !important;
}

.nmc-variant,
.nmc-unit {
    color: var(--nmc-muted);
    font-size: 14.5px;
}

.nmc-gift-badge {
    align-self: flex-start;
    margin-top: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e7f1ec;
    color: var(--nmc-green);
    font-size: 12px;
    font-weight: 700;
}

.nmc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.nmc-qty {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 4px;
    border: 1px solid var(--nmc-line);
    border-radius: 999px;
    background: #fff;
}

.nmc-qty button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--nmc-ink);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.nmc-qty button:hover:not([disabled]) {
    background: var(--nmc-soft);
}

.nmc-qty button[disabled] {
    color: #cdc5bd;
    cursor: not-allowed;
}

.nmc-qty input {
    width: 40px;
    height: auto;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--nmc-ink);
    font-family: var(--nmc-font);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
    caret-color: auto;
}

.nmc-qty input::-webkit-outer-spin-button,
.nmc-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nmc-qty input:focus {
    outline: none;
}

.nmc-qty-fixed {
    font-size: 14px;
    color: var(--nmc-muted);
}

.nmc-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #8d847d;
    cursor: pointer;
}

.nmc-remove:hover {
    background: #fbeeee;
    color: #b9474b;
}

.nmc-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-top: 26px;
    white-space: nowrap;
}

.nmc-line {
    color: var(--nmc-ink);
    font-size: 18px;
    font-weight: 700;
}

.nmc-line.is-gift {
    color: var(--nmc-green);
}

.nmc-old {
    color: #8b827b;
    font-size: 14.5px;
}

.nmc-item.is-updating {
    opacity: .5;
    pointer-events: none;
}

/* Pasek: darmowa dostawa / prezent */
.nmc-progress {
    margin-bottom: 24px;
    padding: 18px 20px 14px;
    border: 1px solid var(--nmc-line);
    border-radius: 16px;
    background: var(--nmc-soft);
}

.nmc-progress-text {
    margin: 0 0 18px;
    font-size: 15.5px;
    line-height: 1.55;
    color: #4a433e;
}

.nmc-progress-text b {
    color: var(--nmc-ink);
    font-weight: 700;
}

.nmc-track {
    position: relative;
    height: 4px;
    margin: 0 30px 40px 16px;
    border-radius: 4px;
    background: #e8dfd5;
}

.nmc-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #6b5442 0%, #b89c7b 100%);
    transition: width .45s ease;
}

.nmc-mark {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

.nmc-mark i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #d9cec3;
    border-radius: 50%;
    background: #fff;
    color: var(--nmc-brand);
    transition: background .3s ease, color .3s ease, border-color .3s ease;
}

.nmc-mark.is-done i {
    border-color: var(--nmc-brand);
    background: var(--nmc-brand);
    color: #fff;
}

.nmc-mark em {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-style: normal;
    font-size: 13px;
    color: #6f6660;
    white-space: nowrap;
}

/* Podsumowanie */
.nmc-foot {
    padding: 20px 26px 24px 34px;
    border-top: 1px solid var(--nmc-line);
    background: #fff;
}

.nmc-sum {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 16.5px;
    color: #4a433e;
}

.nmc-sum span:last-child {
    color: var(--nmc-ink);
    font-weight: 700;
}

.nmc-sum--disc,
.nmc-sum--disc span:last-child {
    color: var(--nmc-green) !important;
}

.nmc-sum--total {
    margin: 20px 0 4px;
    font-size: 19px;
    font-weight: 700;
    color: var(--nmc-ink);
}

.nmc-sum--total span:last-child {
    font-size: 30px;
    letter-spacing: -.01em;
}

.nmc-note {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--nmc-muted);
}

.nmc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.nmc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 0 20px;
    border-radius: 999px;
    font-family: var(--nmc-font);
    font-size: 17px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.nmc-btn--ghost {
    border: 1px solid #d9d1c9;
    background: #fff;
    color: var(--nmc-ink) !important;
}

.nmc-btn--ghost:hover {
    border-color: var(--nmc-brand);
}

.nmc-btn--brand {
    border: 1px solid var(--nmc-brand);
    background: var(--nmc-brand);
    color: #fff !important;
}

.nmc-btn--brand:hover {
    background: var(--nmc-brand-d);
    border-color: var(--nmc-brand-d);
    transform: translateY(-1px);
}

.nmc-btn--dark {
    border: 0;
    background: var(--nmc-brand);
    color: #fff;
    min-height: 54px;
    padding: 0 30px;
}

/* Pusty koszyk */
.nmc-empty {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 34px;
    text-align: center;
}

.nmc-empty-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: var(--nmc-soft);
    color: var(--nmc-brand);
}

.nmc-empty-title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 24px;
    color: var(--nmc-ink);
}

.nmc-empty-text {
    margin: 0 0 14px;
    color: var(--nmc-muted);
}

/* Komunikat */
.nmc-toast {
    position: absolute;
    left: 50%;
    bottom: 200px;
    z-index: 6;
    max-width: calc(100% - 40px);
    padding: 10px 18px;
    border-radius: 12px;
    background: var(--nmc-brand);
    color: #fff;
    font-size: 14px;
    transform: translateX(-50%);
    animation: nmc-toast 3s ease forwards;
}

@keyframes nmc-toast {
    0% { opacity: 0; transform: translate(-50%, 10px); }
    10%, 85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; }
}

/* Telefon */
@media (max-width: 575.98px) {
    .nmc-panel {
        width: 100%;
    }

    .nmc-head {
        padding: 16px 16px 14px 20px;
    }

    .nmc-title {
        font-size: 27px;
    }

    .nmc-close {
        width: 42px;
        height: 42px;
    }

    .nmc-body {
        padding: 16px 20px 4px;
    }

    .nmc-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 6px 14px;
        padding: 16px 0;
    }

    .nmc-thumb {
        width: 76px;
        height: 76px;
        grid-row: span 2;
    }

    .nmc-name {
        font-size: 15.5px;
    }

    .nmc-unit,
    .nmc-variant {
        font-size: 13px;
    }

    .nmc-prices {
        grid-column: 2;
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        padding-top: 0;
    }

    .nmc-line {
        font-size: 16px;
    }

    .nmc-old {
        font-size: 13px;
    }

    .nmc-row {
        margin-top: 6px;
    }

    .nmc-qty {
        height: 38px;
    }

    .nmc-qty button {
        width: 30px;
        height: 30px;
    }

    .nmc-progress {
        padding: 14px 14px 10px;
        margin-bottom: 14px;
    }

    .nmc-progress-text {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .nmc-track {
        margin: 0 26px 36px 14px;
    }

    .nmc-foot {
        padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
    }

    .nmc-sum {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .nmc-sum--total {
        margin-top: 12px;
    }

    .nmc-sum--total span:last-child {
        font-size: 25px;
    }

    .nmc-note {
        margin-bottom: 12px;
    }

    .nmc-btn {
        min-height: 52px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nmc-panel,
    .nmc-backdrop,
    .nmc-fill {
        transition: none;
    }
}

/* Widżety zewnętrzne nie mogą zasłaniać panelu (czat, Ceneo, Cookiebot, strzałka, pasek porównania) */
body.nmc-lock #ceneo-widget,
body.nmc-lock .askspot-chat-widget,
body.nmc-lock #CookiebotWidget,
body.nmc-lock #arrowReturn,
body.nmc-lock #nenoCompareBar {
    display: none !important;
}

/* Kwota oszczędności (koszyk, mini koszyk) */
.nsave {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 4px;
    padding: 9px 12px;
    border-radius: 12px;
    background: #eaf2ef;
    color: #336a5d;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}
.nsave svg { flex-shrink: 0; }
.nsave b { font-weight: 800; white-space: nowrap; }

/* Prezent – link w tekście i podgląd produktu gratis */
.nmc-progress-text .nmc-gift-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(135, 115, 100, .45); text-underline-offset: 2px; }
.nmc-progress-text .nmc-gift-link:hover { color: #6f5d50; text-decoration-color: currentColor; }
.nmc-gift { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px; border: 1px dashed #d9cec5; border-radius: 14px; background: #fff; color: #2f2722 !important; text-decoration: none !important; transition: border-color .2s, box-shadow .2s; }
.nmc-gift:hover { border-color: #877364; box-shadow: 0 6px 16px rgba(47, 39, 34, .08); }
.nmc-gift.is-done { border-style: solid; border-color: #b9d3cb; background: #f3f8f6; }
.nmc-gift img { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; background: #f7f3f0; object-fit: contain; }
.nmc-gift__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.nmc-gift__txt small { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #877364; }
.nmc-gift.is-done .nmc-gift__txt small { color: #336a5d; }
.nmc-gift__txt strong { font-size: 14px; }
.nmc-gift__txt em { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; font-style: normal; font-size: 12px; color: #8d7f74; }
.nmc-gift__price { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; line-height: 1.2; }
.nmc-gift__price del { font-size: 11.5px; color: #a89e96; }
.nmc-gift__price b { font-size: 14px; color: #336a5d; }
.nmc-gift__price i { margin-top: 2px; font-style: normal; font-size: 11.5px; font-weight: 700; color: #877364; }
