/* Prosty Polski – koszyk boczny. Kolor przycisków: --ppd-cart-color (WooCommerce → Ustawienia → Produkty → Koszyk boczny) */
.ppd-cart-lock, .ppd-cart-lock body { overflow: hidden !important; }

.ppd-cart { position: fixed; inset: 0; z-index: 999999; visibility: hidden; pointer-events: none; transition: visibility 0s .25s; font-size: 15px; line-height: 1.4; color: #222; }
.ppd-cart.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.ppd-cart__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
.ppd-cart.is-open .ppd-cart__overlay { opacity: 1; }
.ppd-cart__panel { position: absolute; top: 0; right: 0; width: 420px; max-width: 100%; height: 100%; height: 100dvh; display: flex; flex-direction: column; background: #fff; box-shadow: -4px 0 24px rgba(0, 0, 0, .15); transform: translateX(100%); transition: transform .25s ease; }
.ppd-cart.is-open .ppd-cart__panel { transform: none; }
@media (max-width: 767px) { .ppd-cart__panel { width: 80%; } }
@media (prefers-reduced-motion: reduce) { .ppd-cart, .ppd-cart__overlay, .ppd-cart__panel { transition: none; } }

/* Reset stylów motywu/Elementora wewnątrz panelu */
.ppd-cart a { text-decoration: none; }
.ppd-cart button { font: inherit; line-height: 1.2; text-transform: none; letter-spacing: normal; box-shadow: none; min-height: 0; margin: 0; cursor: pointer; }
.ppd-cart ul { list-style: none; margin: 0; padding: 0; }
.ppd-cart p { margin: 0; }
.ppd-cart img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

.ppd-cart__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; }
.ppd-cart .ppd-cart__title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; color: inherit; }
.ppd-cart .ppd-cart__close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #444; font-size: 28px; line-height: 1; }
.ppd-cart .ppd-cart__close:hover, .ppd-cart .ppd-cart__close:focus { background: #f2f2f2; color: #000; }

.ppd-cart__notice { margin: 12px 20px 0; padding: 10px 12px; border-radius: 6px; background: #fdecea; color: #8a1f11; font-size: 14px; }
.ppd-cart__notice.is-info { background: #E6F1F7; color: #1d4a63; }
.ppd-cart__notice[hidden] { display: none; }

/* Całość przewija się razem, stopka z przyciskiem kasy zawsze przyklejona do dołu */
.ppd-cart__body { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* Pozycje i polecane */
.ppd-cart__items { flex: none; padding: 8px 20px !important; }
.ppd-cart__item, .ppd-cart__ups-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; }
.ppd-cart__item + .ppd-cart__item { border-top: 1px solid #f0f0f0; }
.ppd-cart__thumb { display: block; width: 64px; height: 64px; }
.ppd-cart__info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ppd-cart .ppd-cart__name { color: inherit; font-weight: 600; overflow-wrap: anywhere; }
.ppd-cart .ppd-cart__name:hover { text-decoration: underline; }
.ppd-cart__price { font-size: 14px; color: #444; }
.ppd-cart__price del { opacity: .6; margin-right: 4px; }
.ppd-cart__price ins { text-decoration: none; }
.ppd-cart .ppd-cart__remove { width: 34px; height: 34px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: #888; }
.ppd-cart .ppd-cart__remove:hover, .ppd-cart .ppd-cart__remove:focus { background: #fdecea; color: #b32d2e; }

.ppd-cart__ups { margin: 8px 0 0; padding: 16px 20px; background: #E6F1F7; }
.ppd-cart .ppd-cart__ups-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.ppd-cart__ups-item { grid-template-columns: 52px 1fr auto; padding: 8px 0; }
.ppd-cart__ups-item .ppd-cart__thumb { width: 52px; height: 52px; }
.ppd-cart__ups-item .ppd-cart__name { font-size: 14px; }
.ppd-cart .ppd-cart__ups-btn { display: inline-block; padding: 8px 14px; border: 1px solid var(--ppd-cart-color, #2f7d4f); border-radius: 6px; background: #fff; color: var(--ppd-cart-color, #2f7d4f); font-size: 14px; font-weight: 600; white-space: nowrap; }
.ppd-cart .ppd-cart__ups-btn:hover, .ppd-cart .ppd-cart__ups-btn:focus { background: var(--ppd-cart-color, #2f7d4f); color: #fff; }
.ppd-cart .ppd-cart__ups-btn.loading { opacity: .6; pointer-events: none; }

/* Komputer: polecane jako kolumna po lewej stronie panelu (jak w FunnelKit Cart).
   Kontenerem jest panel (position: absolute), więc przewijana treść koszyka jej nie przycina. */
@media (min-width: 1024px) {
	.ppd-cart__ups { position: absolute; top: 0; right: 100%; bottom: 0; width: 320px; margin: 0; padding: 20px; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; box-shadow: -4px 0 24px rgba(0, 0, 0, .12); }
	.ppd-cart .ppd-cart__ups-title { font-size: 18px; margin-bottom: 8px; }
	.ppd-cart__ups-item { grid-template-columns: 72px 1fr; align-items: start; padding: 12px 0; }
	.ppd-cart__ups-item + .ppd-cart__ups-item { border-top: 1px solid rgba(0, 0, 0, .08); }
	.ppd-cart__ups-item .ppd-cart__thumb { width: 72px; height: 72px; }
	.ppd-cart .ppd-cart__ups-item .ppd-cart__ups-btn { grid-column: 2; justify-self: start; margin-top: -4px; }
}

/* Stopka */
.ppd-cart__foot { position: sticky; bottom: 0; margin-top: auto; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid #eee; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.ppd-cart__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; }
.ppd-cart__total strong { font-size: 19px; }
.ppd-cart__note { font-size: 13px; color: #555; }

/* Kod rabatowy */
.ppd-cart__coupon summary { cursor: pointer; font-size: 14px; color: #444; text-decoration: underline; list-style: none; }
.ppd-cart__coupon summary::-webkit-details-marker { display: none; }
.ppd-cart__coupon-form { display: flex; gap: 8px; margin-top: 8px; }
.ppd-cart .ppd-cart__coupon-form input { flex: 1; min-width: 0; height: 40px; margin: 0; padding: 0 12px; border: 1px solid #ccc; border-radius: 6px; background: #fff; font-size: 15px; box-sizing: border-box; }
.ppd-cart .ppd-cart__coupon-form button { height: 40px; padding: 0 16px; border: 1px solid var(--ppd-cart-color, #2f7d4f); border-radius: 6px; background: #fff; color: var(--ppd-cart-color, #2f7d4f); font-size: 14px; font-weight: 600; }
.ppd-cart .ppd-cart__coupon-form button:hover, .ppd-cart .ppd-cart__coupon-form button:focus { background: var(--ppd-cart-color, #2f7d4f); color: #fff; }
.ppd-cart__coupon-msg { padding: 8px 10px; border-radius: 6px; background: #E6F1F7; color: #1d4a63; font-size: 13px; }
.ppd-cart__coupon-msg.is-error { background: #fdecea; color: #8a1f11; }
.ppd-cart__coupon-msg[hidden] { display: none; }
.ppd-cart__discount { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; color: var(--ppd-cart-color, #2f7d4f); }
.ppd-cart .ppd-cart__coupon-remove { padding: 0; border: 0; background: none; color: #888; font-size: 13px; text-decoration: underline; }
.ppd-cart .ppd-cart__coupon-remove:hover, .ppd-cart .ppd-cart__coupon-remove:focus { background: none; color: #b32d2e; }
.ppd-cart .ppd-cart__btn { display: block; width: 100%; padding: 15px 16px; border: 0; border-radius: 6px; background: var(--ppd-cart-color, #2f7d4f); color: #fff; font-size: 17px; font-weight: 700; text-align: center; box-sizing: border-box; }
.ppd-cart .ppd-cart__btn:hover, .ppd-cart .ppd-cart__btn:focus { color: #fff; filter: brightness(.92); }
.ppd-cart__checkout-total .woocommerce-Price-amount { color: inherit; }
.ppd-cart .ppd-cart__back { display: block; text-align: center; color: #444; font-size: 14px; text-decoration: underline; }

/* Pusty koszyk */
.ppd-cart__empty { margin: auto 0; padding: 40px 24px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.ppd-cart .ppd-cart__empty-title { font-size: 19px; font-weight: 700; }
.ppd-cart__empty-text { color: #555; }

/* Ładowanie */
.ppd-cart__loader { display: none; position: absolute; inset: 0; background: rgba(255, 255, 255, .6); }
.ppd-cart__loader::after { content: ""; position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; border: 3px solid #ddd; border-top-color: var(--ppd-cart-color, #2f7d4f); border-radius: 50%; animation: ppd-cart-spin .7s linear infinite; }
.ppd-cart.is-busy .ppd-cart__loader { display: block; }
@keyframes ppd-cart-spin { to { transform: rotate(360deg); } }

/* Strona koszyka – shortcode [ppd_koszyk]: ta sama zawartość w zwykłym bloku; podsumowanie z przyciskiem kasy od razu pod produktami, polecane na końcu */
.ppd-cart.ppd-cart--page { position: relative; inset: auto; z-index: auto; visibility: visible; pointer-events: auto; transition: none; width: 100%; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; overflow: hidden; }
.ppd-cart--page .ppd-cart__body { overflow: visible; }
.ppd-cart--page .ppd-cart__foot { position: static; order: 1; margin-top: 0; }
.ppd-cart--page .ppd-cart__ups { order: 2; position: static; width: auto; margin: 0; padding: 16px 20px; box-shadow: none; overflow: visible; }
.ppd-cart--page .ppd-cart__ups-item { grid-template-columns: 52px 1fr auto; align-items: center; padding: 8px 0; }
.ppd-cart--page .ppd-cart__ups-item .ppd-cart__thumb { width: 52px; height: 52px; }
.ppd-cart.ppd-cart--page .ppd-cart__ups-item .ppd-cart__ups-btn { grid-column: auto; margin-top: 0; }
@media (min-width: 768px) {
	.ppd-cart--page .ppd-cart__item { grid-template-columns: 80px 1fr auto; }
	.ppd-cart--page .ppd-cart__item .ppd-cart__thumb { width: 80px; height: 80px; }
}

/* Przycisk produktu, który już jest w koszyku („✓ W koszyku”) – jasnozielony, wyraźnie inny niż „Dodaj do koszyka” */
.button.ppd-in-cart, a.ppd-in-cart, button.ppd-in-cart { background: #eaf5ee !important; color: #2f7d4f !important; border: 1px solid #b9dcc6 !important; box-shadow: none !important; text-align: center; }
.button.ppd-in-cart:hover, a.ppd-in-cart:hover, button.ppd-in-cart:hover { background: #dcefe3 !important; color: #12301f !important; }
.ppd-in-cart__icon { display: inline-block; width: 1.05em; height: 1.05em; margin-right: 5px; vertical-align: -.15em; }

/* Pływająca ikona */
.ppd-cart-icon { position: fixed; right: 20px; bottom: 20px; z-index: 999998; width: 56px; height: 56px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--ppd-cart-color, #2f7d4f); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer; }
.ppd-cart-icon[hidden] { display: none; }
.ppd-cart-icon:hover, .ppd-cart-icon:focus { background: var(--ppd-cart-color, #2f7d4f); color: #fff; filter: brightness(.92); }
.ppd-cart-icon__count { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #222; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; box-sizing: border-box; }
@media (max-width: 767px) { .ppd-cart-icon { right: 14px; bottom: 14px; width: 50px; height: 50px; } }
