/* Koszyk i etapy zamówienia */
.ck-steps,
.ct {
    --ct-text: #1e1e1e;
    --ct-muted: #6b6b6b;
    --ct-line: #ececec;
    --ct-soft: #f5f4f2;
    --ct-accent: #CD0000;
    font-family: 'Gilroy', sans-serif;
}

.ck-steps *,
.ct * {
    letter-spacing: normal;
}

/* ---------- Etapy ---------- */
.ck-steps {
    padding: 20px 0 8px;
    color: var(--ct-text);
}

.ck-list {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ck-step {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #9a9a9a;
}

.ck-step:not(:last-child)::after {
    content: "";
    flex: 1;
    height: 2px;
    margin-left: 4px;
    border-radius: 2px;
    background: var(--ct-line);
}

.ck-step.is-done:not(:last-child)::after {
    background: var(--ct-text);
}

.ck-step a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.ck-steps .ck-step a:hover {
    color: var(--ct-text);
    text-decoration: none;
}

.ck-num {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid #d6d6d6;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.ck-label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.ck-step.is-done {
    color: var(--ct-text);
}

.ck-step.is-done .ck-num {
    border-color: var(--ct-text);
    background: var(--ct-text);
    color: #fff;
    font-size: 12px;
}

.ck-step.is-current {
    color: var(--ct-text);
}

.ck-step.is-current .ck-num {
    border-color: var(--ct-accent);
    background: var(--ct-accent);
    color: #fff;
}

.ck-mobile {
    display: none;
}

/* ---------- Koszyk ---------- */
.ct {
    padding: 16px 0 64px;
    color: var(--ct-text);
}

.ct .ct-title {
    margin: 0 0 20px;
    line-height: 1.2;
    color: var(--ct-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 30px;
    font-weight: 700;
    text-transform: none;
}

.ct a:not(.b-btn) {
    color: inherit;
}

.ct-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 32px;
}

.ct-items {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--ct-line);
    list-style: none;
}

.ct-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--ct-line);
}

.ct-img {
    display: block;
    width: 112px;
    height: 112px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--ct-soft);
}

.ct-img img {
    width: 100%;
    height: 100%;
    padding: 8%;
    object-fit: contain;
    border-radius: 0;
    mix-blend-mode: multiply;
}

.ct-img--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ct-muted);
    font-size: 30px;
}

.ct-item--delivery {
    grid-template-columns: 64px minmax(0, 1fr);
}

.ct-item--delivery .ct-img {
    width: 64px;
    height: 64px;
}

.ct-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.ct-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ct .ct-name {
    color: var(--ct-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.ct a.ct-name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ct-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ct-text);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: 2px;
}

.ct .ct-unit {
    margin: 4px 0 0;
    color: var(--ct-muted);
    font-size: 13px;
}

.ct-price {
    flex: none;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

/* Pola: rozmiar i napis */
.ct-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
}

.ct-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 170px;
}

.ct-field--custom {
    flex: 1 1 240px;
}

.ct .ct-label {
    margin: 0;
    color: var(--ct-text);
    font-size: 13px;
    font-weight: 700;
}

.ct .ct-select,
.ct .ct-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid #d6d6d6;
    border-radius: 10px;
    background-color: #fff;
    color: var(--ct-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
}

.ct .ct-select {
    padding-right: 34px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231e1e1e' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.ct .ct-select:focus,
.ct .ct-input:focus {
    border-color: var(--ct-text);
    outline: none;
}

.ct .ct-input:disabled {
    background: var(--ct-soft);
    color: #9a9a9a;
}

.ct-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.ct-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ct-text);
}

.ct-error {
    display: none;
    color: var(--ct-accent);
    font-size: 12px;
    font-weight: 600;
}

.ct-field.has-error .ct-error {
    display: block;
}

.ct .ct-field.has-error .ct-select,
.ct .ct-field.has-error .ct-input {
    border-color: var(--ct-accent);
    background-color: #fdf6f6;
}

.ct .ct-remove {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    color: var(--ct-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.ct .ct-remove:hover {
    color: var(--ct-accent);
    text-decoration: none;
}

/* ---------- Podsumowanie ---------- */
.ct-summary {
    position: sticky;
    top: 64px;
    padding: 24px;
    border-radius: 14px;
    background: var(--ct-soft);
}

.ct .ct-summary-title {
    margin: 0 0 16px;
    color: var(--ct-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: none;
}

.ct-totals {
    display: grid;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 14px;
}

.ct-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.ct .ct-totals dt,
.ct .ct-totals dd {
    color: var(--ct-text);
    font-family: 'Gilroy', sans-serif;
}

.ct-totals dt {
    font-weight: 500;
}

.ct-totals dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.ct .ct-totals .ct-muted dt,
.ct .ct-totals .ct-muted dd {
    color: var(--ct-muted);
}

.ct .ct-totals .ct-discount dd {
    color: var(--ct-accent);
}

.ct-totals .ct-total {
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid #e2e0dc;
    font-size: 18px;
}

.ct-totals .ct-total dt,
.ct-totals .ct-total dd {
    font-weight: 700;
}

.ct-terms {
    display: flex;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px;
    border: 1.5px solid transparent;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
}

.ct-terms input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--ct-text);
}

.ct .ct-terms a {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ct-terms.has-error {
    border-color: var(--ct-accent);
}

.ct-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fdf1f1;
    color: #5a1a1a;
    font-size: 13px;
    line-height: 1.5;
}

.ct-alert[hidden] {
    display: none;
}

.ct-alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.ct .ct-next {
    justify-content: center;
    width: 100%;
    min-height: 48px;
    font-size: 16px;
}

.ct .b-btn.is-loading {
    opacity: .7;
    cursor: progress;
}

.ct .ct-continue {
    display: block;
    margin-top: 14px;
    color: var(--ct-text);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ct-sticky {
    display: none;
}

/* ---------- Pusty koszyk: karta na środku wolnej przestrzeni między nagłówkiem a stopką ---------- */
.ct--empty {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    padding: 40px 0;
}

.ct--empty > .container {
    width: 100%;
}

.ct-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}

.ct-empty-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: #fdf1f1;
    color: var(--ct-accent);
    font-size: 30px;
}

.ct .ct-empty-title {
    margin: 0 0 10px;
    color: var(--ct-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: none;
}

.ct .ct-empty-text {
    max-width: 520px;
    margin: 0 0 24px;
    color: #4a4a4a;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.55;
}


/* ================= Kroki 2–5 ================= */
.co-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.co-panel {
    padding: 24px;
    border: 1px solid var(--ct-line);
    border-radius: 14px;
    background: #fff;
}

.ct .co-panel-title {
    margin: 0 0 16px;
    color: var(--ct-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: none;
}

.ct .co-help,
.ct p.co-help {
    margin: 8px 0 0;
    color: var(--ct-muted) !important;
    font-size: 13px;
    line-height: 1.5;
}

.ct .co-error {
    margin: 8px 0 0;
    color: var(--ct-accent);
    font-size: 13px;
    font-weight: 600;
}

.ct .co-error[hidden] {
    display: none;
}

.ct .co-link {
    color: var(--ct-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Podsumowanie: lista produktów */
.co-lines {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
    padding: 0 0 18px;
    border-bottom: 1px solid #e2e0dc;
    list-style: none;
}

.co-line {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.co-thumb {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: #fff;
}

.co-thumb img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
    border-radius: 10px;
}

.co-qty {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ct-text);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.co-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.co-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.co-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    color: var(--ct-muted);
    font-size: 12px;
}

.co-price {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.co-delivery-name {
    display: block;
    color: var(--ct-muted);
    font-size: 12px;
    font-weight: 500;
}

/* Krok 2: kod rabatowy */
.co-voucher-row {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.co-voucher-row .ct-input {
    flex: 1;
    text-transform: uppercase;
}

.co-voucher-row .ct-input::placeholder {
    text-transform: none;
}

.co-voucher-row .b-btn {
    flex: none;
}

.ct .co-voucher-row.has-error .ct-input {
    border-color: var(--ct-accent);
    background: #fdf6f6;
}

.co-voucher-ok {
    display: flex;
    align-items: center;
    gap: 14px;
}

.co-voucher-ok > div {
    flex: 1;
}

.co-voucher-ok strong {
    font-size: 15px;
}

.ct .co-voucher-ok p {
    margin: 2px 0 0;
    color: var(--ct-muted);
    font-size: 13px;
}

.co-voucher-icon,
.co-done-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8f5ec;
    color: #1d7a3a;
    font-size: 16px;
}

/* Krok 3 i 4: opcje do wyboru (dostawa, płatność) */
.co-country {
    max-width: 320px;
    margin-bottom: 20px;
}

.co-options {
    margin: 0;
    padding: 0;
    border: 0;
}

.co-options legend {
    margin-bottom: 8px;
    border: 0;
    font-size: 13px;
}

.co-option-list {
    display: grid;
    gap: 10px;
}

.ct .co-option {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 14px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.ct .co-option:hover {
    border-color: #bdbdbd;
}

.ct .co-option:has(input:checked) {
    border-color: var(--ct-text);
    background: var(--ct-soft);
}

.co-option input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ct-accent);
}

.co-option-name {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    font-size: 15px;
    font-weight: 600;
}

.co-option-name small {
    color: var(--ct-muted);
    font-size: 12px;
    font-weight: 500;
}

.co-option-price {
    flex: none;
    font-size: 15px;
    font-weight: 700;
}

.co-option--skeleton {
    height: 52px;
    border-color: transparent;
    background: linear-gradient(90deg, #f1f0ee 25%, #e7e5e2 50%, #f1f0ee 75%);
    background-size: 200% 100%;
    animation: co-shimmer 1.2s infinite linear;
    cursor: default;
}

@keyframes co-shimmer {
    to {
        background-position: -200% 0;
    }
}

/* Krok 4: formularz */
.co-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.co-form .ct-field {
    min-width: 0;
}

.co-span-2 {
    grid-column: 1 / -1;
}

.co-more,
.co-rodo {
    margin-top: 16px;
}

.co-more summary,
.co-rodo summary {
    color: var(--ct-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.co-more[open] summary {
    margin-bottom: 14px;
}

.co-comment {
    margin-top: 16px;
}

.ct .co-textarea {
    height: auto;
    min-height: 84px;
    padding: 10px 12px;
    resize: vertical;
}

.co-optional {
    color: var(--ct-muted);
    font-weight: 500;
}

.co-rodo {
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--ct-soft);
}

.ct .co-rodo p {
    margin: 12px 0 0;
    color: #4a4a4a;
    font-size: 12px;
    line-height: 1.6;
}

.ct .co-legal {
    margin: 10px 0 0;
    color: var(--ct-muted);
    font-size: 12px;
    text-align: center;
}

/* Krok 5: potwierdzenie */
.co-done {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
}

.co-done > .container {
    width: 100%;
}

.co-done-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.co-done .co-done-icon {
    width: 76px;
    height: 76px;
    margin-bottom: 20px;
    font-size: 30px;
}

.co-done .ct-title {
    margin-bottom: 8px;
}

.ct .co-done-no {
    margin: 0 0 12px;
    font-size: 16px;
}

.ct .co-done-text {
    margin: 0 0 24px;
    color: #4a4a4a;
    font-size: 15px;
    line-height: 1.55;
}

.co-transfer {
    display: grid;
    gap: 14px;
    width: 100%;
    margin: 0 0 24px;
    padding: 20px 24px;
    border-radius: 14px;
    background: var(--ct-soft);
    text-align: left;
}

.co-transfer dt {
    margin-bottom: 4px;
    color: var(--ct-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em !important;
    text-transform: uppercase;
}

.co-transfer dd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.co-copy-val {
    font-variant-numeric: tabular-nums;
}

.ct .co-copy {
    flex: none;
    padding: 5px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    background: #fff;
    color: var(--ct-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ct .co-copy:hover {
    border-color: var(--ct-text);
}

.ct .co-pay {
    min-height: 48px;
    margin-bottom: 4px;
    padding: 0 28px;
    font-size: 16px;
}

/* ---------- Tablet i telefon ---------- */
@media (max-width: 991px) {
    .ct-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ct-summary {
        position: static;
    }

    .ck-label {
        display: none;
    }

    .ck-step.is-current .ck-label {
        display: inline;
    }
}

@media (max-width: 767px) {
    .ct .ct-empty-title {
        font-size: 26px;
    }

    .ck-list {
        gap: 4px;
    }

    .ck-step.is-current .ck-label {
        display: none;
    }

    .ck-mobile {
        display: block;
        margin: 10px 0 0;
        color: var(--ct-muted);
        font-size: 13px;
    }

    .ck-mobile strong {
        color: var(--ct-text);
    }

    .ct .ct-title {
        font-size: 24px;
    }

    .ct-item {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 14px;
    }

    .ct-img {
        width: 80px;
        height: 80px;
    }

    .ct-top {
        flex-direction: column;
        gap: 6px;
    }

    .ct .ct-name {
        font-size: 15px;
    }

    .ct-fields {
        flex-direction: column;
    }

    .ct-field,
    .ct-field--custom {
        flex: none;
        min-width: 0;
    }

    .ct {
        padding-bottom: 96px;
    }

    .ct-sticky {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 900;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--ct-line);
        background: #fff;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
        transition: transform .2s ease;
    }

    .ct-sticky.is-hidden {
        transform: translateY(110%);
    }

    .ct-sticky-label {
        display: block;
        color: var(--ct-muted);
        font-size: 12px;
    }

    .ct-sticky strong {
        font-size: 17px;
    }
}
