/* E-poe ostukorv — Kosmeetik Kati Põld */

.kp-cart-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: #18151A;
  color: #F4F4F0;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(24, 21, 26, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kp-cart-fab.kp-visible { display: inline-flex; }
.kp-cart-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(24, 21, 26, 0.34); }
.kp-cart-fab svg { width: 22px; height: 22px; }
.kp-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #8FB6B6;
  color: #fff;
  font: 700 0.72rem/22px "Public Sans", Arial, sans-serif;
  text-align: center;
}

.kp-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(24, 21, 26, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.kp-cart-open .kp-cart-overlay { opacity: 1; pointer-events: auto; }

.kp-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  width: min(430px, 100vw);
  background: #F4F4F0;
  box-shadow: -18px 0 48px rgba(24, 21, 26, 0.18);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  font-family: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  color: #18151A;
}
.kp-cart-open .kp-cart-drawer { transform: translateX(0); }
.kp-cart-open { overflow: hidden; }

.kp-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #E4E4DF;
  background: #FAFAF7;
}
.kp-cart-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0;
}
.kp-cart-close {
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
  color: #8F9394;
  border-radius: 8px;
}
.kp-cart-close:hover { color: #18151A; background: #EFEFEA; }
.kp-cart-close svg { width: 18px; height: 18px; display: block; }

.kp-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 26px;
}

.kp-cart-empty { text-align: center; color: #8F9394; padding: 48px 0; font-size: 0.95rem; }

.kp-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #E4E4DF;
}
.kp-item-thumb {
  width: 56px;
  height: 64px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #E4E4DF;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kp-item-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.kp-item-name { font-size: 0.88rem; font-weight: 600; line-height: 1.35; margin: 0 0 4px; }
.kp-item-price { font-size: 0.82rem; color: #2F2C30; }
.kp-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.kp-qty { display: inline-flex; align-items: center; border: 1px solid #E4E4DF; border-radius: 999px; background: #fff; }
.kp-qty button {
  width: 28px; height: 28px;
  border: none; background: none; cursor: pointer;
  font-size: 1rem; color: #18151A; line-height: 1;
}
.kp-qty button:disabled { color: #C9C9C4; cursor: default; }
.kp-qty span { min-width: 26px; text-align: center; font-size: 0.85rem; font-weight: 600; }
.kp-item-remove {
  border: none; background: none; cursor: pointer;
  font-size: 0.72rem; color: #8F9394; text-decoration: underline; text-underline-offset: 2px;
  padding: 0;
}
.kp-item-remove:hover { color: #B0413E; }

.kp-summary { padding: 14px 0 4px; font-size: 0.9rem; }
.kp-summary-row { display: flex; justify-content: space-between; margin-bottom: 6px; color: #2F2C30; }
.kp-summary-row.kp-total { font-weight: 700; font-size: 1.02rem; color: #18151A; border-top: 1px solid #E4E4DF; padding-top: 10px; margin-top: 8px; }

.kp-form { margin-top: 18px; }
.kp-form h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: 1.25rem;
  margin: 0 0 12px;
}
.kp-field { margin-bottom: 12px; }
.kp-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8F9394;
  margin-bottom: 5px;
}
.kp-field input, .kp-field select, .kp-field textarea {
  width: 100%;
  border: 1px solid #E4E4DF;
  background: #fff;
  border-radius: 8px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 0.92rem;
  color: #18151A;
}
.kp-field input:focus, .kp-field select:focus, .kp-field textarea:focus {
  outline: none;
  border-color: #18151A;
}
.kp-field textarea { min-height: 64px; resize: vertical; }

.kp-delivery { display: grid; gap: 8px; margin-bottom: 14px; }
.kp-delivery-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #E4E4DF;
  background: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  font-size: 0.9rem;
}
.kp-delivery-opt input { accent-color: #18151A; margin: 0; }
.kp-delivery-opt .kp-fee { margin-left: auto; font-weight: 600; font-size: 0.82rem; color: #2F2C30; white-space: nowrap; }
.kp-delivery-opt.kp-checked { border-color: #18151A; }

.kp-pay {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 15px 22px;
  background: #18151A;
  color: #F4F4F0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.kp-pay:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(24, 21, 26, 0.22); }
.kp-pay:disabled { opacity: 0.55; cursor: not-allowed; }
.kp-pay-card {
  width: 100%;
  border: 1px solid #18151A;
  border-radius: 999px;
  padding: 13px 22px;
  background: transparent;
  color: #18151A;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 10px;
}
.kp-pay-card:hover:not(:disabled) { background: #18151A; color: #F4F4F0; }
.kp-pay-card:disabled { opacity: 0.55; cursor: not-allowed; }

.kp-terms-note { font-size: 0.75rem; color: #8F9394; text-align: center; margin: 12px 0 0; }
.kp-terms-note a { color: inherit; }
.kp-error { color: #B0413E; font-size: 0.85rem; min-height: 1.2em; margin: 10px 0 0; text-align: center; }

.kp-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  background: #18151A;
  color: #F4F4F0;
  font-family: "Public Sans", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.kp-add-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(24,21,26,0.18); }
.kp-add-btn:disabled { background: #C9C9C4; cursor: not-allowed; }
.kp-add-btn svg { width: 14px; height: 14px; }

.kp-toast {
  position: fixed;
  left: 50%;
  bottom: 94px;
  transform: translateX(-50%) translateY(8px);
  z-index: 110;
  background: #18151A;
  color: #F4F4F0;
  padding: 11px 20px;
  border-radius: 10px;
  font: 500 0.85rem/1.4 "Public Sans", Arial, sans-serif;
  box-shadow: 0 14px 40px rgba(24, 21, 26, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}
.kp-toast.kp-show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 560px) {
  .kp-cart-fab { right: 16px; bottom: 16px; }
}
