/* ==========================================================================
   NBC Catalog v4.5 — чистая пересборка
   ========================================================================== */

:root {
    --nbc-primary:      #FFD54F;
    --nbc-primary-dark: #FFC107;
    --nbc-text:         #1a1a1a;
    --nbc-text-light:   #737373;
    --nbc-bg:           #ffffff;
    --nbc-bg-light:     #f5f5f5;
    --nbc-border:       #e5e5e5;
    --nbc-radius:       12px;
    --nbc-radius-sm:    8px;
    --nbc-shadow:       0 2px 12px rgba(0,0,0,.08);
    --nbc-cart-width:   320px;
    --nbc-nav-height:   52px;
    --nbc-tr:           .2s ease;
}

.nbc-catalog-wrapper {
    position: relative;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--nbc-text); line-height: 1.45; -webkit-font-smoothing: antialiased;
}
.nbc-catalog-wrapper *, .nbc-catalog-wrapper *::before, .nbc-catalog-wrapper *::after { box-sizing: border-box; }

/* ══════════ NAV ══════════ */

.nbc-catalog-nav { position: sticky; top: 0; z-index: 100; background: var(--nbc-bg); border-bottom: 1px solid var(--nbc-border); height: var(--nbc-nav-height); overflow: hidden; }
.nbc-catalog-nav-inner.grabbing { cursor: grabbing; scroll-behavior: auto; }
.nbc-catalog-nav-inner { cursor: grab; }
.nbc-catalog-nav-inner { display: flex; overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 16px; height: 100%; align-items: stretch; }
.nbc-catalog-nav-inner::-webkit-scrollbar { display: none; }
.nbc-nav-tab { flex: 0 0 auto; background: none; border: none; border-bottom: 3px solid transparent; padding: 0 16px; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--nbc-text-light); white-space: nowrap; cursor: pointer; line-height: var(--nbc-nav-height); transition: color var(--nbc-tr), border-color var(--nbc-tr); }
.nbc-nav-tab:hover { color: var(--nbc-text); }
.nbc-nav-tab.active { color: var(--nbc-text); border-bottom-color: var(--nbc-primary-dark); font-weight: 600; }

/* ══════════ LAYOUT ══════════ */

.nbc-catalog-body { display: flex; align-items: flex-start; }
.nbc-catalog-products { flex: 1 1 0%; min-width: 0; padding: 24px 20px 80px; }
.nbc-cat-section { margin-bottom: 40px; }
.nbc-cat-title { font-size: 24px; font-weight: 700; margin: 0 0 16px; }
.nbc-products-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

/* ══════════ CARD ══════════ */

/* НЕТ overflow:hidden — чтобы popup КБЖУ не обрезался */
.nbc-product-card {
    position: relative; display: flex; flex-direction: column;
    border-radius: var(--nbc-radius);
    transition: box-shadow var(--nbc-tr);
}
.nbc-product-card:hover { box-shadow: none; }
.nbc-product-card:hover .nbc-product-img img { transform: scale(1.05); transition: transform .3s ease; }
.nbc-product-card.nbc-out-of-stock { opacity: .45; pointer-events: none; }

.nbc-product-img {
    position: relative; aspect-ratio: 1 / 1;
    border-radius: var(--nbc-radius); overflow: hidden;
    background: var(--nbc-bg-light); cursor: pointer;
}
.nbc-product-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.nbc-no-image { width: 100%; height: 100%; background: var(--nbc-bg-light); }

/* + кнопка в правом нижнем углу */
.nbc-img-add-btn {
    position: absolute; right: 8px; bottom: 8px;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--nbc-bg); border: none;
    font-size: 22px; line-height: 36px;
    color: var(--nbc-text); cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,.12);
    display: flex; align-items: center; justify-content: center;
    padding: 0 0 2px 0;
    transition: transform var(--nbc-tr), background var(--nbc-tr); z-index: 2;
}
.nbc-img-add-btn:hover { background: var(--nbc-primary); transform: scale(1.1); }

/* Счётчик */
.nbc-inline-counter {
    position: absolute; left: 8px; right: 8px; bottom: 8px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--nbc-bg); border-radius: 24px; height: 36px;
    padding: 0; overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.12); z-index: 2;
}
.nbc-counter-minus, .nbc-counter-plus {
    width: 36px; height: 36px; border: none; background: transparent;
    font-size: 20px; color: var(--nbc-text); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background var(--nbc-tr);
}
.nbc-counter-minus:hover, .nbc-counter-plus:hover { background: var(--nbc-primary); }
.nbc-counter-qty { font-size: 15px; font-weight: 600; min-width: 24px; text-align: center; }

/* ── Инфо под фото ── */

.nbc-product-info { padding: 8px 4px 4px; flex: 1; }

/* Цена + КБЖУ */
.nbc-product-price-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 2px; position: relative;
}
.nbc-product-price { font-size: 16px; font-weight: 700; }
.nbc-product-price .woocommerce-Price-amount { font-weight: 700; }

.nbc-kbzhu-btn {
    background: var(--nbc-bg-light); border: none; border-radius: 6px;
    padding: 2px 8px; font-family: inherit; font-size: 10px; font-weight: 600;
    color: var(--nbc-text-light); cursor: pointer; white-space: nowrap;
    letter-spacing: 0.3px; transition: background var(--nbc-tr), color var(--nbc-tr);
}
.nbc-kbzhu-btn:hover { background: var(--nbc-border); color: var(--nbc-text); }

.nbc-kbzhu-popup {
    display: none; position: absolute; bottom: calc(100% + 6px); right: 0;
    background: var(--nbc-text); color: #fff; padding: 6px 10px;
    border-radius: 6px; font-size: 11px; white-space: nowrap;
    z-index: 200; gap: 8px;
}
.nbc-kbzhu-popup.show { display: flex; }

.nbc-product-name {
    font-size: 13px; font-weight: 600; line-height: 1.35; margin-bottom: 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nbc-product-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--nbc-text-light); }
.nbc-sold-out-label { font-size: 12px; color: var(--nbc-text-light); padding: 4px; }

/* ── Бейджи на фото ── */
.nbc-badges {
    position: absolute; top: 8px; left: 8px; z-index: 3;
    display: flex; flex-direction: column; gap: 4px;
    pointer-events: none;
}
.nbc-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,.92); border-radius: 12px;
    padding: 2px 8px 2px 3px; backdrop-filter: blur(4px);
}
.nbc-badge-icon {
    width: 22px; height: 22px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 22px; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.nbc-badge-icon svg { width: 14px; height: 14px; }
.nbc-badge-svg { width: 16px; height: 16px; object-fit: contain; }
.nbc-badge-label { font-size: 10px; font-weight: 600; color: var(--nbc-text); white-space: nowrap; }

/* ══════════ SIDEBAR CART ══════════ */

.nbc-sidebar-cart {
    width: var(--nbc-cart-width); flex: 0 0 var(--nbc-cart-width);
    position: sticky; top: var(--nbc-nav-height);
    display: flex; flex-direction: column;
    border-left: 1px solid var(--nbc-border);
    background: var(--nbc-bg); z-index: 50;
}
.nbc-sidebar-cart-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; border-bottom: 1px solid var(--nbc-border); }
.nbc-sidebar-cart-title { font-size: 20px; font-weight: 700; margin: 0; }
.nbc-cart-clear { background: none; border: none; font-family: inherit; font-size: 14px; color: var(--nbc-text-light); cursor: pointer; }
.nbc-cart-clear:hover { color: var(--nbc-text); }
.nbc-sidebar-cart-items { flex: 1; overflow-y: auto; padding: 12px 16px; }
.nbc-cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--nbc-text-light); font-size: 15px; gap: 12px; padding: 20px; }
.nbc-sad-cart { width: auto; height: 180px; opacity: 0.7; }
.nbc-sad-text { text-align: center; font-size: 14px; line-height: 1.5; color: #aaa; }
.nbc-cart-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--nbc-border); align-items: flex-start; }
.nbc-cart-item:last-child { border-bottom: none; }
.nbc-cart-item-img { width: 52px; height: 52px; border-radius: var(--nbc-radius-sm); overflow: hidden; flex: 0 0 52px; background: var(--nbc-bg-light); }
.nbc-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.nbc-cart-item-body { flex: 1; min-width: 0; }
.nbc-cart-item-name { font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.nbc-cart-item-mods { font-size: 11px; color: var(--nbc-text-light); line-height: 1.3; margin-bottom: 4px; }
.nbc-cart-item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nbc-cart-item-price { font-size: 13px; font-weight: 600; white-space: nowrap; }
.nbc-cart-item-weight { font-size: 11px; color: var(--nbc-text-light); }
.nbc-cart-item-controls { display: flex; align-items: center; border: 1px solid var(--nbc-border); border-radius: 20px; overflow: hidden; }
.nbc-cart-item-minus, .nbc-cart-item-plus {
    width: 28px; height: 28px; border: none; background: transparent;
    font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--nbc-text); border-radius: 50%; transition: background var(--nbc-tr);
}
.nbc-cart-item-minus:hover, .nbc-cart-item-plus:hover { background: var(--nbc-primary); }
.nbc-cart-item-qty { font-size: 13px; font-weight: 600; min-width: 20px; text-align: center; }
.nbc-sidebar-cart-footer { padding: 12px 16px 16px; border-top: 1px solid var(--nbc-border); }
.nbc-sidebar-cart-total { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.nbc-cart-checkout-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 14px 20px; border-radius: 24px;
    background: var(--nbc-primary); color: var(--nbc-text);
    font-family: inherit; font-size: 16px; font-weight: 700;
    text-decoration: none; cursor: pointer; border: none; gap: 8px;
    transition: background var(--nbc-tr);
}
.nbc-cart-checkout-btn:hover { background: var(--nbc-primary-dark); color: var(--nbc-text); text-decoration: none; }

/* ══════════ MOBILE MINI-CART ══════════ */

.nbc-mobile-cart-btn { display: none !important; position: fixed; right: 16px; bottom: 24px; z-index: 200; background: var(--nbc-primary); color: var(--nbc-text); border-radius: 16px; padding: 12px 20px; box-shadow: 0 4px 20px rgba(0,0,0,.18); cursor: pointer; align-items: center; gap: 8px; }
.nbc-mobile-cart-btn:active { transform: scale(.96); }
.nbc-mobile-cart-badge { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--nbc-text); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.nbc-mobile-cart-sum { font-size: 16px; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */

.nbc-modal-overlay { display: none; position: fixed; inset: 0; z-index: 10010; background: rgba(0,0,0,.45); align-items: center; justify-content: center; padding: 40px 20px; }
.nbc-modal-overlay.open { display: flex; }
.nbc-modal {
    position: relative; background: var(--nbc-bg); border-radius: 16px;
    width: 100%; max-width: 900px; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.2); animation: nbcModalIn .25s ease;
}
@keyframes nbcModalIn { from{opacity:0;transform:translateY(30px) scale(.97)} to{opacity:1;transform:translateY(0) scale(1)} }

.nbc-modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--nbc-bg); border: none;
    font-size: 22px; color: var(--nbc-text); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,.25);
    transition: background var(--nbc-tr);
}
.nbc-modal-close:hover { background: var(--nbc-bg-light); }

/* Top */
.nbc-modal-top { display: flex; align-items: stretch; flex: 0 0 auto; }
.nbc-modal-photo-wrap {
    width: 380px; flex: 0 0 380px; padding: 30px;
    position: relative;
}
.nbc-modal-badges {
    position: absolute; top: 38px; left: 38px; z-index: 3;
    display: flex; flex-direction: column; gap: 4px;
}
.nbc-modal-photo { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 16px !important; }
.nbc-modal-heading { flex: 1; padding: 30px 30px 20px 10px; display: flex; flex-direction: column; justify-content: flex-start; }

.nbc-modal-name-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.nbc-modal-name { font-size: 26px; font-weight: 700; margin: 0; line-height: 1.2; }
/* Вес рядом с названием */
.nbc-modal-name::after {
    content: attr(data-weight);
    font-size: 16px; font-weight: 400; color: var(--nbc-text-light);
    margin-left: 15px;
}

.nbc-modal-price-row { display: flex; align-items: center; gap: 16px 16px; flex-wrap: wrap; margin-bottom: 20px; row-gap: 21px; }
.nbc-modal-price { font-size: 28px; font-weight: 700; white-space: nowrap; }

/* Qty */
.nbc-modal-qty { display: flex; align-items: center; border: 1px solid var(--nbc-border); border-radius: 24px; height: 44px; }
.nbc-modal-qty-btn {
    width: 44px; height: 44px; border: none; background: transparent;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--nbc-text); border-radius: 50%; transition: background var(--nbc-tr);
}
.nbc-modal-qty-btn:hover { background: var(--nbc-primary); }
.nbc-modal-qty-val { font-size: 16px; font-weight: 600; min-width: 28px; text-align: center; }

/* Добавить — высота = qty */
.nbc-modal-add-btn {
    height: 44px; padding: 0 28px; border-radius: 24px;
    background: var(--nbc-primary); color: var(--nbc-text);
    font-family: inherit; font-size: 16px; font-weight: 600;
    border: none; cursor: pointer; white-space: nowrap;
    word-spacing: 0; letter-spacing: 0; transition: background var(--nbc-tr);
    display: flex; align-items: center; justify-content: center;
}
.nbc-modal-add-btn:hover { background: var(--nbc-primary-dark); }

/* КБЖУ */
.nbc-modal-kbzhu {
    margin-top: 16px; background: var(--nbc-bg-light);
    border-radius: var(--nbc-radius-sm); padding: 11px 19px 16px 16px;
    display: inline-flex; flex-direction: row; align-items: flex-start; align-self: flex-start; gap: 12px;
}
.nbc-modal-kbzhu-label { font-size: 11px; color: var(--nbc-text-light); white-space: nowrap; line-height: 14px; padding-top: 5px; }
.nbc-modal-kbzhu-nums { display: flex; gap: 20px; }
.nbc-kn { text-align: center; }
.nbc-kn b { display: block; font-size: 18px; font-weight: 700; color: var(--nbc-text); }
.nbc-kn small { font-size: 11px; color: var(--nbc-text-light); margin-top: -2px; display: block; }

/* Bottom */
.nbc-modal-body { display: contents; }
.nbc-modal-sticky-bar { display: none; }
.nbc-modal-bottom { flex: 1 1 auto; overflow-y: auto; border-top: 1px solid var(--nbc-border); }

/* Описание — свёрнуто по умолчанию (3 строки) */
.nbc-modal-desc {
    padding: 19px 30px 0;
    font-size: 13px; color: #555; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; position: relative; max-height: calc(19px + 1.6em * 3 + 2px);
}
.nbc-modal-desc.nbc-desc-open {
    display: block; -webkit-line-clamp: unset; overflow: visible; max-height: none;
}
.nbc-modal-desc:empty { display: none; }
.nbc-desc-toggle {
    padding: 6px 30px 0; font-size: 12px; color: #003399;
    cursor: pointer; display: none; text-align: right;
}
.nbc-desc-toggle:hover { text-decoration: underline; }
.nbc-desc-arrow { font-size: 10px; margin-left: 4px; display: inline-block; }
.nbc-desc-open + .nbc-desc-toggle .nbc-desc-arrow { transform: rotate(180deg); }

/* Modifiers */
.nbc-modal-modifiers { padding: 16px 30px 30px; }
.nbc-mod-group { margin-bottom: 20px; column-count: 2; column-gap: 40px; }
.nbc-mod-group-title { column-span: all; font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--nbc-text); }
.nbc-mod-item {
    display: flex; align-items: center; padding: 12px 8px;
    border-bottom: 1px solid var(--nbc-bg-light); gap: 12px;
    break-inside: avoid; border-radius: 8px;
    transition: background var(--nbc-tr);
}
.nbc-mod-item:last-child { border-bottom: none; }

/* Активный модификатор — светло-оранжевый (и radio и counter) */
.nbc-mod-item.nbc-mod-active {
    background: rgba(255, 213, 79, 0.18);
}

.nbc-mod-item-name { flex: 1; font-size: 15px; color: var(--nbc-text); }
.nbc-mod-item-price { font-size: 14px; color: var(--nbc-text-light); white-space: nowrap; }

/* Radio — оранжевая внутри, чёрная обводка */
.nbc-mod-radio {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px;
    border: 2px solid #bbb; border-radius: 50%;
    cursor: pointer; position: relative; flex: 0 0 22px;
    transition: border-color var(--nbc-tr);
}
.nbc-mod-radio:checked { border-color: var(--nbc-text); }
.nbc-mod-radio:checked::after {
    content: ''; position: absolute; inset: 3px;
    border-radius: 50%; background: var(--nbc-primary-dark);
}
.nbc-mod-radio:hover { border-color: var(--nbc-primary); }

/* Counter */
.nbc-mod-counter { display: flex; align-items: center; border: 1px solid var(--nbc-border); border-radius: 16px; flex: 0 0 auto; overflow: hidden; }
.nbc-mod-counter button {
    width: 32px; height: 32px; border: none; background: transparent;
    font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--nbc-text); border-radius: 50%; transition: background var(--nbc-tr);
}
.nbc-mod-counter button:hover { background: var(--nbc-primary); }
.nbc-mod-cnt-val { font-size: 14px; font-weight: 600; min-width: 22px; text-align: center; }

/* ══════════ Вертикальное центрирование +/- везде ══════════ */

.nbc-counter-minus, .nbc-counter-plus,
.nbc-cart-item-minus, .nbc-cart-item-plus,
.nbc-modal-qty-btn,
.nbc-mod-counter button {
    line-height: 1;
    padding: 0;
    padding-bottom: 2px;
}

/* ══════════ RESPONSIVE ══════════ */

@media (max-width: 1440px) { .nbc-products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1200px) { .nbc-products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (max-width: 960px) { :root { --nbc-cart-width: 280px; } }

@media (max-width: 768px) {
    .nbc-sidebar-cart { display: none !important; }
    .nbc-mobile-cart-btn.visible { display: flex !important; }
    .nbc-products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .nbc-catalog-products { padding: 16px 12px 100px; }
    .nbc-cat-title { font-size: 20px; margin-bottom: 12px; }
    .nbc-nav-tab { font-size: 14px; padding: 0 12px; }

    /* ── Modal mobile: full-height, scroll body, sticky bar ── */
    .nbc-modal-overlay { padding: 20px 0 0 0; align-items: flex-start; }
    .nbc-modal {
        max-width: 100%; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px);
        border-radius: 16px 16px 0 0; margin-top: 0;
        display: flex; flex-direction: column;
    }
    .nbc-modal-body {
        display: flex; flex-direction: column;
        flex: 1 1 auto; overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }
    .nbc-modal-top { flex-direction: column; flex: 0 0 auto; }
    .nbc-modal-photo-wrap { width: 100%; flex: 0 0 auto; padding: 16px; }
    .nbc-modal-badges { top: 24px; left: 24px; }
    .nbc-modal-photo { max-height: 240px; border-radius: 12px !important; }
    .nbc-modal-heading { padding: 0 16px 16px; }

    /* Название + вес (inline) + цена справа */
    .nbc-modal-name-row {
        display: flex; align-items: baseline;
        justify-content: space-between; gap: 12px;
    }
    .nbc-modal-name {
        font-size: 20px; flex: 1 1 auto; min-width: 0;
    }
    .nbc-modal-name::after {
        display: inline; margin-left: 0; margin-top: 0;
        padding-left: 8px; font-size: 13px;
    }
    .nbc-modal-name-row .nbc-modal-price {
        font-size: 20px; flex: 0 0 auto; white-space: nowrap;
    }

    /* Скрываем price-row (элементы перенесены в sticky-bar через JS) */
    .nbc-modal-price-row { display: none !important; }

    /* Sticky bar: Кол-во + Добавить */
    .nbc-modal-sticky-bar {
        display: flex !important; align-items: center; gap: 12px;
        padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        background: #fff; flex: 0 0 auto;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    }
    .nbc-modal-sticky-bar .nbc-modal-qty {
        flex: 0 0 auto; height: 44px;
    }
    .nbc-modal-sticky-bar .nbc-modal-add-btn {
        flex: 1; margin-top: 0; padding: 0 20px;
        font-size: 16px; height: 44px;
    }

    .nbc-modal-close { top: 10px; right: auto; left: 10px; z-index: 10; }
    .nbc-modal-kbzhu { margin-top: 0px; padding: 6px 12px; }

    /* Описание */
    .nbc-modal-desc { padding: 16px; font-size: 12px; line-height: 1.4; color: #111; max-height: calc(9px + 1.4em * 3 + 2px); }
    .nbc-modal-modifiers { padding: 0 16px 16px; }
    .nbc-mod-group { column-count: 1; }
    .nbc-mobile-cart-btn.visible { left: 50%; right: auto; transform: translateX(-50%); }
}

@media (max-width: 480px) {
    .nbc-products-grid { gap: 8px; }
    .nbc-product-name { font-size: 12px; }
    .nbc-product-price { font-size: 14px; }
    .nbc-img-add-btn { width: 32px; height: 32px; font-size: 20px; }
}


/* ── Прогресс-бар бесплатной доставки ── */
.nbc-free-delivery-bar {
    padding: 8px 16px 10px;
}
.nbc-fdb-track {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}
.nbc-fdb-fill {
    height: 100%;
    background: #ff9800;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}
.nbc-fdb-fill.nbc-fdb-done {
    background: #4caf50;
}
.nbc-fdb-text {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    text-align: center;
}
.nbc-fdb-text.nbc-fdb-achieved {
    color: #4caf50;
    font-weight: 500;
}



/* ══════════ Обязательные модификаторы ══════════ */

.nbc-mod-req-star {
    color: #c62828;
    font-weight: 700;
}

.nbc-mod-group-error {
    border: 2px solid #c62828;
    border-radius: 8px;
    padding: 8px;
    animation: nbc-shake 0.3s ease;
}
.nbc-mod-group-error::before {
    content: 'Выберите обязательный модификатор';
    display: block;
    font-size: 11px;
    color: #c62828;
    padding-bottom: 5px;
    font-weight: 500;
}

@keyframes nbc-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Сброс ошибки при выборе */
.nbc-mod-group-error .nbc-mod-active {
    border-color: transparent;
}

/* ══════════ PRELOADER ══════════ */

.nbc-preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease;
}

.nbc-preloader.nbc-pl-fade {
    opacity: 0;
    pointer-events: none;
}

.nbc-pl-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.nbc-pl-logo {
    height: 180px;
    width: auto;
}

/* Полоски — растут снизу вверх */
.nbc-pl-stripe {
    clip-path: inset(100% 0 0 0);
}

.nbc-pl-left {
    animation: nbc-pl-reveal 2.5s cubic-bezier(.22,.61,.36,1) forwards;
}

.nbc-pl-right {
    animation: nbc-pl-reveal 2.5s cubic-bezier(.22,.61,.36,1) 0.15s forwards;
}

@keyframes nbc-pl-reveal {
    0%   { clip-path: inset(100% 0 0 0); }
    100% { clip-path: inset(0 0 0 0); }
}

/* Звезда — падает сверху */
.nbc-pl-star {
    opacity: 0;
    transform: translateY(-30px);
    animation: nbc-pl-star-drop 0.5s cubic-bezier(.34,1.56,.64,1) 2.5s forwards;
}

@keyframes nbc-pl-star-drop {
    0%   { opacity: 0; transform: translateY(-30px); }
    60%  { opacity: 1; transform: translateY(2px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Счётчик */
.nbc-pl-counter {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #000;
    letter-spacing: 2px;
    transform: translateX(5px);
}

/* ══════════ BANNERS CAROUSEL ══════════ */

.nbc-banners {
    background: #F7F2E6;
    padding: 15px 0 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

/* Градиент-затухание по краям */
.nbc-banners::before,
.nbc-banners::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 4;
    pointer-events: none;
}
.nbc-banners::before {
    left: 0;
    background: linear-gradient(to right, #F7F2E6 0%, transparent 100%);
}
.nbc-banners::after {
    right: 0;
    background: linear-gradient(to left, #F7F2E6 0%, transparent 100%);
}

.nbc-banners-track {
    display: flex;
    gap: 24px;
    transition: transform .5s ease;
    will-change: transform;
}

.nbc-banner-slide {
    flex: 0 0 auto;
    border-radius: 16px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.nbc-banner-slide img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    user-select: none;
}

.nbc-banner-slide .nbc-banner-desk {
    aspect-ratio: 1400 / 393;
    object-fit: cover;
}

.nbc-banner-slide .nbc-banner-mob { display: none; }

/* ── Arrows ── */

.nbc-banners-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 10px));
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #F7F2E6;
    border: 1px solid #e0dcd4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background .2s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.nbc-banners-arrow:hover {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.14);
}

.nbc-banners-prev { left: max(12px, calc((100% - min(1280px, 78%)) / 2 - 24px)); }
.nbc-banners-next { right: max(12px, calc((100% - min(1280px, 78%)) / 2 - 24px)); }

/* ── Dots ── */

.nbc-banners-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 5px 0 5px;
}

.nbc-banners-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d5d0c6;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}

.nbc-banners-dot.active {
    background: #FFC107;
    transform: scale(1.3);
}

/* ── Mobile ── */

@media (max-width: 768px) {
    .nbc-banners {
        padding: 0;
        background: #F7F2E6;
    }

    .nbc-banners-track { gap: 0; }

    .nbc-banner-slide { border-radius: 0; }

    .nbc-banner-slide .nbc-banner-desk { display: none; }
    .nbc-banner-slide .nbc-banner-mob {
        display: block;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    .nbc-banners-arrow { width: 36px; height: 36px; }
    .nbc-banners-prev { left: 10px !important; }
    .nbc-banners-next { right: 10px !important; }
    .nbc-banners::before,
    .nbc-banners::after { display: none; }

    .nbc-banners-dots { margin-top: 10px; padding-bottom: 12px; }
}