/* =============================================================================
   NK Katalog — Single Product (B2B sticky-sidebar layout)
   ========================================================================== */

/* Tokens — pull from theme.json so palette + radii follow the active theme.
   Fallbacks match Kordit defaults but switching themes will re-skin this page. */
:root {
    --nk-color-bg:        var(--wp--preset--color--white,        #ffffff);
    --nk-color-surface:   var(--wp--preset--color--background,   #fafaf7);
    --nk-color-surface-2: var(--wp--preset--color--paper,        #f4f1ec);
    --nk-color-border:    var(--wp--preset--color--line,         #e0dccf);
    --nk-color-border-2:  #c9c3b3;
    --nk-color-text:      var(--wp--preset--color--primary,      #0a1628);
    --nk-color-text-2:    var(--wp--preset--color--secondary,    #2a3445);
    --nk-color-muted:     var(--wp--preset--color--muted,        #6b7280);
    --nk-color-accent:    var(--wp--preset--color--accent,       #171234);
    --nk-color-accent-d:  var(--wp--preset--color--accent-deep,  #0d081c);
    --nk-color-accent-s:  var(--wp--preset--color--accent-soft,  #ebeaf3);
    --nk-color-success:   var(--wp--preset--color--success,      #059669);
    --nk-color-warn:      #d97706;
    --nk-color-danger:    var(--wp--preset--color--accent-2,     #dc2626);
    --nk-radius:          12px;
    --nk-radius-sm:       8px;
    --nk-radius-lg:       16px;
    --nk-shadow-sm:       0 1px 2px rgba(10,22,40,.05);
    --nk-shadow-md:       0 4px 16px rgba(10,22,40,.06);
    --nk-shadow-lg:       0 12px 40px rgba(10,22,40,.1);
    --nk-font:            var(--wp--preset--font-family--body, Inter, system-ui, sans-serif);
}

/* ──────────────────────────────────────────────────────────────────────
   Container
   ─────────────────────────────────────────────────────────────────── */

.nk-product {
    max-width: 1340px;
    margin: 0 auto;
    padding: calc(var(--header-height) + var(--space-md)) clamp(16px, 4vw, 40px) 80px;
    color: var(--nk-color-text);
    font-family: var(--nk-font);
    font-size: 16px;
    line-height: 1.55;
}

.nk-breadcrumbs {
    margin: 0 0 24px;
    font-size: 13px;
    color: var(--nk-color-muted);
}
.nk-breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.nk-breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: 6px;
    color: var(--nk-color-border-2);
}
.nk-breadcrumbs a {
    color: var(--nk-color-muted);
    text-decoration: none;
}
.nk-breadcrumbs a:hover {
    color: var(--nk-color-accent);
}
.nk-breadcrumbs [aria-current="page"] {
    color: var(--nk-color-text);
    font-weight: 600;
}

/* ──────────────────────────────────────────────────────────────────────
   Hero — gallery + purchase w JEDNYM białym boxie (single card layout)
   Galeria węższa (1fr), karta produktu szersza (1.3fr).
   ─────────────────────────────────────────────────────────────────── */

/* Hero — JEDEN biały box wokół galerii + karty. Proporcje 55/45, gap 64px. */
.nk-product__hero {
    display: grid;
    grid-template-columns: calc(55% - 32px) calc(45% - 32px);
    gap: 64px;
    align-items: start;
    margin-bottom: 24px;
    background: #ffffff;
    border-radius: var(--nk-radius-lg, 16px);
    padding: clamp(20px, 2.5vw, 36px);
    box-shadow: 0 4px 20px rgba(10, 22, 40, 0.06);
}

@media (max-width: 960px) {
    .nk-product__hero {
        grid-template-columns: 1fr;
    }
}

/* ─── Gallery ──────────────────────────────────────────── */

.nk-product__gallery {
    position: relative;
}

.nk-product__main-image {
    position: relative;
    background: var(--nk-color-surface-2, rgba(10, 22, 40, 0.03));
    border: none;
    border-radius: var(--nk-radius-lg);
    overflow: hidden;
    cursor: zoom-in;
}
.nk-product__main-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 640px;
    object-fit: contain;
    transition: opacity .2s;
}
.nk-product__main-image .nk-fade {
    opacity: 0;
}
.nk-product__zoom-hint {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(21,23,26,.78);
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: var(--nk-radius-sm);
    opacity: 0;
    transition: opacity .15s;
    pointer-events: none;
    backdrop-filter: blur(4px);
}
.nk-product__main-image:hover .nk-product__zoom-hint {
    opacity: 1;
}
.nk-product__no-image {
    color: var(--nk-color-muted);
    font-size: 14px;
}

/* Thumbs row — carousel z arrows + dots, szerokość = galeria container */
.nk-product__thumbs-wrap {
    margin-top: 14px;
    width: 100%;
}

.nk-product__thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.nk-thumb {
    background: var(--nk-color-surface, #fff);
    border: 2px solid transparent;
    border-radius: var(--nk-radius-sm);
    padding: 0;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    transition: border-color .15s, transform .15s;
    display: block;
}
/* JS-driven pagination — hide thumbs not in current page (data-thumbs-page-active) */
.nk-product__thumbs-wrap.is-paginated .nk-thumb {
    display: none;
}
.nk-product__thumbs-wrap.is-paginated .nk-thumb.is-visible {
    display: block;
}
.nk-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nk-thumb:hover {
    border-color: var(--nk-color-border-2);
}
.nk-thumb--active {
    border-color: var(--wp--preset--color--primary, #0a1628);
}

/* Thumbs controls — pagination dots (center) + prev/next arrows (right) */
.nk-product__thumbs-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}
.nk-product__thumbs-dots {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.nk-product__thumbs-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: rgba(10, 22, 40, 0.18);
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.nk-product__thumbs-dot:hover {
    background: rgba(10, 22, 40, 0.4);
}
.nk-product__thumbs-dot.is-active {
    background: var(--wp--preset--color--primary, #0a1628);
    transform: scale(1.2);
}

.nk-product__thumbs-arrows {
    grid-column: 3;
    display: inline-flex;
    gap: 8px;
    justify-self: end;
}
.nk-product__thumbs-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(10, 22, 40, 0.12);
    background: #ffffff;
    color: var(--wp--preset--color--primary, #0a1628);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.nk-product__thumbs-arrow:hover:not(:disabled) {
    background: var(--wp--preset--color--primary, #0a1628);
    border-color: var(--wp--preset--color--primary, #0a1628);
    color: #ffffff;
    transform: translateY(-1px);
}
.nk-product__thumbs-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ─── Purchase panel (sticky) ──────────────────────────── */

.nk-product__purchase {
    align-self: start;
}

/* Purchase-inner — bez własnego boxu, część wspólnej karty hero */
.nk-product__purchase-inner {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* ─── Trust row pod hero — bogata karta z 4 trust signals ─── */
.nk-product__trust-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    margin: 0 0 40px 0 !important;
}

.nk-product__trust-row .kordit-porownanie__trust-item {
    background: #ffffff;
    border: 1px solid rgba(10, 22, 40, 0.06);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex !important;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 1px 2px rgba(10, 22, 40, 0.03);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    margin: 0 !important;
}

.nk-product__trust-row .kordit-porownanie__trust-item:hover {
    border-color: rgba(220, 38, 38, 0.25);
    box-shadow: 0 8px 24px -8px rgba(10, 22, 40, 0.12);
    transform: translateY(-2px);
}

/* Ikona — białe kółko z czerwoną obwódką, czerwona ikonka */
.nk-product__trust-row .kordit-porownanie__trust-icon {
    flex: 0 0 auto;
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.08) !important;
    border-radius: 50%;
    box-shadow: none !important;
    margin: 0 !important;
}

.nk-product__trust-row .kordit-porownanie__trust-icon img {
    width: 22px;
    height: 22px;
    display: block;
}

.nk-product__trust-row .kordit-porownanie__trust-text {
    margin: 0 !important;
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nk-product__trust-row .kordit-porownanie__trust-title {
    color: var(--wp--preset--color--primary, #0a1628);
    font-size: 0.9375rem !important;
    line-height: 1.3;
    margin: 0 !important;
}

.nk-product__trust-row .kordit-porownanie__trust-title strong {
    font-weight: 700;
}

.nk-product__trust-row .kordit-porownanie__trust-sub {
    color: var(--wp--preset--color--ink-3, #6b7280);
    font-size: 0.8125rem !important;
    line-height: 1.5;
    margin: 0 !important;
}

@media (max-width: 1100px) {
    .nk-product__trust-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .nk-product__trust-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 960px) {
    .nk-product__purchase {
        position: static;
    }
}

/* ─── Heading ──────────────────────────────────────────── */

.nk-product__heading {
    margin-bottom: 18px;
}
.nk-product__meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.nk-product__brand {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--wp--preset--color--accent-2, #dc2626);
}
.nk-product__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--nk-color-surface-2);
    color: var(--nk-color-text);
    padding: 3px 8px;
    border-radius: 999px;
}
.nk-product__title {
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.25;
    margin: 0 0 8px;
    font-weight: 700;
}
.nk-product__id-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--nk-color-muted);
}
.nk-product__id-row strong {
    font-weight: 600;
    color: var(--nk-color-text);
}

/* ─── Price ────────────────────────────────────────────── */

.nk-product__lead {
    font-size: 14px;
    line-height: 1.5;
    color: var(--nk-color-text-2, var(--nk-color-muted));
    margin: 0 0 18px;
}

.nk-product__price-block {
    margin-bottom: 18px;
}

.nk-product__moq-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
}
.nk-product__moq-badge-label {
    color: var(--nk-color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}
.nk-product__moq-badge-value {
    color: var(--nk-color-accent-d);
    font-weight: 700;
    white-space: nowrap;
}

.nk-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
}
.nk-price__main,
.nk-price__promo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nk-color-text);
    line-height: 1.2;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}
.nk-price__promo {
    color: var(--nk-color-danger);
}
.nk-price__regular {
    font-size: 14px;
    color: var(--nk-color-muted);
    text-decoration: line-through;
}
.nk-price__suffix {
    font-size: 13px;
    font-weight: 500;
    color: var(--nk-color-muted);
    letter-spacing: 0;
    white-space: nowrap;
}
.nk-price__netto,
.nk-price__tiers {
    display: none;
}

.nk-product__tier-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(10,108,255,.08), rgba(10,108,255,.02));
    border: 1px solid rgba(10,108,255,.2);
    border-radius: var(--nk-radius);
    color: var(--nk-color-accent-d);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .12s;
}
.nk-product__tier-hint:hover {
    background: linear-gradient(90deg, rgba(10,108,255,.16), rgba(10,108,255,.06));
    border-color: rgba(10,108,255,.35);
}
.nk-product__tier-hint:active {
    transform: translateY(1px);
}
.nk-product__tier-hint-icon {
    display: inline-flex;
    color: var(--nk-color-accent);
}
.nk-product__tier-hint em {
    margin-left: 4px;
    font-style: normal;
    color: var(--nk-color-accent);
}

/* ─── Tier price modal ─────────────────────────────────── */

.nk-tier-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 200ms cubic-bezier(.16,1,.3,1);
}
.nk-tier-modal[hidden] { display: none; }
.nk-tier-modal.is-visible { opacity: 1; }

.nk-tier-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.nk-tier-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    padding: 28px 28px 22px;
    box-shadow:
        0 30px 60px -20px rgba(10,22,40,.45),
        0 12px 24px -8px rgba(10,22,40,.18);
    transform: translateY(12px) scale(.98);
    transition: transform 220ms cubic-bezier(.16,1,.3,1);
    color: var(--nk-color-text, #0a1628);
}
.nk-tier-modal.is-visible .nk-tier-modal__dialog {
    transform: translateY(0) scale(1);
}

.nk-tier-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    border-radius: 999px;
    font-size: 26px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    transition: background 160ms, color 160ms;
}
.nk-tier-modal__close:hover { background: #f3f4f6; color: #0a1628; }

.nk-tier-modal__header { padding-right: 36px; margin-bottom: 16px; }
.nk-tier-modal__title { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; }
.nk-tier-modal__lead { margin: 0; font-size: 0.875rem; color: var(--nk-color-muted, #6b7280); }

.nk-tier-modal__body { margin-top: 8px; }
.nk-tier-modal__body .nk-tier-table { width: 100%; }

/* ─── Features — grid 2-col, simple bullet markers ─────── */

.nk-product__features {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
}
.nk-product__features li {
    position: relative;
    padding-left: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--nk-color-text);
    display: flex;
    align-items: center;
    min-height: 22px;
}
.nk-product__features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nk-color-success, #059669);
    transform: translateY(-50%);
}

@media (max-width: 600px) {
    .nk-product__features {
        grid-template-columns: 1fr;
    }
}

/* ─── Pickers (kolor / rozmiar) ────────────────────────── */

.nk-add-to-cart {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nk-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nk-picker__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
}
.nk-picker__label {
    font-weight: 600;
    color: var(--nk-color-text);
}
.nk-picker__value {
    color: var(--nk-color-muted);
    font-style: italic;
}
.nk-picker__options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nk-swatch {
    appearance: none;
    background: var(--nk-color-bg);
    border: 1.5px solid var(--nk-color-border);
    border-radius: var(--nk-radius-sm);
    padding: 0;
    cursor: pointer;
    transition: border-color .15s, transform .15s, box-shadow .15s;
    font-family: inherit;
}
.nk-swatch:hover {
    border-color: var(--nk-color-border-2);
}
.nk-swatch.is-selected {
    border-color: var(--nk-color-accent);
    box-shadow: 0 0 0 3px rgba(10,108,255,.15);
}

.nk-swatch--text {
    min-width: 46px;
    height: 38px;
    padding: 0 12px;
}
.nk-swatch--text .nk-swatch__txt {
    font-size: 14px;
    font-weight: 600;
    color: var(--nk-color-text);
}

.nk-swatch--color {
    width: 36px;
    height: 36px;
    position: relative;
}
.nk-swatch--color .nk-swatch__dot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.nk-swatch__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* ─── Buy row ──────────────────────────────────────────── */

.nk-product__buy-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
}

/* ─── Qty stepper (− [input] +) ────────────────────────── */

.nk-qty {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nk-qty__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--nk-color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.nk-qty__label em {
    font-style: normal;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--nk-color-muted);
    opacity: .8;
}
.nk-qty__hint {
    font-size: 12px;
    color: var(--nk-color-accent);
    margin-top: 2px;
}
.nk-qty__hint strong {
    font-weight: 700;
    white-space: nowrap;
}
.nk-qty__stepper {
    display: inline-flex;
    align-items: stretch;
    background: var(--nk-color-bg);
    border: 1px solid var(--nk-color-border);
    border-radius: var(--nk-radius);
    overflow: hidden;
    transition: border-color .15s;
    width: fit-content;
}
.nk-qty__stepper:focus-within {
    border-color: var(--nk-color-accent);
    box-shadow: 0 0 0 3px var(--nk-color-accent-s, rgba(29,78,216,.15));
}
.nk-qty__btn {
    appearance: none;
    background: transparent;
    border: 0;
    width: 38px;
    font-family: var(--nk-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: var(--nk-color-text);
    cursor: pointer;
    transition: background .12s, color .12s;
    user-select: none;
}
.nk-qty__btn:hover {
    background: var(--nk-color-surface-2);
    color: var(--nk-color-accent);
}
.nk-qty__btn:active {
    background: var(--nk-color-accent-s);
}
.nk-qty__btn:focus-visible {
    outline: 2px solid var(--nk-color-accent);
    outline-offset: -2px;
}
.nk-qty__btn:disabled {
    color: var(--nk-color-border-2);
    cursor: not-allowed;
}
.nk-qty__btn--minus {
    border-right: 1px solid var(--nk-color-border);
}
.nk-qty__btn--plus {
    border-left: 1px solid var(--nk-color-border);
}
.nk-qty__input {
    width: 56px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    font-family: var(--nk-font);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: var(--nk-color-text);
    appearance: textfield;
    -moz-appearance: textfield;
    outline: 0;
}
.nk-qty__input::-webkit-outer-spin-button,
.nk-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Mirrors theme.json elements.button — keeps shape (12px radius, 1px solid
   accent border, weight 700) but shrinks the spacing so it fits the sidebar. */
.nk-add-to-cart__btn {
    appearance: none;
    background: var(--wp--preset--color--primary, #0a1628);
    color: #ffffff;
    border: 1px solid var(--wp--preset--color--primary, #0a1628);
    border-radius: 12px;
    font-family: var(--nk-font);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    padding: 0.85rem 1.4rem;
    min-height: 48px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.nk-add-to-cart__btn:hover,
.nk-add-to-cart__btn:focus {
    background: #000;
    border-color: #000;
    color: #fff;
    transform: translateY(-1px);
}
.nk-add-to-cart__btn:focus-visible {
    outline: 2px solid var(--nk-color-accent);
    outline-offset: 3px;
}
.nk-add-to-cart__btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
svg.nk-add-to-cart__btn-icon { display: block; }
.nk-add-to-cart__btn--success {
    background: var(--nk-color-success);
    border-color: var(--nk-color-success);
}

.nk-add-to-cart__feedback {
    font-size: 13px;
    color: var(--nk-color-success);
    min-height: 18px;
}
.nk-add-to-cart__feedback.is-error {
    color: var(--nk-color-danger);
}

.nk-add-to-cart__view-cart {
    display: inline-block;
    margin-top: 2px;
    color: var(--nk-color-accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.nk-add-to-cart__view-cart:hover {
    text-decoration: underline;
}

/* ─── Trust strip ──────────────────────────────────────── */

/* Trust chips — rounded pill style (icon + text na jasno-szarym tle) */
.nk-product__trust {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    font-size: 13px;
    color: var(--nk-color-text);
}
.nk-product__trust li {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--nk-color-surface-2, rgba(10, 22, 40, 0.05));
    border-radius: 999px;
    padding: 10px 16px;
}
.nk-product__trust-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    color: var(--nk-color-text);
    flex-shrink: 0;
}
.nk-product__trust-icon svg {
    width: 100%;
    height: 100%;
}
.nk-product__trust-stock--ok    .nk-product__trust-icon { color: var(--nk-color-success); }
.nk-product__trust-stock--low   .nk-product__trust-icon { color: var(--nk-color-warn); }
.nk-product__trust-stock--out   .nk-product__trust-icon { color: var(--nk-color-danger); }
.nk-product__trust-stock--out   { color: var(--nk-color-danger); }

/* ──────────────────────────────────────────────────────────────────────
   Tab nav (sticky, anchor-driven)
   ─────────────────────────────────────────────────────────────────── */

.nk-product__tabnav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--nk-color-bg);
    border: 1px solid var(--nk-color-border);
    border-radius: 8px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 16px;
    box-shadow: var(--nk-shadow-sm);
}
.nk-product__tabnav::-webkit-scrollbar {
    display: none;
}
/* Override theme button styles for tab buttons (they're <button> elements
   but should look like flat tabs, not pills). */
.nk-product__tab {
    flex-shrink: 0;
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 16px 18px;
    font-family: var(--nk-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--nk-color-muted);
    cursor: pointer;
    text-decoration: none;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
    line-height: 1;
}
.nk-product__tab:hover,
.nk-product__tab:focus {
    color: var(--nk-color-text);
    background: transparent;
}
.nk-product__tab.is-active,
.nk-product__tab[aria-selected="true"] {
    color: var(--nk-color-accent);
    border-bottom-color: var(--nk-color-accent);
}
.nk-product__tab:focus-visible {
    outline: 2px solid var(--nk-color-accent);
    outline-offset: -2px;
}

/* ──────────────────────────────────────────────────────────────────────
   Content sections
   ─────────────────────────────────────────────────────────────────── */

.nk-product__sections {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding-top: 40px;
}

.nk-product__section {
    scroll-margin-top: 72px;
}
.nk-product__section-title {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.25;
}
.nk-product__section-lead {
    margin: -8px 0 20px;
    color: var(--nk-color-muted);
    font-size: 14px;
}

.nk-product__prose {
    max-width: 760px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--nk-color-text);
}
.nk-product__prose p { margin: 0 0 1em; }
.nk-product__prose p:last-child { margin-bottom: 0; }
.nk-product__prose h2,
.nk-product__prose h3 { margin-top: 1.5em; }
.nk-product__prose ul,
.nk-product__prose ol { padding-left: 1.4em; }
.nk-product__prose a {
    color: var(--nk-color-accent);
}

/* ─── Spec table ──────────────────────────────────────── */

/* 3-column spec grid. Short rows (SKU, Model, Waga…) sit in one of three
   columns. Long-value rows (Kolory, Rozmiary — usually 5 comma-separated
   terms) get `--wide` and span all 3 columns so the value fits on one line. */
.nk-spec-table {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 40px;
    margin: 0;
    max-width: 100%;
}
.nk-spec-table__row {
    display: grid;
    grid-template-columns: minmax(120px, 0.6fr) 1fr;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--nk-color-border);
    margin: 0;
    font-size: 14px;
}
.nk-spec-table__row dt {
    color: var(--nk-color-muted);
    font-weight: 500;
}
.nk-spec-table__row dd {
    margin: 0;
    color: var(--nk-color-text);
    font-weight: 600;
    overflow-wrap: anywhere;
}
.nk-spec-table__row--wide {
    grid-column: 1 / -1;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

@media (max-width: 960px) {
    .nk-spec-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nk-spec-table__row--wide { grid-template-columns: minmax(120px, 0.6fr) 1fr; gap: 12px; }
}
@media (max-width: 600px) {
    .nk-spec-table { grid-template-columns: 1fr; column-gap: 0; }
    .nk-spec-table__row,
    .nk-spec-table__row--wide {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 10px 0;
    }
    .nk-spec-table__row dt { font-size: 12px; }
}

/* ─── Pricing tier table ──────────────────────────────── */

.nk-tier-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--nk-color-bg);
    border: 1px solid var(--nk-color-border);
    border-radius: var(--nk-radius);
    overflow: hidden;
}
.nk-tier-table thead {
    background: var(--nk-color-surface);
}
.nk-tier-table th,
.nk-tier-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--nk-color-border);
}
.nk-tier-table tbody tr:last-child td {
    border-bottom: 0;
}
.nk-tier-table th {
    font-weight: 600;
    color: var(--nk-color-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.nk-tier-table td:nth-child(2) {
    font-weight: 700;
    color: var(--nk-color-text);
}
.nk-tier-table td:nth-child(3) {
    color: var(--nk-color-success);
    font-weight: 600;
}

/* ─── Info grid (dostawa/gwarancja) ───────────────────── */

.nk-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    max-width: 880px;
}
.nk-info-card {
    background: var(--nk-color-surface);
    border: 1px solid var(--nk-color-border);
    border-radius: var(--nk-radius);
    padding: 16px;
}
.nk-info-card__label {
    font-size: 12px;
    color: var(--nk-color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
    font-weight: 600;
}
.nk-info-card__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--nk-color-text);
}

/* ─── Color gallery (ACF repeater) ────────────────────── */

.nk-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}
.nk-color-card {
    margin: 0;
    background: var(--nk-color-surface);
    border: 1px solid var(--nk-color-border);
    border-radius: var(--nk-radius);
    overflow: hidden;
    transition: border-color .15s, transform .15s;
}
.nk-color-card:hover {
    border-color: var(--nk-color-border-2);
    transform: translateY(-2px);
}
.nk-color-card__img-link {
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--nk-color-bg);
    cursor: zoom-in;
}
.nk-color-card__img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nk-color-card__name {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nk-color-text);
    text-align: center;
    border-top: 1px solid var(--nk-color-border);
}

/* ──────────────────────────────────────────────────────────────────────
   Related products
   ─────────────────────────────────────────────────────────────────── */

.nk-product__related {
    margin-top: 72px;
    padding-top: 40px;
    border-top: 1px solid var(--nk-color-border);
    position: relative;
}

/* Swiper carousel for related products */
.nk-product__related-swiper {
    position: relative;
    /* Clip slides horizontally via this wrapper; let card shadows spill into
       our padding-bottom (which is offset by the negative margin below). */
    overflow: hidden;
    padding-bottom: 50px;
    margin-bottom: -50px;
}
.nk-product__related-swiper .swiper {
    overflow: visible;
    padding: 12px 0 0;
}
.nk-product__related-swiper .swiper-wrapper {
    overflow: visible;
}
.nk-product__related-swiper .swiper-slide {
    overflow: visible;
}
.nk-product__related-swiper .swiper-slide {
    height: auto;
    display: flex;
}
.nk-product__related-swiper .swiper-slide > .nk-product-card {
    width: 100%;
}

/* Controls row: pagination (left) + nav arrows (right) below the carousel */
.nk-product__related-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    min-height: 38px;
}
.nk-product__related-swiper .swiper-pagination {
    position: static;
    width: auto;
    text-align: left;
}
.nk-product__related-swiper .swiper-pagination-bullet {
    width: 9px;
    height: 9px;
    background: #c9c5b8;
    opacity: 1;
    transition: background 160ms;
}
.nk-product__related-swiper .swiper-pagination-bullet:hover {
    background: var(--nk-color-muted, #6b7280);
}
.nk-product__related-swiper .swiper-pagination-bullet-active {
    background: var(--nk-color-accent, #171234);
}

.nk-product__related-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.nk-product__related-swiper .swiper-button-prev,
.nk-product__related-swiper .swiper-button-next {
    position: static;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #fff;
    color: var(--nk-color-text, #0a1628);
    box-shadow: 0 4px 12px -4px rgba(10, 22, 40, 0.18);
    border: 1px solid var(--nk-color-border, #e5e7eb);
    top: auto;
    transform: none;
    margin: 0;
    cursor: pointer;
    transition: background 160ms, color 160ms, transform 160ms;
}
.nk-product__related-swiper .swiper-button-prev:hover,
.nk-product__related-swiper .swiper-button-next:hover {
    background: var(--nk-color-accent, #171234);
    color: #fff;
    transform: translateY(-1px);
}
.nk-product__related-swiper .swiper-button-prev::after,
.nk-product__related-swiper .swiper-button-next::after {
    font-size: 14px;
    font-weight: 800;
}
.nk-product__related-swiper .swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────────────
   Lightbox
   ─────────────────────────────────────────────────────────────────── */

.nk-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,17,20,.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.nk-lightbox--open {
    display: flex;
}
.nk-lightbox__image-wrap {
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nk-lightbox__image {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
}
.nk-lightbox__close,
.nk-lightbox__prev,
.nk-lightbox__next {
    position: absolute;
    background: rgba(255,255,255,.1);
    color: #fff;
    border: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    transition: background .15s;
}
.nk-lightbox__close:hover,
.nk-lightbox__prev:hover,
.nk-lightbox__next:hover {
    background: rgba(255,255,255,.2);
}
.nk-lightbox__close { top: 20px; right: 20px; font-size: 24px; }
.nk-lightbox__prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.nk-lightbox__next  { right: 20px; top: 50%; transform: translateY(-50%); }
.nk-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(255,255,255,.1);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
}

/* ──────────────────────────────────────────────────────────────────────
   Mobile tweaks
   ─────────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .nk-product__hero { margin-bottom: 32px; }
    .nk-product__purchase-inner { padding: 18px; }
    .nk-product__buy-row { grid-template-columns: 1fr; }
}
