/* ================================================
   cart.css — Carrito flotante — Caribbean Gold Luxury
   ================================================ */

/* ── Botón flotante ── */
.cart-btn-wrap {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 150;
}
.cart-float-btn {
  background: linear-gradient(135deg, #5B8DEF 0%, #2F62D4 100%);
  color: #FFFFFF;
  border: none;
  width: 58px; height: 58px; border-radius: 50%;
  box-shadow: 0 4px 24px rgba(47,98,212,0.45), 0 0 0 0 rgba(47,98,212,0.35);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
  cursor: pointer;
  animation: cartGlowPulse 3s ease infinite;
}
@keyframes cartGlowPulse {
  0%,100% { box-shadow: 0 4px 24px rgba(47,98,212,0.45), 0 0 0 0px rgba(47,98,212,0.30); }
  50%      { box-shadow: 0 4px 24px rgba(47,98,212,0.55), 0 0 0 8px rgba(47,98,212,0.00); }
}
.cart-float-btn .material-icons { font-size: 24px; }
.cart-float-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 40px rgba(47,98,212,0.65), 0 0 0 0 rgba(47,98,212,0);
  animation: none;
}

.cart-badge {
  position: absolute; top: -5px; right: -5px;
  background: linear-gradient(135deg, #1E47A0, #2F62D4);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px; font-weight: 900;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; border: 2px solid var(--bg);
  animation: bounceIn 0.3s var(--ease-out);
  box-shadow: 0 0 14px rgba(47,98,212,0.55);
}

/* ── Overlay ── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.70);
  z-index: 200; backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-md);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

/* ── Panel ── */
.cart-panel {
  position: fixed; top: 0; right: 0;
  width: 460px; max-width: 100vw; height: 100vh;
  background: var(--bg-white);
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--duration-md) var(--ease-out);
  overflow-y: auto;
  box-shadow: -12px 0 60px rgba(0,0,0,0.80);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
}
.cart-panel.open { transform: translateX(0); }

/* ── Header carrito ── */
.cart-head {
  padding: 0 24px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--bg-white); z-index: 2;
  padding-top: 22px;
}
/* Línea dorada arriba del panel */
.cart-head::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, #5B8DEF 25%, #2F62D4 75%, transparent);
}
.cart-head h2 {
  font-size: 22px; font-weight: 900; letter-spacing: -0.5px;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.cart-head h2 .material-icons { font-size: 24px; color: var(--gold); vertical-align: middle; }

.cart-close-btn {
  background: var(--bg-subtle); border: 1px solid var(--border);
  width: 36px; height: 36px; border-radius: 10px;
  font-size: 18px; cursor: pointer; color: var(--text-soft);
  transition: all var(--duration);
  display: flex; align-items: center; justify-content: center;
}
.cart-close-btn .material-icons { font-size: 20px; }
.cart-close-btn:hover { background: rgba(192,83,58,0.10); border-color: rgba(192,83,58,0.25); color: #C0533A; }

/* ── Items ── */
.cart-items { flex: 1; padding: 12px 20px; overflow-y: auto; }
.cart-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  animation: fadeUp 0.25s var(--ease-out) both;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-icon {
  width: 50px; height: 50px; background: rgba(47,98,212,0.06);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 24px; flex-shrink: 0;
  border: 1px solid rgba(47,98,212,0.14);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--text);
  letter-spacing: -0.2px; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-cat {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  color: var(--text-soft);
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  padding: 1px 7px; border-radius: 99px;
  margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.cart-item-bottom {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.qty-ctrl {
  display: flex; align-items: center;
  border: 1.5px solid rgba(47,98,212,0.25);
  border-radius: 99px; overflow: hidden;
  background: rgba(47,98,212,0.05);
}
.qty-btn {
  background: none; border: none; cursor: pointer;
  width: 28px; height: 26px;
  font-size: 16px; font-weight: 600;
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.qty-btn:hover { background: rgba(47,98,212,0.12); }
.qty-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 900;
  color: var(--text); min-width: 22px; text-align: center;
}
.cart-item-badge {
  font-size: 11px; font-weight: 700;
  color: var(--gold);
  background: rgba(47,98,212,0.09);
  border: 1px solid rgba(47,98,212,0.22);
  padding: 2px 8px; border-radius: 99px;
}
.cart-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-soft); flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  margin-top: 2px;
}
.cart-item-remove .material-icons { font-size: 16px; }
.cart-item-remove:hover { background: rgba(192,83,58,0.10); color: #C0533A; }

/* ── Footer carrito ── */
.cart-footer {
  padding: 20px 24px; border-top: 1px solid var(--border);
  background: var(--bg-white); position: sticky; bottom: 0;
}
.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.cart-total-label { font-size: 14px; color: var(--text-soft); font-weight: 500; }
.cart-total-amount {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px; font-weight: 900; color: var(--text); letter-spacing: -1px;
}

/* ── Móvil ── */
@media (max-width: 768px) {
  .cart-btn-wrap { bottom: 20px; right: 16px; }
  .cart-float-btn { width: 52px; height: 52px; }
  .cart-panel { width: 100vw; }
  .cart-head { padding: 18px 18px 14px; }
  .cart-head h2 { font-size: 18px; }
  .cart-items { padding: 10px 14px; }
  .cart-item { gap: 10px; padding: 12px 0; }
  .cart-item-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
  .cart-item-name { font-size: 12px; }
  .cart-item-cat { font-size: 9px; }
  .qty-btn { width: 26px; height: 24px; font-size: 15px; }
  .qty-num { font-size: 12px; }
  .cart-item-badge { font-size: 10px; padding: 2px 6px; }
  .cart-footer { padding: 16px 18px; }
  .cart-total-amount { font-size: 22px; }
}
