/* ===========================================================
   Wysuwany koszyk (side cart) — stały wygląd (brand Dobry Kartacz)
   =========================================================== */

.dkz-sc, .dkz-sc-overlay, .dkz-sc-toggle { box-sizing: border-box; font-family: 'Rubik', Helvetica, Arial, Lucida, sans-serif; }
.dkz-sc *, .dkz-sc *::before, .dkz-sc *::after { box-sizing: border-box; }
.dkz-sc-ico { display: block; }

/* Licznik (badge) */
.dkz-sc-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: #181818; color: #fff;
    font-size: 12px; font-weight: 600; line-height: 1;
}

/* Pływający przycisk */
.dkz-sc-toggle {
    position: fixed; right: 20px; bottom: 20px; z-index: 100001;
    width: 60px; height: 60px; border-radius: 50%;
    background: #fff; border: none; box-shadow: 0 4px 16px rgba(0,0,0,.2);
    cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fb471f;
    transition: transform .3s ease;
}
/* Po otwarciu koszyka ikona „jedzie" razem z panelem — zostaje przy jego krawędzi */
body.dkz-sc-open .dkz-sc-toggle { transform: translateX(-380px); }
@media (max-width: 480px) { body.dkz-sc-open .dkz-sc-toggle { opacity: 0; visibility: hidden; } }
.dkz-sc-toggle .dkz-sc-ico { width: 26px; height: 26px; }
.dkz-sc-toggle .dkz-sc-count { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; }

/* Nakładka */
.dkz-sc-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    opacity: 0; visibility: hidden; transition: opacity .3s ease; z-index: 99999;
}
body.dkz-sc-open .dkz-sc-overlay { opacity: 1; visibility: visible; }

/* Panel */
.dkz-sc {
    position: fixed; top: 0; right: 0; width: 380px; max-width: 100%; height: 100%;
    background: #f2f3f5; z-index: 100000; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .3s ease; box-shadow: -4px 0 24px rgba(0,0,0,.2);
}
body.dkz-sc-open .dkz-sc { transform: translateX(0); }
@media (max-width: 480px) { .dkz-sc { width: 100%; } }

/* Nagłówek */
.dkz-sc__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: #fff; border-bottom: 1px solid #eee; flex: 0 0 auto;
}
.dkz-sc__title { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; color: #181818; }
.dkz-sc__bag { position: relative; display: inline-flex; color: #181818; }
.dkz-sc__bag .dkz-sc-ico { width: 26px; height: 26px; }
.dkz-sc__bag .dkz-sc-count { position: absolute; top: -8px; right: -9px; }
.dkz-sc__close { background: none; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: #181818; padding: 0; }
.dkz-sc__close:hover { color: #fb471f; }

/* Zawartość */
.dkz-sc__content { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dkz-sc__body { flex: 1 1 auto; overflow-y: auto; padding: 16px; }

/* Pozycja */
.dkz-sc__item {
    position: relative;
    display: flex; align-items: flex-start; gap: 12px;
    background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.dkz-sc__item.is-loading { opacity: .5; pointer-events: none; }
.dkz-sc__thumb { flex: 0 0 60px; line-height: 0; }
.dkz-sc__thumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; display: block; }
.dkz-sc__info { flex: 1 1 auto; min-width: 0; }
.dkz-sc__name { display: block; font-weight: 700; color: #181818; text-decoration: none; font-size: 15px; margin-bottom: 4px; line-height: 1.3; }
.dkz-sc__name:hover { color: #fb471f; }
.dkz-sc__calc { font-size: 14px; color: #333; }
.dkz-sc__unit { color: var(--dk-color-green, #119e00); font-weight: 600; }
.dkz-sc__remove { flex: 0 0 auto; color: #181818; text-decoration: none; line-height: 0; padding: 2px; }
.dkz-sc__remove .dkz-sc-ico { width: 18px; height: 18px; }
.dkz-sc__remove:hover { color: #E02B20; }

/* Pusty koszyk — wyśrodkowany w dostępnej przestrzeni (bez pustki pod komunikatem) */
.dkz-sc__body:has(.dkz-sc__empty) { display: flex; flex-direction: column; justify-content: center; }
.dkz-sc__empty { text-align: center; padding: 24px 8px; }
.dkz-sc__empty-txt { font-weight: 600; color: #5c6660; margin: 0 0 20px; font-size: 16px; }

/* Stopka */
.dkz-sc__foot { background: #fff; border-top: 1px solid #eee; padding: 16px 20px; flex: 0 0 auto; }
.dkz-sc__totals { margin-bottom: 4px; }
.dkz-sc__row { display: flex; justify-content: space-between; font-weight: 700; color: #181818; padding: 8px 0; }
.dkz-sc__row + .dkz-sc__row { border-top: 1px dashed #ccc; }
.dkz-sc__note { text-align: center; color: #666; font-size: 13px; margin: 6px 0 14px; }

/* Przyciski — wg przewodnika 3.1 (Rubik 300 UPPERCASE, radius/token, tokeny kolorów).
   Rozmiar/ls mikro: 14px / 1px (dopuszczone dla side-cartu wg niespójności #2/#3). */
.dkz-sc__btn {
    display: block; width: 100%; text-align: center; padding: 14px 18px;
    border-radius: var(--dk-radius-btn, 9px);
    font-family: 'Rubik', Helvetica, Arial, Lucida, sans-serif; font-weight: 400; text-transform: uppercase;
    letter-spacing: 1px; font-size: 14px; line-height: 1.4;
    text-decoration: none; cursor: pointer; border: 2px solid transparent;
    margin-bottom: 10px;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.dkz-sc__btn:last-child { margin-bottom: 0; }
.dkz-sc__btn:active { filter: brightness(.93); }
/* Wzmocnienie fontu — Divi/motyw potrafi nadpisać font-family przycisków własnymi regułami.
   Wagi: wypełnione (orange/green) = 400, ghost (w samej ramce) = 500. */
.dkz-sc .dkz-sc__btn { font-family: 'Rubik', Helvetica, Arial, Lucida, sans-serif; font-weight: 400; }
.dkz-sc .dkz-sc__btn--ghost { font-weight: 500; }
.dkz-sc__btn--ghost { background: #fff; border-color: var(--dk-color-brand, #fb471f); color: var(--dk-color-brand, #fb471f); }
.dkz-sc__btn--ghost:hover { background: #fff4f0; }
.dkz-sc__btn--orange { background: var(--dk-color-brand, #fb471f); color: #fff; }
.dkz-sc__btn--orange:hover { background: var(--dk-color-brand-dark, #ca270b); color: #fff; }
.dkz-sc__btn--green { background: var(--dk-color-green, #119e00); color: #fff; }
.dkz-sc__btn--green:hover { background: var(--dk-color-green-dark, #007d00); color: #fff; }

/* ── Próg: komunikat + przycisk „+” (dobija do kolejnego progu) ── */
.dkz-sc__tier{ margin-top:8px; padding-right:40px; }   /* miejsce na „+” w prawym dolnym rogu */
.dkz-sc__tier-add{
    position:absolute; right:12px; bottom:12px;
    width:30px; height:30px; border:0; border-radius:8px;
    background:var(--dk-color-green,#119e00); color:#fff;
    font-size:22px; line-height:1; cursor:pointer;
    display:inline-flex; align-items:center; justify-content:center;
    transition:background-color .2s ease;
}
.dkz-sc__tier-add:hover{ background:var(--dk-color-green-dark,#007d00); }
.dkz-sc__tier-add:disabled{ opacity:.6; cursor:default; }
/* Wymuszamy mały, spójny rozmiar (motyw/Divi potrafi powiększać strong i ceny) */
.dkz-sc .dkz-sc__tier-msg{
    margin:0 !important;
    font-size:12.5px !important;
    line-height:1.45 !important;
    font-weight:400 !important;
    color:#5c6660 !important;
    letter-spacing:0 !important;
}
.dkz-sc .dkz-sc__tier-msg strong,
.dkz-sc .dkz-sc__tier-msg b,
.dkz-sc .dkz-sc__tier-msg .woocommerce-Price-amount,
.dkz-sc .dkz-sc__tier-msg .amount,
.dkz-sc .dkz-sc__tier-msg bdi{
    font-size:12.5px !important;
    line-height:1.45 !important;
    font-weight:600 !important;
    color:var(--dk-color-green,#119e00) !important;
}

/* ── Wiersz „Oszczędzasz" (zielony, między Kwotą a Łącznie) ── */
.dkz-sc__row--save{ border-top:none !important; }
.dkz-sc .dkz-sc__row--save,
.dkz-sc .dkz-sc__row--save *{ color:var(--dk-color-green,#119e00) !important; }
/* kreska tylko nad „Łącznie" (Kwota + Oszczędzasz zgrupowane) */
.dkz-sc__row--total{ border-top:1px dashed #ccc; }
