/* ═══════════════════════════════
   DROPVAULT — CART STYLES
   Add <link rel="stylesheet" href="cart.css">
   to every page that needs the cart
═══════════════════════════════ */

/* ── CART BUTTON ── */
.cart-btn-wrap { position: relative; }
.cart-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #555; cursor: pointer; transition: all 0.2s;
  border: none; background: transparent; position: relative;
}
.cart-btn:hover { background: #f5f5f5; color: #111; }
.cart-btn.has-items { color: #E8740C; }
.cart-btn i { font-size: 19px; }

/* ── BADGE ── */
.cart-count {
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #E8740C; color: #fff;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.cart-count.bump { animation: cartBump 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes cartBump { 0%{transform:scale(1)} 50%{transform:scale(1.7)} 100%{transform:scale(1)} }

/* ── DROPDOWN ── */
.cart-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0;
  width: 340px; background: #fff;
  border: 0.5px solid #e5e5e5; border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  z-index: 9999; overflow: hidden;
  opacity: 0; transform: translateY(-10px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34,1.2,0.64,1);
  transform-origin: top right;
}
.cart-dropdown.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* ── CART HEADER ── */
.cart-head { padding: 16px 18px 12px; border-bottom: 0.5px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.cart-head-title { font-size: 14px; font-weight: 500; color: #111; display: flex; align-items: center; gap: 8px; }
.cart-head-title i { font-size: 16px; color: #E8740C; }
.cart-head-clear { font-size: 11px; color: #bbb; cursor: pointer; transition: color 0.15s; background: none; border: none; font-family: inherit; }
.cart-head-clear:hover { color: #B91C1C; }

/* ── CART ITEMS LIST ── */
.cart-items { max-height: 280px; overflow-y: auto; padding: 8px 0; }
.cart-items::-webkit-scrollbar { width: 3px; }
.cart-items::-webkit-scrollbar-thumb { background: #eee; border-radius: 99px; }

/* ── CART ITEM ── */
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; transition: background 0.15s;
  animation: cartItemIn 0.35s cubic-bezier(0.34,1.2,0.64,1);
}
@keyframes cartItemIn { 0%{opacity:0;transform:translateX(16px)} 100%{opacity:1;transform:translateX(0)} }
.cart-item:hover { background: #fafafa; }
.cart-item-img { width: 46px; height: 46px; background: #f5f5f5; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-item-img i { font-size: 20px; color: #ccc; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 12px; font-weight: 500; color: #111; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-cat { font-size: 10px; color: #aaa; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.cart-item-price { font-size: 13px; font-weight: 500; color: #E8740C; }
.qty-row { display: flex; align-items: center; gap: 5px; }
.qty-btn { width: 20px; height: 20px; border-radius: 50%; border: 0.5px solid #e5e5e5; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; color: #555; transition: all 0.15s; font-family: inherit; line-height: 1; }
.qty-btn:hover { border-color: #E8740C; color: #E8740C; background: #FDF0E3; }
.qty-num { font-size: 12px; font-weight: 500; color: #111; min-width: 16px; text-align: center; }
.remove-btn { background: none; border: none; cursor: pointer; color: #ddd; font-size: 14px; transition: color 0.15s; padding: 2px; }
.remove-btn:hover { color: #B91C1C; }

/* ── EMPTY STATE ── */
.cart-empty { padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.cart-empty i { font-size: 36px; color: #e5e5e5; }
.cart-empty-title { font-size: 14px; font-weight: 500; color: #111; }
.cart-empty-sub { font-size: 12px; color: #aaa; }

/* ── CART FOOTER ── */
.cart-footer { border-top: 0.5px solid #f0f0f0; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.free-ship-label { font-size: 10px; color: #888; text-align: center; }
.free-ship-label span { color: #27500A; font-weight: 500; }
.cart-totals { display: flex; flex-direction: column; gap: 5px; }
.cart-row { display: flex; justify-content: space-between; font-size: 12px; color: #888; }
.cart-row.total { font-size: 15px; font-weight: 500; color: #111; margin-top: 4px; padding-top: 8px; border-top: 0.5px solid #f0f0f0; }
.cart-row.total span:last-child { color: #E8740C; }

/* PAY BUTTON */
.pay-btn {
  background: #1A1A1A; color: #fff; border: none;
  border-radius: 14px; padding: 13px;
  font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.pay-btn:hover { background: #333; }
.pay-btn:active { transform: scale(0.98); }
.pay-btn i { font-size: 16px; }
.pay-options { display: flex; gap: 8px; }
.pay-option { flex: 1; padding: 9px; border: 0.5px solid #e5e5e5; border-radius: 10px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 500; color: #555; transition: all 0.15s; font-family: inherit; }
.pay-option:hover { border-color: #E8740C; color: #E8740C; }
.pay-option i { font-size: 14px; }

/* ── TOAST ── */
.cart-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1A1A1A; color: #fff;
  padding: 10px 20px; border-radius: 99px;
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  z-index: 99999; opacity: 0; white-space: nowrap;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  pointer-events: none;
}
.cart-toast i { font-size: 15px; color: #E8740C; }
.cart-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }