/* ==========================================================================
   Ścieżka zakupowa: wspólne elementy (nagłówek, kroki, karta podsumowania, formularze, loader)
   + koszyk. Zamówienie: 55-checkout.css, Moje konto: 58-account.css.
   ========================================================================== */

.elko-co { background: #fff; padding-bottom: var(--e-section); min-width: 0; }
.elko-co > .elko-wrap, .elko-co .woocommerce { min-width: 0; }

/* ---------- nagłówek ---------- */
.elko-co-head { padding: 56px 0 48px; }
.elko-co-head .elko-crumbs { margin: 0 0 24px; }
.elko-co-head .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.elko-co-head h1 { margin: 0; font-size: 40px; line-height: 1.1; letter-spacing: -.02em; }
.elko-co-head h1 small { margin-left: 8px; font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--e-muted); }

.elko-stepper { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.elko-stepper li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 600; color: var(--e-muted); }
.elko-stepper li + li::before { content: ""; width: 40px; height: 2px; margin: 0 14px; background: var(--e-line); }
.elko-stepper li.done + li::before, .elko-stepper li.on::before { background: var(--e-red); }
.elko-stepper li:first-child::before { content: none; }
.elko-stepper span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--e-line); border-radius: 50%; background: #fff; font-size: 13px; color: var(--e-muted); }
.elko-stepper span svg { width: 15px; height: 15px; }
.elko-stepper li.on, .elko-stepper li.done { color: var(--e-ink); }
.elko-stepper li.on span { border-color: var(--e-red); background: var(--e-red); color: #fff; }
.elko-stepper li.done span { border-color: var(--e-red); color: var(--e-red); }

/* ---------- układ: treść + przyklejone podsumowanie ---------- */
.elko-co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: start; padding-bottom: 40px; }
.elko-co-main, .elko-co-side { min-width: 0; }
.elko-co-side { position: sticky; top: calc(var(--e-header-h) + 24px); }
.elko-co-side .card { padding: 32px; border: 1px solid var(--e-line); border-radius: var(--e-r-xl); background: #fff; }
.elko-co-side h2 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 24px; font-size: 22px; }
.elko-co-side h2 a { font-size: 14px; font-weight: 600; }
.elko-co .ln { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 15px; color: var(--e-text); }
.elko-co .ln b { font-weight: 600; color: var(--e-ink); text-align: right; }
.elko-co .ln.tot { margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--e-line); font-size: 17px; font-weight: 600; color: var(--e-ink); }
.elko-co .ln.tot small { font-size: 12.5px; font-weight: 400; color: var(--e-muted); }
.elko-co .ln.tot b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.elko-co .ln .woocommerce-remove-coupon { margin-left: 6px; font-size: 12.5px; }
.elko-co .elko-btn.go { display: flex; width: 100%; min-height: 58px; margin-top: 24px; font-size: 17px; }

.elko-co-trust { display: grid; gap: 12px; margin: 24px 0 0; padding: 24px 0 0; border-top: 1px solid var(--e-line); list-style: none; }
.elko-co-trust li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; color: var(--e-text); }
.elko-co-trust svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--e-green); }
.elko-co-trust a { font-weight: 600; color: var(--e-ink); }

/* ---------- pasek darmowej dostawy ---------- */
.elko-co-free { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; padding: 20px 24px; border: 1px solid var(--e-sand); border-radius: var(--e-r-l); background: var(--e-cream); }
.elko-co-free > svg { width: 26px; height: 26px; color: var(--e-red); }
.elko-co-free > div { flex: 1; min-width: 0; }
.elko-co-free p { margin: 0 0 8px; font-size: 15px; color: var(--e-ink); }
.elko-co-free .bar { height: 8px; border-radius: 4px; background: #e8e2d6; overflow: hidden; }
.elko-co-free .bar i { display: block; height: 100%; border-radius: 4px; background: var(--e-green); transition: width .4s; }
.elko-co-free small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--e-muted); }
.elko-co-free.ok { border-color: #c9f0d8; background: #ecfdf3; }
.elko-co-free.ok > svg { color: var(--e-green); }

/* ---------- pozycje koszyka ---------- */
.elko-co-items { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--e-line); }
.elko-co-items > li { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto 110px 40px; gap: 20px; align-items: center; margin: 0; padding: 24px 0; border-bottom: 1px solid var(--e-line); }
.elko-co-items .ph { display: block; }
.elko-co-items .ph img { width: 104px; height: 104px; border-radius: var(--e-r); object-fit: cover; background: var(--e-soft); }
.elko-co-items .nm > a, .elko-co-items .nm > .t { display: block; font-size: 16.5px; font-weight: 600; line-height: 1.35; color: var(--e-ink); }
.elko-co-items .nm > a:hover { color: var(--e-red); }
.elko-co-items .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.elko-co-items .tags em { padding: 4px 10px; border-radius: var(--e-pill); background: var(--e-soft); font-size: 13px; font-style: normal; font-weight: 600; color: var(--e-text); }
.elko-co-items .tags small { font-size: 13px; color: var(--e-muted); }
.elko-co-items .sum { text-align: right; font-size: 17px; color: var(--e-ink); }
.elko-co-items .rm { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--e-line); border-radius: var(--e-r-s); background: #fff; color: var(--e-muted); }
.elko-co-items .rm svg { width: 17px; height: 17px; }
.elko-co-items .rm:hover { border-color: var(--e-red); color: var(--e-red); }

/* ilość +/- */
.elko-co .qty { display: inline-flex; align-items: center; height: 44px; border: 1px solid var(--e-line); border-radius: var(--e-r-m); overflow: hidden; background: #fff; }
.elko-co .qty button { display: grid; place-items: center; width: 40px; height: 100%; padding: 0; border: 0; background: #fff; color: var(--e-ink); }
.elko-co .qty button:hover { background: var(--e-soft); }
.elko-co .qty button { font-size: 18px; font-weight: 600; line-height: 1; }
.elko-co .qty .quantity { display: block; margin: 0; }
.elko-co .qty input.qty { width: 44px; min-height: 0; height: 42px; padding: 0; border: 0; border-radius: 0; text-align: center; font-weight: 600; box-shadow: none; -moz-appearance: textfield; appearance: textfield; display: block; }
.elko-co .qty input.qty::-webkit-outer-spin-button, .elko-co .qty input.qty::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.elko-co .qty .only input { width: 44px; }

/* dobierz do darmowej dostawy */
.elko-co-up { margin-top: 48px; }
.elko-co-up h3 { margin: 0 0 16px; font-size: 18px; }
.elko-co-up .list { border-top: 1px solid var(--e-line); }
.elko-co-up .it { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--e-line); }
.elko-co-up .it img { width: 64px; height: 64px; border-radius: var(--e-r-m); object-fit: cover; }
.elko-co-up .it > a { flex: 0 0 64px; }
.elko-co-up .it span { flex: 1; min-width: 0; }
.elko-co-up .it b { display: block; font-size: 15px; line-height: 1.3; }
.elko-co-up .it b a { color: var(--e-ink); }
.elko-co-up .it small { display: block; margin-top: 3px; font-size: 13px; color: var(--e-muted); }
.elko-co-up .it em { font-style: normal; font-weight: 700; font-size: 15px; color: var(--e-ink); white-space: nowrap; }
.elko-co-add { min-height: 40px; padding: 0 18px; border: 2px solid var(--e-red); border-radius: var(--e-r-m); background: #fff; color: var(--e-red); font-size: 14px; font-weight: 600; line-height: 1; }
.elko-co-add:hover { background: var(--e-red); color: #fff; }
.elko-co-add.busy { opacity: .5; pointer-events: none; }
.elko-co-back { display: inline-block; margin-top: 32px; font-size: 15px; font-weight: 600; color: var(--e-ink); text-decoration: underline; text-underline-offset: 4px; }

/* podsumowanie koszyka */
.elko-co-shipnote { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 0; padding: 14px 16px; border-radius: var(--e-r-m); background: var(--e-cream); font-size: 13.5px; }
.elko-co-shipnote svg { width: 20px; height: 20px; margin-top: 2px; color: var(--e-red); }
.elko-co-shipnote p { margin: 0; color: var(--e-text); }
.elko-co-pick { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--e-muted); }
.elko-co-pick svg { width: 16px; height: 16px; margin-top: 1px; }
.elko-co-pick a { font-weight: 600; color: var(--e-ink); }
.elko-co-coupon { margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--e-line); }
.elko-co-coupon summary { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 600; color: var(--e-ink); cursor: pointer; list-style: none; }
.elko-co-coupon summary::-webkit-details-marker { display: none; }
.elko-co-coupon summary::after { content: "+"; color: var(--e-red); font-size: 18px; line-height: 1; }
.elko-co-coupon[open] summary::after { content: "\2212"; }
.elko-co-coupon > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; min-width: 0; }
.elko-co-coupon input { flex: 1 1 140px; width: 0; min-width: 0; min-height: 46px; }
.elko-co-coupon .elko-btn { flex: 0 0 auto; min-height: 46px; padding: 0 18px; font-size: 14px; white-space: nowrap; }
.coupon-error-notice { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; color: var(--e-red); }
.elko-co-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.elko-co-bar { display: none; }

/* pusty koszyk */
.elko-co-empty { padding: 56px 20px 64px; text-align: center; }
.elko-co-empty > svg { width: 56px; height: 56px; margin: 0 auto; color: var(--e-muted); }
.elko-co-empty h2 { margin: 18px 0 8px; font-size: 28px; }
.elko-co-empty p { margin: 0 0 24px; color: var(--e-muted); }
.elko-co-empty-sec { margin-top: 56px; }
.elko-co-empty-sec > h3 { margin: 0 0 20px; font-size: 22px; }
.elko-co-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.elko-co-cats a { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--e-line); border-radius: var(--e-r-l); color: var(--e-ink); transition: border-color .2s; }
.elko-co-cats a:hover { border-color: var(--e-line-2); color: var(--e-ink); }
.elko-co-cats img { width: 56px; height: 56px; border-radius: var(--e-r-m); object-fit: cover; }
.elko-co-cats span { display: block; min-width: 0; }
.elko-co-cats b { display: block; font-size: 14.5px; line-height: 1.3; }
.elko-co-cats small { font-size: 12.5px; color: var(--e-muted); }

/* ---------- formularze Woo (wspólne: zamówienie, konto) ---------- */
.elko-co .form-row { margin: 0; padding: 0; min-width: 0; }
.elko-co .form-row label { display: block; margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: var(--e-ink); }
.elko-co .form-row .required, .elko-co abbr.required { color: var(--e-red); text-decoration: none; border: 0; }
.elko-co .form-row .optional { font-weight: 400; font-size: 12.5px; color: var(--e-muted); }
.elko-co .form-row input.input-text, .elko-co .form-row select, .elko-co .form-row textarea { min-height: 50px; border-radius: var(--e-r-m); }
.elko-co .form-row input::placeholder, .elko-co .form-row textarea::placeholder { color: #71717a; }
.elko-co .woocommerce-input-wrapper { display: block; position: relative; }
.elko-co .woocommerce-input-wrapper strong { display: block; padding: 13px 0; font-weight: 500; }
.elko-co .form-row.woocommerce-invalid input.input-text, .elko-co .form-row.woocommerce-invalid select, .elko-co .form-row.woocommerce-invalid .select2-selection { border-color: var(--e-red); background: #fffafa; }
.elko-co .form-row.woocommerce-invalid label { color: var(--e-red); }
.elko-co .form-row.woocommerce-validated input.input-text { border-color: var(--e-line); }
.elko-co .woocommerce-input-wrapper.password-input { display: block; }
.elko-co .show-password-input { position: absolute; top: 0; right: 0; width: 48px; height: 100%; border: 0; background: none; color: var(--e-muted); cursor: pointer; }
.elko-co .show-password-input::after { content: "Pokaż"; font-size: 12.5px; font-weight: 600; }
.elko-co .show-password-input.display-password::after { content: "Ukryj"; }

.elko-co .woocommerce-form__label-for-checkbox, .elko-co-chk { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 0; font-size: 14.5px; font-weight: 400; color: var(--e-ink); cursor: pointer; }
.elko-co input[type="checkbox"], .elko-co input[type="radio"] { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; flex: 0 0 18px; accent-color: var(--e-red); }
.elko-co .woocommerce-form__label-for-checkbox span, .elko-co-chk span { flex: 1; font-size: 14.5px; font-weight: 400; }

/* select2 / selectWoo */
.elko-co .select2-container { width: 100%; }
.elko-co .select2-container .select2-selection--single { height: 50px; border: 1px solid var(--e-line); border-radius: var(--e-r-m); background: #fff; }
.elko-co .select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0 40px 0 14px; line-height: 48px; font-size: 15px; color: var(--e-ink); }
.elko-co .select2-container--default .select2-selection--single .select2-selection__arrow { top: 0; right: 8px; height: 48px; }
.elko-co .select2-container--focus .select2-selection--single, .elko-co .select2-container--open .select2-selection--single { border-color: var(--e-ink); }
.select2-dropdown { border: 1px solid var(--e-line); border-radius: var(--e-r-m); overflow: hidden; box-shadow: 0 10px 30px rgba(24, 24, 27, .12); font-family: var(--e-font); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--e-red); }
.select2-search--dropdown .select2-search__field { min-height: 40px; border: 1px solid var(--e-line); border-radius: var(--e-r-s); }

/* ---------- ramki wyboru (dostawa, płatność) ---------- */
.elko-co-opts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.elko-co-opts > label, .elko-co-opts > li { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--e-line); border-radius: var(--e-r); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.elko-co-opts > label:hover, .elko-co-opts > li:hover { border-color: var(--e-line-2); }
.elko-co-opts > label.on, .elko-co-opts > li:has(input[type="radio"]:checked) { border-color: var(--e-red); box-shadow: 0 0 0 1px var(--e-red); background: #fffafa; }
.elko-co-opts > label > span { flex: 1; min-width: 0; }
.elko-co-opts b { display: block; font-size: 14.5px; color: var(--e-ink); }
.elko-co-opts small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--e-muted); }
.elko-co-opts em { font-style: normal; font-weight: 700; font-size: 14.5px; color: var(--e-ink); white-space: nowrap; }
.elko-co-opts > label > svg { width: 22px; height: 22px; color: var(--e-red); }
.elko-co-opts > label > input { margin: 0; }
.elko-co-empty-note { margin: 0; font-size: 14px; color: var(--e-muted); }

/* ---------- loader blockUI ---------- */
.blockUI.blockOverlay { border-radius: inherit; }
.blockUI.blockOverlay::before { content: ""; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 3px solid var(--e-line); border-top-color: var(--e-red); border-radius: 50%; animation: elko-spin .8s linear infinite; }
@keyframes elko-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .blockUI.blockOverlay::before { animation-duration: 2s; } }

/* ---------- komunikaty w ścieżce zakupowej ---------- */
.checkout-inline-error-message { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--e-red); }
.elko-co .woocommerce-NoticeGroup { margin: 0 0 24px; }
.elko-co .woocommerce-notices-wrapper { margin: 0 0 24px; }
.elko-co .woocommerce-message, .elko-co .woocommerce-info, .elko-co .woocommerce-error { border-radius: var(--e-r-m); font-size: 14.5px; }
.elko-co .woocommerce-error { padding-left: 18px; }
.elko-co .woocommerce-error li { margin: 0; }
.elko-co .woocommerce-error a, .elko-co .woocommerce-message a:not(.button), .elko-co .woocommerce-info a:not(.button) { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.elko-co .woocommerce-message a.restore-item { color: var(--e-red); }

/* ---------- tablet / telefon ---------- */
@media (max-width: 1024px) {
	.elko-co-grid { grid-template-columns: 1fr; gap: 48px; }
	.elko-co-side { position: static; }
	.elko-co-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.elko-co { padding-bottom: 96px; }
	.elko-co-head { padding: 24px 0 24px; }
	.elko-co-head .elko-crumbs { display: none; }
	.elko-co-head h1 { margin-bottom: 20px; font-size: 30px; }
	.elko-co-head .row { gap: 0; }
	.elko-stepper { width: 100%; }
	.elko-stepper li { gap: 6px; font-size: 12px; }
	.elko-stepper li + li { flex: 1; }
	.elko-stepper li + li::before { flex: 1; width: auto; min-width: 12px; margin: 0 8px; }
	.elko-stepper span { flex: 0 0 26px; width: 26px; height: 26px; }
	.elko-co-grid { gap: 40px; }
	.elko-co-free { margin-bottom: 24px; padding: 16px; }
	.elko-co-side .card { padding: 24px 20px; border-radius: var(--e-r-l); }
	.elko-co-items > li { grid-template-columns: 80px minmax(0, 1fr) 38px; gap: 10px 14px; padding: 18px 0; }
	.elko-co-items .ph { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
	.elko-co-items .ph img { width: 80px; height: 80px; }
	.elko-co-items .nm { grid-column: 2; grid-row: 1; }
	.elko-co-items .nm > a, .elko-co-items .nm > .t { font-size: 15px; }
	.elko-co-items .qty-wrap { grid-column: 2; grid-row: 2; justify-self: start; }
	.elko-co-items .qty { height: 40px; }
	.elko-co-items .sum { grid-column: 2 / 4; grid-row: 2; justify-self: end; align-self: center; }
	.elko-co-items .product-remove { grid-column: 3; grid-row: 1; align-self: start; }
	.elko-co-up { margin-top: 40px; }
	.elko-co-up .it { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "img nm btn" "img pr btn"; column-gap: 14px; row-gap: 2px; }
	.elko-co-up .it > a { grid-area: img; flex-basis: auto; }
	.elko-co-up .it img { width: 56px; height: 56px; }
	.elko-co-up .it span { grid-area: nm; }
	.elko-co-up .it em { grid-area: pr; font-size: 14px; }
	.elko-co-up .elko-co-add { grid-area: btn; min-height: 38px; padding: 0 14px; }
	.elko-co-cats { grid-template-columns: 1fr; }
	.elko-co-empty { padding: 32px 0 40px; }
	.elko-co-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--e-line); background: #fff; }
	.elko-co-bar small { display: block; font-size: 12px; color: var(--e-muted); }
	.elko-co-bar b { font-size: 20px; color: var(--e-ink); }
	.elko-co-bar .elko-btn { min-height: 50px; padding: 0 22px; }
}

/* kroki: bold jak w demo */
.elko-co-free b, .elko-co-items .sum, .elko-co-up .it b, .elko-co-mini .nm b { font-weight: 700; }
.elko-co-up .it b a { color: inherit; }
.elko-co-head .elko-crumbs b { font-weight: 600; color: var(--e-ink); }
.elko-co-ship { margin: 16px 0 0; padding: 0; border: 0; }
.elko-co-ship legend { margin-bottom: 12px; padding: 0; font-size: 15px; color: var(--e-text); }
.elko-co-shipcard { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--e-line); border-radius: var(--e-r); }
.elko-co-shipcard.on { border-color: var(--e-red); box-shadow: 0 0 0 1px var(--e-red); background: #fffafa; }
.elko-co-shipcard span { flex: 1; min-width: 0; }
.elko-co-shipcard > svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--e-muted); }
.elko-co-shipcard b { display: block; font-size: 14.5px; font-weight: 700; color: var(--e-ink); }
.elko-co-shipcard small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--e-muted); }
.elko-co-shipcard em { font-style: normal; font-weight: 700; font-size: 14.5px; color: var(--e-ink); white-space: nowrap; }
.elko-co-shipnote-s { margin: 0 0 4px; font-size: 12.5px; color: var(--e-muted); }
.elko-co-shipcard .dot { flex: 0 0 18px; width: 18px; height: 18px; border: 1.5px solid var(--e-line-2); border-radius: 50%; background: #fff; }
.elko-co-shipcard.on .dot { border-color: var(--e-red); background: radial-gradient(var(--e-red) 0 4px, #fff 5px); }
.elko-co-ship legend { font-weight: 600; color: var(--e-ink); }
