@charset "UTF-8";
/* =========================
   DRAWER CART – KONTAINER
   ========================= */
.sp-drawer-cart {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  visibility: hidden;
  width: min(380px, 100vw);
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, visibility 0.3s ease;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  /* A11Y: kiedy aria-hidden=true, nie łap klików */
}
.sp-drawer-cart[aria-hidden=true] {
  pointer-events: none;
}
.sp-drawer-cart[aria-hidden=false] {
  pointer-events: auto;
}
.sp-drawer-cart.open {
  transform: translateX(0);
  visibility: visible;
}

/* Blokada scrolla strony przy otwartym drawerze */
body.sp-cart-open {
  overflow: hidden;
}

/* =========================
   OVERLAY
   ========================= */
.sp-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 99998;
  cursor: pointer;
}
.sp-cart-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================
   NAGŁÓWEK + X
   ========================= */
.sp-drawer-header {
  flex-shrink: 0;
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  z-index: 10;
}
.sp-drawer-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}
.sp-drawer-header button {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}

/* X: czytelny + dobry hit-area */
#sp-close-cart {
  color: #111 !important;
  background: none !important;
  border: none !important;
  font-size: 28px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#sp-close-cart:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* =========================
   LISTA PRODUKTÓW
   ========================= */
.sp-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  padding-bottom: 0;
}

/* =========================
   POJEDYNCZA POZYCJA
   ========================= */
.sp-cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f1f1;
}
.sp-cart-item:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}
.sp-cart-item.removing {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* miniaturka */
.sp-cart-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

/* Main content */
.sp-cart-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Wiersze */
.sp-cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Góra: nazwa + remove + line total */
.sp-cart-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-cart-row-top .title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin: 0;
  max-width: 70%;
}
.sp-cart-row-top .line-total {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin: 0;
  white-space: nowrap;
}

/* Remove button */
.sp-remove-item {
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
  transition: color 0.2s ease;
  flex-shrink: 0;
  margin: 0 4px;
}
.sp-remove-item:hover {
  color: #e74c3c;
}
.sp-remove-item:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 0;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #111;
}

/* Dół: qty + unit price */
.sp-cart-row-bottom {
  margin-top: 2px;
  align-items: center;
}

/* =========================
   QTY PILL: - [qty] +
   ========================= */
.qty-wrapper {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 6px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e3e3e3;
  border-radius: 999px;
  background: #f2f2f2;
}

/* +/- (ciemne) */
.sp-qty {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent !important;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: #111 !important;
  font-weight: 600;
}

/* input quantity – twardy reset (wygrywa z motywem) */
.sp-drawer-cart input.qty-input {
  width: 28px;
  height: 32px;
  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  text-align: center;
  font-size: 13px;
  line-height: 32px;
  color: #111;
  appearance: none;
  -webkit-appearance: none;
}

/* =========================
   STOPKA – SUBTOTAL + CTA
   ========================= */
.sp-drawer-footer {
  flex-shrink: 0;
  border-top: 1px solid #f1f1f1;
  padding: 16px 20px 20px;
  background: #fff;
  z-index: 10;
}
.sp-drawer-footer .cart-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
}
.sp-drawer-footer .cart-line span {
  font-size: 13px;
  color: #666;
}
.sp-drawer-footer .cart-line strong {
  font-size: 15px;
  font-weight: 600;
}
.sp-drawer-footer .cart-line--subtotal {
  padding-top: 0;
  padding-bottom: 4px;
}
.sp-drawer-footer .cart-line--subtotal span {
  font-size: 13px;
  color: #888;
}
.sp-drawer-footer .cart-line--subtotal strong {
  font-size: 14px;
  font-weight: 500;
  color: #666;
}
.sp-drawer-footer .cart-line--total {
  padding-top: 8px;
  margin-bottom: 14px;
}
.sp-drawer-footer .cart-line--total span {
  font-size: 14px;
  color: #222;
  font-weight: 600;
}
.sp-drawer-footer .cart-line--total strong {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}
.sp-drawer-footer .checkout-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  transition: background 0.2s ease, transform 0.05s ease;
}
.sp-drawer-footer .checkout-btn:hover {
  background: var(--btn-bg-hover);
  text-decoration: none;
  color: var(--btn-text);
}
.sp-drawer-footer .checkout-btn:active {
  transform: translateY(1px);
}
.sp-drawer-footer .checkout-btn.is-disabled, .sp-drawer-footer .checkout-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--color-light-sand) !important;
  color: var(--color-text-muted) !important;
}
.sp-drawer-footer .checkout-btn.is-disabled:hover, .sp-drawer-footer .checkout-btn[disabled]:hover {
  opacity: 0.35;
  transform: none;
}
.sp-drawer-footer:has(.sp-cart-empty-state[style*="display: flex"]) .cart-line, .sp-drawer-footer:has(.sp-cart-empty-state[style*="display: block"]) .cart-line {
  display: none;
}
.sp-drawer-footer:has(.sp-cart-empty-state[style*="display: flex"]) .sp-drawer-discount, .sp-drawer-footer:has(.sp-cart-empty-state[style*="display: block"]) .sp-drawer-discount {
  display: none;
}

/* =========================
   BUNDLE DISCOUNT LINE
   ========================= */
.sp-drawer-discount {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 0 8px;
  margin-bottom: 0;
  border-bottom: 1px solid #e5e5e5;
}

.sp-drawer-discount__label {
  font-weight: 600;
  font-size: 0.92rem;
  color: #222;
}

.sp-drawer-discount__value {
  text-align: right;
}

.sp-drawer-discount .bundle-discount-amount {
  color: #c64827;
  font-size: 1rem;
  font-weight: 700;
  display: block;
}

.sp-drawer-discount .bundle-discount-note {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.3;
}

/* =========================
   EMPTY CART STATE (BRAND COLORS)
   ========================= */
.sp-cart-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
}
.sp-cart-empty-state[style*="display: flex"], .sp-cart-empty-state[style*="display: block"] {
  display: flex !important;
}

.sp-cart-empty-message {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1.4;
}

.sp-continue-shopping {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-ptb) var(--btn-plr);
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  border-radius: var(--btn-radius);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.05s ease;
  min-height: 44px;
  line-height: 1;
  margin-top: var(--space-xs);
}
.sp-continue-shopping:hover {
  background: var(--btn-bg-hover);
  text-decoration: none;
  color: var(--btn-text);
}
.sp-continue-shopping:active {
  transform: translateY(1px);
}
.sp-continue-shopping:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 0;
}

/* =========================
   A11Y: FOCUS VISIBLE
   ========================= */
#sp-open-cart:focus-visible,
#sp-close-cart:focus-visible,
.sp-drawer-cart button:focus-visible,
.sp-drawer-cart a.checkout-btn:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 0;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #111;
}

.qty-wrapper .sp-qty:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 0;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #111;
}

/* =========================
   SR ONLY (dla badge / komunikatów SR)
   ========================= */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================
   RESPONSIVE - EMPTY STATE
   ========================= */
@media (max-width: 768px) {
  .sp-cart-empty-state {
    padding: var(--space-xl) 0 var(--space-lg);
    gap: var(--space-md);
  }

  .sp-cart-empty-message {
    font-size: 0.95rem;
  }

  .sp-continue-shopping {
    padding: 12px 24px;
    font-size: 13px;
    min-height: 40px;
  }
}
.sp-drawer-upsell {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(178, 122, 80, 0.12);
  /* delikatny cozy tone */
  color: #5B4636;
  font-size: 14px;
  text-align: center;
}

.sp-drawer-upsell__was {
  text-decoration: line-through;
  opacity: 0.8;
}

/*# sourceMappingURL=drawer-cart.css.map */
