/* ============================================
   Zemro Cart Drawer — cart-drawer.css v1.0.0
   ============================================ */

/* ── Overlay ── */
.zcd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.50);
  z-index: 99990;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.30s ease;
}
.zcd-overlay.open { display: block; opacity: 1; }

/* ── Drawer Panel ── */
.zcd-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: #fff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -6px 0 32px rgba(0,0,0,0.14);
  overflow: hidden;
}
.zcd-drawer.open { transform: translateX(0); }

/* ── Header ── */
.zcd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: #fff;
}
.zcd-header-left { display: flex; align-items: center; gap: 10px; }
.zcd-header-left .bi-cart3 { font-size: 22px; color: #111; }
.zcd-title { font-size: 18px; font-weight: 800; color: #111; }

.zcd-badge {
  background: #1565c0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.zcd-close {
  background: none;
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.zcd-close:hover { background: #f3f3f3; color: #111; }

/* ── Login Nudge ── */
.zcd-login-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #f0f6ff;
  border-bottom: 1px solid #dce8f5;
  flex-shrink: 0;
}
.zcd-nudge-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #333;
  line-height: 1.4;
}
.zcd-nudge-text .bi { font-size: 18px; color: #1565c0; flex-shrink: 0; }

.zcd-nudge-btn {
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.zcd-nudge-btn:hover { background: #1565c0; color: #fff; }

/* ── Scrollable Body ── */
.zcd-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
}
.zcd-body::-webkit-scrollbar { width: 4px; }
.zcd-body::-webkit-scrollbar-track { background: transparent; }
.zcd-body::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }

/* ── Loading Skeleton ── */
.zcd-loading { padding: 24px 20px; }
.zcd-skeleton {
  height: 16px;
  width: 100%;
  background: linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);
  background-size: 200% 100%;
  animation: zcd-shimmer 1.4s infinite;
  border-radius: 6px;
  margin-bottom: 12px;
}
@keyframes zcd-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty State ── */
.zcd-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}
.zcd-empty .bi-cart-x { font-size: 52px; color: #d0d0d0; }
.zcd-empty p { font-size: 15px; color: #888; font-weight: 500; margin: 0; }

.zcd-shop-btn {
  margin-top: 6px;
  background: #111;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.zcd-shop-btn:hover { background: #1565c0; color: #fff; }

/* ── Items ── */
.zcd-items { padding: 6px 0; }

.zcd-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid #f5f5f5;
  position: relative;
  transition: background 0.15s;
}
.zcd-item:hover { background: #fafafa; }

@keyframes zcd-slide-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.zcd-item.zcd-new { animation: zcd-slide-in 0.35s ease both; }
.zcd-item.removing { opacity: 0.4; pointer-events: none; transition: opacity 0.25s; }

.zcd-item-img {
  flex-shrink: 0;
  width: 80px; height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zcd-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.zcd-item-info { flex: 1; min-width: 0; }

.zcd-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zcd-item-name:hover { color: #1565c0; }

.zcd-item-variation {
  font-size: 11.5px;
  color: #888;
  display: block;
  margin-bottom: 6px;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.zcd-item-price {
  font-size: 15px;
  font-weight: 800;
  color: #1565c0;
  margin-bottom: 10px;
}
.zcd-item-price .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; color: inherit; }

/* ── Qty Controls ── */
.zcd-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 7px;
  overflow: hidden;
  height: 34px;
}
.zcd-qty-btn {
  background: #f5f5f5;
  border: none;
  width: 32px; height: 100%;
  font-size: 15px;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.zcd-qty-btn:hover { background: #111; color: #fff; }
.zcd-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.zcd-qty-val {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  min-width: 32px;
  text-align: center;
  padding: 0 4px;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
}

/* ── Remove ── */
.zcd-remove {
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.zcd-remove:hover { color: #e53935; background: #ffeaea; }

/* ── Coupon ── */
.zcd-coupon {
  padding: 14px 18px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  flex-shrink: 0;
}
.zcd-coupon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 4px 4px 4px 12px;
  transition: border-color 0.2s;
}
.zcd-coupon-row:focus-within { border-color: #1565c0; }
.zcd-coupon-row > .bi-tag { color: #aaa; font-size: 16px; flex-shrink: 0; }

.zcd-coupon-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13.5px;
  font-family: inherit;
  color: #111;
  background: transparent;
  padding: 6px 0;
}
.zcd-coupon-row input::placeholder { color: #bbb; }

.zcd-coupon-btn {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.zcd-coupon-btn:hover { background: #1565c0; }

.zcd-coupon-msg { font-size: 12.5px; margin-top: 7px; min-height: 16px; font-weight: 500; }
.zcd-coupon-msg.ok  { color: #00a65a; }
.zcd-coupon-msg.err { color: #e53935; }

.zcd-coupon-applied {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eafaf2;
  border: 1.5px solid #b2dfcc;
  color: #00a65a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  margin-top: 8px;
}
.zcd-coupon-remove {
  background: none;
  border: none;
  color: #00a65a;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.zcd-coupon-remove:hover { opacity: 1; }

/* ── Footer ── */
.zcd-footer {
  padding: 16px 18px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
  flex-shrink: 0;
}
.zcd-totals { margin-bottom: 14px; }

.zcd-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: #555;
  margin-bottom: 7px;
}
.zcd-total-row span:last-child { font-weight: 600; color: #111; }
.zcd-discount span:last-child  { color: #00a65a; font-weight: 700; }

.zcd-grand {
  font-size: 16px;
  font-weight: 800;
  color: #111;
  border-top: 1px solid #ebebeb;
  padding-top: 10px;
  margin-top: 6px;
  margin-bottom: 0;
}
.zcd-grand span:last-child { color: #1565c0; font-size: 18px; }
.zcd-tax-note { font-size: 11.5px; color: #aaa; text-align: right; margin: 3px 0 0; }

.zcd-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #111;
  color: #fff !important;
  text-decoration: none !important;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.15s;
  margin-bottom: 10px;
}
.zcd-checkout-btn:hover { background: #1565c0; transform: translateY(-1px); }

.zcd-viewcart-btn {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  padding: 7px;
  border-radius: 8px;
  border: 1.5px solid #e0e0e0;
  transition: border-color 0.15s, color 0.15s;
}
.zcd-viewcart-btn:hover { border-color: #1565c0; color: #1565c0; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .zcd-drawer  { width: 100vw; }
  .zcd-item-img { width: 68px; height: 68px; }
  .zcd-item-name  { font-size: 12.5px; }
  .zcd-item-price { font-size: 14px; }
}
