/* ============================================================
   Produkt GRATIS – koszyk i mini-koszyk
   ============================================================ */

/* Cena 0,00 zł dla produktu gratis */
.nhl-gratis-price {
    display: inline-block;
    font-weight: 700;
    color: #1a985d;
    display: none;
    font-size: 18px;
    letter-spacing: .2px;
}

/* Notatka "Ten produkt jest darmowy" w koszyku */
.nhl-gratis-note {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #1a985d;
    margin-top: 4px;
    line-height: 1.4;
}

/* Statyczna ilość (zamiast inputa) */
.nhl-gratis-qty {
    display: inline-block;
    font-weight: 600;
    color: #374151;
    min-width: 24px;
    text-align: center;
}

/* Ukryj input ilości dla produktu gratis – dodatkowe zabezpieczenie CSS
   na wypadek, gdy motyw renderuje własny input poza filtrem WC */
.woocommerce-cart-form .cart_item .nhl-gratis-qty ~ input[type="number"],
.woocommerce-cart-form .cart_item:has(.nhl-gratis-qty) .qty,
.woocommerce-cart-form .cart_item:has(.nhl-gratis-qty) input.qty {
    display: none !important;
}

/* Mini-koszyk: ukryj cenę produktu gratis jeśli motyw renderuje ją poza filtrem */
.woocommerce-mini-cart-item.nhl-gratis-item .woocommerce-Price-amount,
.woocommerce-mini-cart-item.nhl-gratis-item .quantity .amount {
    display: none !important;
}

/* Mini-koszyk: ukryj input ilości */
.woocommerce-mini-cart-item.nhl-gratis-item input.qty,
.woocommerce-mini-cart-item.nhl-gratis-item .quantity input {
    display: none !important;
}

/* Mini-koszyk: zielone obramowanie dla produktu gratis */
.woocommerce-mini-cart-item.nhl-gratis-item {
    border-radius: 8px;
    padding: 8px !important;
    margin-bottom: 6px;
    background: rgba(26, 152, 93, 0.04);
}

/* Oryginalna cena (przekreślona) obok ceny 0,00 zł dla produktu gratis */
.nhl-gratis-orig-price {
    display: inline-block;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 400;
    margin-right: 4px;
    text-decoration: line-through;
}
.nhl-gratis-orig-price .woocommerce-Price-amount {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.nhl-gratis-note + div,
.nhl-gratis-note ~ variation,
.nhl-gratis-item .variation {
    display: none !important;
}

/* ============================================================
   NHL Side Cart – slide-in panel
   ============================================================ */

/* Overlay */
.nhl-side-cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background .3s ease;
}
.nhl-side-cart-overlay.is-visible {
    background: rgba(0, 0, 0, .5);
    pointer-events: auto;
}

/* Panel */
.nhl-side-cart {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1111111199999;
    width: 420px;
    max-width: 100vw;
    background: #f8f9fa;
    box-shadow: -6px 0 32px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.nhl-side-cart.is-open {
    transform: translateX(0);
}

/* Prevent body scroll when cart is open */
body.nhl-side-cart-open {
    overflow: hidden;
}

/* ── Header ─────────────────────────────────────────── */
.nhl-side-cart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 18px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}
.nhl-side-cart__title {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a4f;
    letter-spacing: .2px;
}
.nhl-side-cart__close {
    background: #f3f4f6;
    margin: 0;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}
.nhl-side-cart__close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ── Body (scrollable items area) ───────────────────── */
.nhl-side-cart__body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.nhl-side-cart__body::-webkit-scrollbar {
    width: 4px;
}
.nhl-side-cart__body::-webkit-scrollbar-track {
    background: transparent;
}
.nhl-side-cart__body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 99px;
}

/* Loading state */
.nhl-loading {
    opacity: .3 !important;
    filter: blur(1.5px);
    pointer-events: none;
    transition: opacity .3s ease, filter .3s ease;
}

.nhl-side-cart__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    width: 100%;
    padding: 20px;
    text-align: center;
}

.nhl-side-cart.is-loading .nhl-side-cart__loader {
    display: flex;
}

.nhl-side-cart__loader-text {
    font-size: 15px;
    font-weight: 600;
    color: #1e3a4f;
    letter-spacing: .2px;
    animation: nhl-fade-in-up .4s ease forwards;
}

.nhl-side-cart__spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(30, 58, 79, 0.1);
    border-top-color: #1dbf73;
    border-radius: 50%;
    animation: nhl-spin 0.8s linear infinite;
}

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

@keyframes nhl-fade-in-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty state */
.nhl-side-cart__empty {
    text-align: center;
    padding: 64px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: nhl-fade-in .5s ease-out;
}
.nhl-side-cart__empty-icon {
    width: 64px;
    height: 64px;
    color: #e5e7eb;
}
.nhl-side-cart__empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: #d1d5db; /* Softer than primary text */
}
.nhl-side-cart__empty-text {
    color: #9ca3af;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
}

@keyframes nhl-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Item card ──────────────────────────────────────── */
.nhl-side-cart__item {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .04);
    position: relative;
    transition: opacity .25s, transform .25s, box-shadow .15s;
}
.nhl-side-cart__item:last-child {
    margin-bottom: 0;
}
.nhl-side-cart__item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, .09), 0 0 0 1px rgba(0, 0, 0, .05);
}
.nhl-side-cart__item--removing {
    opacity: 0;
    transform: translateX(40px);
}

/* Image – spans both rows */
.nhl-side-cart__item-img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e9ecef;
    align-self: center;
}
.nhl-side-cart__item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Info column – row 1 */
.nhl-side-cart__item-info {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding-top: 1px;
}
.nhl-side-cart__item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e3a4f;
    line-height: 1.4;
    margin-bottom: 0;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Right column – row 1: price + remove */
.nhl-side-cart__item-right {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    padding-top: 1px;
}
.nhl-side-cart__item-price {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a4f;
    white-space: nowrap;
    line-height: 1.3;
}
.nhl-side-cart__item-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}
.nhl-side-cart__remove {
    background: none;
    border: none;
    width: 22px !important;
    max-width: 22px;
    margin: 0;
    min-height: unset !important;
    height: 22px !important;
    max-height: 22px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: #c4c9d4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s;
    padding: 0;
    border-radius: 4px;
}
.nhl-side-cart__remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Qty wrap – row 2, col 2 */
.nhl-side-cart__qty-wrap {
    grid-column: 2;
    grid-row: 2;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 8px;
    width: fit-content;
    background: #f9fafb;
}
.nhl-side-cart__qty-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, color .12s;
    padding: 0;
    line-height: 1;
}
.nhl-side-cart__qty-btn:hover {
    background: #e9ecef;
    color: #1e3a4f;
}
.nhl-side-cart__qty-input {
    width: 45px !important;
    height: 28px !important;
    margin: 0;
    text-align: center;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 700;
    color: #1e3a4f;
    background: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
}
.nhl-side-cart__qty-input::-webkit-inner-spin-button,
.nhl-side-cart__qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
}

/* ── Gratis item variant ────────────────────────────── */
.nhl-side-cart__item--gratis {
    background: linear-gradient(135deg, #f0fdf7 0%, #fff 100%);
    box-shadow: 0 1px 3px rgba(26, 152, 93, .1), 0 0 0 1px rgba(26, 152, 93, .15);
}
.nhl-side-cart__item--gratis:hover {
    box-shadow: 0 3px 10px rgba(26, 152, 93, .12), 0 0 0 1px rgba(26, 152, 93, .2);
}
.nhl-side-cart__item--gratis .nhl-side-cart__item-price {
    color: #1a985d;
}
.nhl-side-cart__item-gratis-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #1a985d;
    background: rgba(26, 152, 93, .1);
    border-radius: 99px;
    padding: 2px 8px;
    margin-top: 6px;
    letter-spacing: .2px;
    text-transform: uppercase;
}

/* ── Footer ─────────────────────────────────────────── */
.nhl-side-cart__footer {
    flex-shrink: 0;
    border-top: 1px solid #e9ecef;
    padding: 14px 16px 18px;
    background: #fff;
}

/* Free shipping progress */
.nhl-side-cart__freeship {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
}
.nhl-side-cart__freeship-text {
    display: block;
    font-size: 12px;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.45;
    text-align: center;
}
.nhl-side-cart__progress-track {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}
.nhl-side-cart__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1dbf73, #0e9d5c);
    border-radius: 99px;
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
    min-width: 0;
}
.nhl-side-cart__progress-bar.is-full {
    background: linear-gradient(90deg, #1dbf73, #17a863);
}

/* Shipping row */
.nhl-side-cart__shipping-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e9ecef;
}
.nhl-side-cart__shipping-value {
    font-weight: 600;
    color: #374151;
    text-align: right;
}

/* Subtotal row */
.nhl-side-cart__subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 14px;
    padding: 10px 0 0;
}
.nhl-side-cart__subtotal-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.nhl-side-cart__subtotal-value {
    font-weight: 800;
    font-size: 20px;
    color: #1e3a4f;
    line-height: 1;
}
.nhl-side-cart__subtotal-value .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* CTA buttons */
.nhl-side-cart__btn {
    display: block;
    width: 100%;
    padding: 13px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    border-radius: 10px;
    text-decoration: none;
    transition: background .15s, box-shadow .15s, transform .1s;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.2;
}
.nhl-side-cart__btn:active {
    transform: scale(.98);
}
.nhl-side-cart__btn--cart {
    background: #fff;
    color: #1e3a4f;
    border: 2px solid #1e3a4f;
    margin-bottom: 8px;
}
.nhl-side-cart__btn--cart:hover {
    background: #1e3a4f;
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 58, 79, .2);
}
.nhl-side-cart__btn--checkout {
    background: #1dbf73;
    color: #fff;
    border: 2px solid #1dbf73;
}
.nhl-side-cart__btn--checkout:hover {
    background: #19ac67;
    border-color: #19ac67;
    box-shadow: 0 4px 12px rgba(29, 191, 115, .35);
    color: #fff;
}

/* Payment icons */
.nhl-side-cart__pay-icons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    opacity: .75;
}
.nhl-side-cart__pay-icons svg {
    width: 40px;
    height: 25px;
    border-radius: 4px;
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .nhl-side-cart {
        width: 80vw;
    }
    .nhl-side-cart__header {
        padding: 16px 14px 14px;
    }
    .nhl-side-cart__body {
        padding: 10px 12px;
    }
    .nhl-side-cart__footer {
        padding: 12px 14px 16px;
    }
    .nhl-side-cart__item {
        grid-template-columns: 68px 1fr auto;
        padding: 10px;
    }
    .nhl-side-cart__item-img {
        width: 68px;
        height: 68px;
    }
    .nhl-side-cart__item-name {
        font-size: 12px;
    }
    .nhl-side-cart__item-price {
        font-size: 13px;
    }
    .nhl-side-cart__subtotal-value {
        font-size: 18px;
    }
}


a[href="#quick-view"] {
    display: none !important;
}

.icon-shopping-cart:before,
.icon-shopping-cart:after {
    content: "";
}

.nhl-side-cart__brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: color .2s, background .2s;
    border-radius: 8px;
}
.nhl-side-cart__brand-link:hover {
    color: #1e3a4f;
    background: #f9fafb;
}
.nhl-side-cart__brand-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}