  /* ═══════════════════════════════════════════════
    NC-CVP — desktop header mini-cart preview (nc-cvp-*)
    Redesign of the .cart_block dropdown (blockcart.tpl) to match
    lovable/src/components/CartPreview.tsx. Scoped to the pilot new-card
    product two ways at once: this file only ever loads on that page
    (header.tpl gate), AND blockcart.tpl itself only renders this markup
    when ncCartPreviewActive is true (same product-id check) — so even if
    this stylesheet somehow loaded elsewhere, there'd be no .nc-cvp-*
    elements in the DOM for it to touch. Base dropdown positioning/show-
    hide-on-hover is left to the theme's existing #header .cart_block
    rules (global.css/cv_custom.css) — only the visual redesign lives here.
    ═══════════════════════════════════════════════ */

  /* Override globalnego mechanizmu "pokaż na hover" (klasa .cart_block_hover
    dopisywana przez JS modułu blockcart — NIE czyste CSS :hover, mimo że
    komentarz wyżej i niżej w tym pliku od dawna twierdzi inaczej; zweryfikowane
    bezpośrednio w modules/blockcart/blockcart.css i motywowym override tego
    pliku). Na urządzeniach BEZ prawdziwego hovera (dotyk) ten mechanizm jest
    źródłem realnych bugów udokumentowanych niżej (np. body.nc-bulb-sidebar-
    -closing) — "duch" hovera po tapnięciu potrafi otworzyć podgląd koszyka
    bez żadnej intencji użytkownika, bo touchscreen nie ma kursora, który
    mógłby z niego zjechać. Na dotyku i tak istnieje właściwy mechanizm
    (#side-cart-drawer, ajax-cart.js) — ten hover-owy podgląd ma sens
    wyłącznie na desktopie z prawdziwą myszką, więc blokujemy go całkowicie
    na (hover:none)/(pointer:coarse), niezależnie od tego, czy JS zdążył
    dopisać klasę .cart_block_hover, czy nie. */
  @media (hover: none), (pointer: coarse) {
    #header .cart_block,
    #header .cart_block.cart_block_hover,
    #cart_block.cart_block_hover {
      display: none !important;
    }
  }

  #header .cart_block {
    width: min(500px, calc(100vw - 2rem)) !important;
    background: #ffffff !important;
    border: 1px solid hsl(30 10% 88%) !important;
    border-radius: 8px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1) !important;
    overflow: hidden !important;
    padding: 0 !important;
    z-index: 9999;
  }
  #header .cart_block .cart-arrow {
    display: none !important;
  }
  /* Only .cart_block itself should carry a border/shadow — its direct child
    must stay a plain, unstyled box or the two would visually stack into a
    "double frame". */
  #header .cart_block .block_content {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  /* .cart_block opens on pure CSS :hover, independent of #side-cart-drawer's
    JS-driven is-open state. If the cursor is over the header cart icon when
    add-to-cart fires (e.g. user clicks "Dodaj do koszyka" then moves toward
    the header), both panels would otherwise render at once. ajax-cart.js
    toggles this class for exactly as long as the drawer is open. */
  body.scd-drawer-open #header .cart_block {
    display: none !important;
  }

  /* Closing the bulb-selection sidebar (modules/bulbselection/views/js/
    bulb-sidebar.js) on mobile can otherwise pop the header's cart preview
    open right after — the sidebar's close (X) button sits in the same
    top-right corner as the header cart icon, and the tap that dismisses
    the sidebar can land on that icon once it's exposed (delayed ghost
    click, or iOS Safari's touch-to-:hover simulation triggering the
    :hover-driven .cart_block preview — neither is something a click
    handler alone can reliably intercept). bulb-sidebar.js toggles this
    class for the duration of the close animation, making the cart icon
    physically unclickable/unhoverable during that window. */
  body.nc-bulb-sidebar-closing #header .shopping_cart,
  body.nc-bulb-sidebar-closing #header .cart_block {
    pointer-events: none !important;
  }

  .nc-cvp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 7px;
    padding-inline: 18px;
    border-bottom: 1px solid hsl(30 10% 88%);
  }
  .nc-cvp-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .nc-cvp-header-left svg {
    flex-shrink: 0;
    color: hsl(283 76% 43.7%);
    fill: none;
    stroke: currentColor;
  }
  .nc-cvp-title {
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 18.3px;
    letter-spacing: -0.3px;
    color: #1F1F1F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nc-cvp-count {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 18.3px;
    letter-spacing: -0.3px;
    color: #616161;
  }
  .nc-cvp-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: hsl(0 0% 38%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    padding: 0;
  }
  .nc-cvp-close svg {
    fill: none;
    stroke: currentColor;
    pointer-events: none;
  }
  @media (hover: hover) and (pointer: fine) {
  .nc-cvp-close:hover {
    background: hsl(36 30% 96%);
    color: hsl(0 0% 12%);
  }
  }


  /* ── Free shipping ── */
  .nc-cvp-shipping {
    padding: 13px 18px 4px 18px;
  }
  .nc-cvp-shipping-msg {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 13px;
    line-height: 17.5px;
    letter-spacing: -0.1px;
    color: rgba(0, 0, 0, .85);
  }
  .nc-cvp-shipping-msg svg {
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
  }
  .nc-cvp-shipping-msg.cart_block_free_shipping_reached {
    color: #248F4B;
    font-weight: 600;
  }
  .nc-cvp-shipping-msg strong {
    color: hsl(0 0% 12%);
    font-weight: 700;
  }
  .nc-cvp-shipping-msg.unvisible {
    display: none;
  }
  .nc-cvp-shipping-bar {
    margin-top: 6px;
    height: 5px;
    border-radius: 9999px;
    background: #f3f4f6;
    overflow: hidden;
  }
  .nc-cvp-shipping-bar-fill {
    height: 100%;
    background: hsl(283 76% 43.7%);
    border-radius: 9999px;
    transition: width .3s ease;
  }

  /* ── Product list ── */
  .nc-cvp-list {
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    padding-block: 13px 4px;
    padding-inline: 18px;
  }
  /* Reset default <dl>/<dt> list indentation so the row content lines up
    flush with the header/shipping-bar/footer edges instead of drifting
    right by the browser's default list padding. */
  .nc-cvp-list dl.products,
  .nc-cvp-list dt {
    padding-left: 0 !important;
    margin-left: 0 !important;
    list-style: none !important;
  }
  /* Exactly one scrolling container (.nc-cvp-list above) — .cart_block itself
    already has overflow:hidden (see its rule near the top of this section);
    block_content and dl.products must stay overflow:visible or they'd each
    grow their own native scrollbar on top of .nc-cvp-list's, which is what
    produced the double-scrollbar look. */
  #header .cart_block .block_content {
    overflow: visible !important;
  }
  .nc-cvp-list dl.products {
    margin: 0;
    overflow: visible;
  }
  .nc-cvp-list dt {
    display: flex;
    gap: 13px;
    padding: 13px 0;
    border-top: 1px solid hsl(30 10% 88%);
  }
  .nc-cvp-list dt.first_item {
    padding-top: 0;
    border-top: none;
  }
  .nc-cvp-list .cart-images {
    flex-shrink: 0;
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    border: 1px solid hsl(30 10% 88%);
    background: hsl(36 30% 96%);
    overflow: hidden;
  }
  .nc-cvp-list .cart-images img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }
  .nc-cvp-list .cart-info {
    flex: 1;
    min-width: 0;
  }
  .nc-cvp-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }
  .nc-cvp-item-top .product-name {
    min-width: 0;
    flex: 1;
  }
  .nc-cvp-item-top .cart_block_product_name {
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1F1F1F !important;
    line-height: 18.5px !important;
    letter-spacing: -0.1px !important;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* global.css: ".product-name { text-transform: uppercase }" — text-transform
      jest DZIEDZICZONE, więc mimo że scdTitleCase/ncCvpApplyTitleCase (ajax-cart.js)
      poprawnie ustawia treść węzła na "Sentence case", element (<a> wewnątrz
      .product-name) i tak renderuje się jako ALL CAPS, bo to właściwość
      wizualna, nie zmiana samego tekstu w DOM. */
    text-transform: none !important;
  }
  @media (hover: hover) and (pointer: fine) {
  .nc-cvp-item-top .cart_block_product_name:hover {
    text-decoration: underline;
  }
  }

  .nc-cvp-attrs {
    margin: 2px 0 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 11px;
    color: hsl(0 0% 38%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nc-cvp-attrs:empty {
    display: none;
  }
  .nc-cvp-remove {
    /* Overrides modules/blockcart/blockcart.css's ".cart_block .cart_block_list
      .remove_link { position:absolute; right:15px; top:17px }" — that's the
      PS module's own base CSS (loaded site-wide, not this theme's), which
      was yanking this element out of flow and floating it over the product
      name. Keeping the "remove_link" class for JS/legacy compat, just
      cancelling its positioning within the new layout. */
    position: static !important;
    top: auto !important;
    right: auto !important;
    flex-shrink: 0;
    margin-right: -10px;
    /* modules/blockcart/blockcart.css's own ".remove_link" rule (site-wide,
      not ours) also sets its own width/height on this exact class — without
      !important here it was winning and flattening the span to 28×14px,
      with the anchor inside never getting a chance to be a proper square. */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    line-height: 1 !important;
  }
  .nc-cvp-remove .ajax_cart_block_remove_link {
    /* Same file also injects a FontAwesome trash glyph via ::before on this
      exact class (content:"\f014") — without killing it here it renders
      stacked behind/next to our own SVG icon, looking like two icons. */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 6px !important;
    color: #6b7280;
    background: transparent !important;
    text-indent: 0 !important;
    transition: background-color .15s ease, color .15s ease;
  }
  /* Broader kill, not just the one class we already target above: any <a>
    under .nc-cvp-remove (current or future) loses the theme's font-icon
    pseudo-elements and any background-image icon it might carry. */
  .nc-cvp-remove a {
    background: none !important;
    text-indent: 0 !important;
    font-size: 0 !important;
  }
  .nc-cvp-remove a:before,
  .nc-cvp-remove a:after {
    content: none !important;
    display: none !important;
  }
  .nc-cvp-remove .ajax_cart_block_remove_link svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    margin: auto !important;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    pointer-events: none;
  }
  @media (hover: hover) and (pointer: fine) {
  .nc-cvp-remove .ajax_cart_block_remove_link:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
  }
  }

  .nc-cvp-list .product-atributes {
    margin-top: 2px;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 11px;
    color: hsl(0 0% 38%);
  }
  .nc-cvp-list .product-atributes a {
    color: inherit;
    text-decoration: none;
  }

  .nc-cvp-item-bottom {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
  }
  .nc-cvp-qty-stepper {
    flex-shrink: 0;
    display: inline-flex;
    align-items: stretch;
    height: 34px;
    border: 1px solid hsl(30 10% 88%);
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
  }
  .nc-cvp-qty-btn {
    width: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: hsl(0 0% 12%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s;
  }
  .nc-cvp-qty-btn svg {
    fill: none;
    stroke: currentColor;
    pointer-events: none;
  }
  @media (hover: hover) and (pointer: fine) {
  .nc-cvp-qty-btn:hover:not(:disabled) {
    background: hsl(36 30% 96%);
  }
  }

  .nc-cvp-qty-btn:disabled {
    opacity: .35;
    cursor: default;
  }
  .nc-cvp-qty-value {
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: hsl(0 0% 12%);
    border-left: 1px solid hsl(30 10% 88%);
    border-right: 1px solid hsl(30 10% 88%);
  }
  .nc-cvp-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    justify-content: flex-end;
  }
  .nc-cvp-price {
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 15px !important;
    letter-spacing: -0.1px !important;
    color: #951bc4 !important;
  }
  .nc-cvp-price-old {
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 14.8px !important;
    letter-spacing: -0.1px !important;
    color: #616161 !important;
    text-decoration: line-through;
  }
  .nc-cvp-savings {
    display: block;
    /* margin-top: 4px; */
    text-align: right;
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 13.8px !important;
    letter-spacing: -0.1px !important;
    color: #D90000 !important;
  }
  .nc-cvp-savings.unvisible {
    display: none;
  }
  /* Belt-and-suspenders on top of blockcart.tpl now only rendering this
  * element at all when $ncReductionApplies is true (root-cause fix): if it
  * ever ends up in the DOM with an empty amount anyway (stale AJAX state,
  * a future edit reverting the template change, etc.), hide it outright.
  * :empty on the child covers browsers without :has() support; :has() is
  * the more precise belt for the ones that do. */
  .nc-cvp-savings:empty,
  .nc-cvp-savings .cart_block_savings_amount:empty {
    display: none !important;
  }
  .nc-cvp-savings:has(.cart_block_savings_amount:empty) {
    display: none !important;
  }

  /* ── Footer ── */
  .nc-cvp-footer {
    padding-block: 13px 18px;
    padding-inline: 18px;
    border-top: 1px solid hsl(30 10% 88%);
    background: rgba(245, 242, 237, .6);
  }
  .nc-cvp-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    /* margin-bottom: 4px; */
  }
  .nc-cvp-total-row span:first-child {
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 18px !important;
    letter-spacing: -0.1px !important;
    color: #616161 !important;
  }
  .nc-cvp-total-row .price {
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 22.5px !important;
    letter-spacing: -0.1px !important;
    color: #1F1F1F !important;
  }

  /* ── Wiersz rabatu (kod promocyjny) — nc-cvp-discount-*
    Minimalistyczny, bez pigułki/tła — spójny z wierszem "Razem" tuż nad nim. ── */
  .nc-cvp-discount-row {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    padding: 0 !important;
    margin: 2px 0 !important;
    background: transparent !important;
    border: none !important;
  }
  .nc-cvp-discount-tag {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }
  .nc-cvp-discount-name {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #616161 !important;
    line-height: 18px !important;
    letter-spacing: -0.1px;
  }
  .nc-cvp-discount-remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #9ca3af !important;
    text-decoration: none !important;
    font-size: 12px !important;
    margin-left: 2px !important;
    transition: color 0.15s ease !important;
  }
  .nc-cvp-discount-remove svg { width: 10px; height: 10px; fill: none; stroke: currentColor; pointer-events: none; }
  @media (hover: hover) and (pointer: fine) {
  .nc-cvp-discount-remove:hover {
    color: #dc2626 !important;
  }
  }

  .nc-cvp-discount-amount {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #16a34a !important;
  }

  .nc-cvp-total-savings {
    margin-top: 4px;
    margin-bottom: 12px;
    text-align: right;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 13.8px;
    letter-spacing: -0.1px;
    color: #D90000;
  }
  .nc-cvp-total-savings.unvisible {
    display: none;
  }
  .nc-cvp-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .nc-cvp-btn-secondary,
  .nc-cvp-btn-primary {
    height: 42px;
    border-radius: 6px;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: -0.1px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: background .15s, border-color .15s;
  }
  .nc-cvp-btn-secondary {
    background: #fff;
    border: 1px solid hsl(30 10% 88%);
    color: #1F1F1F;
    font-weight: 600;
  }
  @media (hover: hover) and (pointer: fine) {
  .nc-cvp-btn-secondary:hover {
    border-color: hsl(0 0% 60%);
  }
  }

  .nc-cvp-btn-primary {
    background: hsl(283 76% 43.7%);
    color: #ffffff !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  }
  @media (hover: hover) and (pointer: fine) {
  .nc-cvp-btn-primary:hover {
    background: hsl(283 76% 37.7%);
  }
  }


  .nc-cvp-list .cart_block_no_products {
    padding: 24px 0;
    text-align: center;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 13px;
    color: hsl(0 0% 38%);
  }

  #header .cart_block > div {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
