/* Mechanika sklepu: ruch, stany i mikrointerakcje według DESIGN-SYSTEM.md §4/§9/§11/§13. Wygląd (kolory, wymiary, układ) zostaje z prototypu;
   tokeny ruchu (--ruch-*) i połysk szkieletu pochodzą z b2b/ui/mechanika/ruch.css. Zero style="" w HTML; zero pętli poza szkieletem. */

/* ── odometr: kolumny cyfr w miejscu dawnego tekstu; wymiary i krój dziedziczy po elemencie ── */
/* Kolumny cyfr szerokości jednej cyfry tabelarycznej (1ch przy tabular-nums): liczba nie zmienia szerokości w trakcie ruchu,
   a wąska „1” nie zostawia odstępu („1 8,39 zł”), jak przy stałych .62em i cyfrach proporcjonalnych kroju. */
[data-odometer] > .odo { align-items: baseline; justify-content: flex-end; line-height: 1em; font-variant-numeric: tabular-nums; }
[data-odometer] > .odo > .odo-c { width: 1ch; height: 1em; overflow: hidden; vertical-align: bottom; }
[data-odometer] > .odo .odo-s > i { height: 1em; line-height: 1em; }
[data-odometer] > .odo > span:not(.odo-c):not(.odo-sr):not(.odo-live):not(.odo-rezerwa) { display: inline-block; height: 1em; line-height: 1em; }

/* ── przycisk w toku: połysk szkieletu zamiast spinnera; po sukcesie rysowany ptaszek (§10, §13); wymiary przycisku stoją (cta.js) ── */
.is-loading { position: relative; overflow: hidden; }
.is-loading .ti-shopping-cart,
.is-loading [data-ui-cta-label] .ti-shopping-cart { visibility: visible; }
.is-loading:after {
  content: ""; position: absolute; inset: 0; width: auto; height: auto; margin: 0; border: 0; border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  animation: ruch-shimmer var(--ruch-skeleton-czas) ease-in-out infinite; will-change: transform; pointer-events: none;
}
.cta-tick { width: 1.15em; height: 1.15em; vertical-align: -.2em; margin-right: .4em; flex: none; }
.round-cart.is-done:after { content: none; }
.round-cart > .cta-tick { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.round-cart.is-done > .ti { visibility: hidden; }

/* ── komunikaty: wejście i wyjście 300 ms (§4 toast), miniatura produktu, przyciski akcji ── */
.b2b-toast { animation: b2b-toast-in var(--ruch-toast-czas, 300ms) ease-out both; }
.b2b-toast.is-leaving { animation: b2b-toast-out var(--ruch-toast-czas, 300ms) ease-out both; }
@keyframes b2b-toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px); } }
.b2b-toast.has-thumb { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; }
.b2b-toast.has-thumb .b2b-toast__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.b2b-toast.has-thumb .b2b-toast__actions { grid-column: 1 / -1; justify-content: flex-end; }
.b2b-toast.has-thumb .b2b-toast__close { grid-column: 3; grid-row: 1; }
.b2b-toast__thumb { flex: none; width: 40px; height: 40px; border-radius: 6px; object-fit: contain; background: #f3f5f6; }
.b2b-toast__actions { flex: none; display: inline-flex; align-items: center; gap: 14px; }
.b2b-toast__undo { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: #006f46; cursor: pointer; }
.b2b-toast__undo:hover { text-decoration: underline; }
.b2b-toast__undo:disabled { opacity: .55; cursor: progress; }
@media (prefers-reduced-motion: reduce) {
  .b2b-toast, .b2b-toast.is-leaving { animation: none; }
}

/* ── ilość i pozycje koszyka: odpowiedź natychmiast (press 180 ms), ceny przygasają do czasu odpowiedzi serwera ── */
.qty-control button, [data-ui-cta] { transition: transform var(--ruch-press-czas) var(--ruch-interakcja), filter var(--ruch-press-czas) var(--ruch-interakcja); }
.qty-control button:active, [data-ui-cta]:active { transform: translateY(-1px); filter: brightness(1.06); }
.cart-item .item-price, .mini-cart__line .mini-cart__line-total, .mini-cart__line .mini-cart__price { transition: opacity var(--ruch-tab-content-czas) ease-out; }
.is-pending .item-price, .is-pending .mini-cart__line-total { opacity: .5; }
/* ── cena za sztukę w wierszu koszyka: kolumna ceny rośnie do treści, „113,98 zł / szt.” nie zawija się ── */
@media (min-width: 641px) {
  .cart-main .cart-item { grid-template-columns: 125px minmax(0, 1fr) 130px minmax(120px, max-content); }
  .cart-main .cart-item .item-price small { white-space: nowrap; }
}
.ui-quantity-message { transition: opacity var(--ruch-input-focus-czas) ease; }
.ui-quantity-message:empty { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .qty-control button, [data-ui-cta], .cart-item .item-price, .ui-quantity-message { transition: none; }
  .qty-control button:active, [data-ui-cta]:active { transform: none; }
}

/* ── podpowiedzi wyszukiwarki: wejście listy (dropdown 180 ms) i szkielet wiersza ── */
.search-suggest.open { animation: sklep-dropdown var(--ruch-dropdown-czas, 180ms) var(--ruch-wejscie, cubic-bezier(.25,.46,.45,.94)) both; }
@keyframes sklep-dropdown { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.search-suggest .suggest-row--skeleton { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; pointer-events: none; }
.suggest-skeleton-thumb { width: 42px; height: 42px; border-radius: 6px; }
.suggest-skeleton-title { width: 72%; height: 12px; margin-bottom: 8px; }
.suggest-skeleton-detail { width: 38%; height: 10px; }
.search-suggest [aria-busy="true"] { cursor: progress; }
@media (prefers-reduced-motion: reduce) { .search-suggest.open { animation: none; } }

/* ── listing: szkielety kart w kształcie kart produktu (§9), wejście wyników 200 ms ── */
.sklep-szkielet-karta .skeleton-shimmer { display: block; border-radius: 6px; }
.sklep-szkielet-karta .pc-media, .sklep-szkielet-karta .magento-photo { display: block; }
.sklep-szkielet-karta .pc-media .sklep-szkielet-zdjecie { height: 100%; border-radius: 0; }
.sklep-szkielet-karta .pc-buy { align-content: start; }
.sklep-szkielet-zdjecie { width: 100%; height: 100%; min-height: 140px; }
.sklep-szkielet-karta .sklep-szkielet-przycisk { width: 100%; height: 46px; margin-left: 0; border-radius: 10px; }
.sklep-szkielet-grupa { width: 34%; height: 10px; margin-bottom: 10px; }
.sklep-szkielet-tytul { width: 88%; height: 14px; margin-bottom: 8px; }
.sklep-szkielet-tytul.krotki { width: 62%; }
.sklep-szkielet-sku { width: 40%; height: 10px; margin-top: 6px; }
.sklep-szkielet-cena { width: 38%; height: 20px; }
.sklep-szkielet-przycisk { width: 44px; height: 38px; margin-left: auto; border-radius: 19px; }
.catalog-results[aria-busy="true"] { cursor: progress; }

/* ── karta produktu: przełączanie wariantu (przygaszenie), przenikanie zdjęcia, pasek zakupu (sticky-fade 140 ms / sheet 240 ms) ── */
.pdp-v3 .product-layout { transition: opacity var(--ruch-sticky-fade-czas) ease-out; }
.pdp-v3.pdp-przelaczanie .product-layout { opacity: .55; }
.gallery-stage { position: relative; }
.gallery-ghost { position: absolute; pointer-events: none; object-fit: contain; max-height: none; max-width: none; transition: none; filter: drop-shadow(0 18px 25px rgb(var(--theme-navy-rgb, 0 39 53) / .11)); }
.pdp-v3 .pdp-sticky-buy, .pdp-v3 .pdp-sticky-buy[hidden] {
  display: grid;
  transition: opacity var(--ruch-sticky-fade-czas) ease-out, transform var(--ruch-sticky-fade-czas) ease-out, visibility 0s linear 0s;
}
.pdp-v3 .pdp-sticky-buy[hidden] {
  opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 8px);
  transition: opacity var(--ruch-sticky-fade-czas) ease-out, transform var(--ruch-sticky-fade-czas) ease-out, visibility 0s linear var(--ruch-sticky-fade-czas);
}
@media (max-width: 700px) {
  .pdp-v3 .pdp-sticky-buy { transition: opacity var(--ruch-sheet-czas) var(--ruch-panel), transform var(--ruch-sheet-czas) var(--ruch-panel), visibility 0s linear 0s; }
  .pdp-v3 .pdp-sticky-buy[hidden] { transform: translate(-50%, 140%); transition: opacity var(--ruch-sheet-czas) var(--ruch-panel), transform var(--ruch-sheet-czas) var(--ruch-panel), visibility 0s linear var(--ruch-sheet-czas); }
}
@media (prefers-reduced-motion: reduce) {
  .pdp-v3 .product-layout, .pdp-v3 .pdp-sticky-buy, .pdp-v3 .pdp-sticky-buy[hidden] { transition: none; }
}

/* ── puste stany z jasnym CTA (ulubione, listy zakupowe): tytuł, wskazówka i przycisk; wejście 200 ms ── */
.account-empty--cta { display: grid; gap: 8px; justify-items: center; animation: ruch-fade-in var(--ruch-tab-content-czas, 200ms) ease-out both; }
.account-empty--cta strong { color: var(--text, #111416); font-size: 16px; }
.account-empty--cta p { margin: 0 0 8px; max-width: 460px; }
@keyframes ruch-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .account-empty--cta { animation: none; } }

/* ── filtr ceny w filtrach listingu: dwa pola od–do (netto), stała wysokość, bez skoku układu ── */
.filter-accordion.open .price-filter-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.price-filter-field { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 40px; column-gap: 6px; align-items: center; min-width: 0; }
.price-filter-field > span { grid-column: 1 / -1; font-size: 12px; line-height: 16px; color: var(--muted, #5b6573); margin-bottom: 4px; }
.price-filter-field > input { width: 100%; min-width: 0; height: 40px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--line, #d5dbe3); border-radius: 8px; background: #fff; color: inherit; font: inherit; font-size: 14px; }
.price-filter-field > em { font-style: normal; font-size: 13px; color: var(--muted, #5b6573); }
.price-filter-body > .filter-option-note { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12px; line-height: 16px; }
/* Telefon: prefiks kraju + numer w jednym slocie pola; ostrzeżenie dla adresu sprzed walidacji. */
.phone-input { display: flex; gap: 8px; width: 100%; min-width: 0; }
.phone-input > select.phone-prefix { flex: 0 0 112px; width: 112px; min-width: 0; }
.phone-input > input.phone-number { flex: 1 1 auto; width: auto; min-width: 0; }
.address-issue { margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff4e5; color: #7a4a00; font-size: 13px; line-height: 1.4; }
