/* =============================================================
   cart.css — Drawer del carrito y toasts · Lujo Minimalista Claro
   Header negro premium · Cuerpo blanco · Detalles dorado mate
   ============================================================= */

/* ── OVERLAY ────────────────────────────────────────────────── */
.cart-overlay,
.filter-overlay,
.wish-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 800;
  opacity: 0; pointer-events: none;
  transition: opacity var(--e);
  backdrop-filter: blur(3px);
}
.cart-overlay.open,
.filter-overlay.open,
.wish-overlay.open { opacity: 1; pointer-events: auto; }

/* ── CART DRAWER ────────────────────────────────────────────── */
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 420px;
  background: #e8d6ff;
  z-index: 900;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(204,153,255,0.25);
  box-shadow: -12px 0 48px rgba(0,0,0,0.50);
}
.cart-drawer.open { transform: translateX(0); }

/* ── HEADER ─────────────────────────────────────────────────── */
.cart-hdr {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(245,196,48,0.12);
  background: #111111;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.cart-hdr-left { display: flex; align-items: center; gap: 12px; }
.cart-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 21px; font-weight: 700; color: #fff; letter-spacing: 0.5px;
}
.cart-chip {
  padding: 3px 10px;
  background: rgba(245,196,48,0.12);
  border: 1px solid rgba(245,196,48,0.28);
  border-radius: 2px;
  font-size: 11px; font-weight: 600; color: var(--copper-l);
  font-family: 'Poppins', sans-serif;
}
.cart-close {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 4px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.50);
  transition: all var(--e);
}
.cart-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.cart-close svg   { width: 16px; height: 16px; }

/* ── BARRA ENVÍO GRATIS ─────────────────────────────────────── */
.cart-progress {
  padding: 14px 22px;
  border-bottom: 1px solid #EBEBEB;
  background: #FFFFFF;
  flex-shrink: 0;
}
.cart-progress-text {
  font-size: 12px; color: rgba(26,26,26,0.55); margin-bottom: 8px;
  font-family: 'Poppins', sans-serif;
}
.cart-progress-text strong { color: #E8A020; font-weight: 700; }
.progress-bar  { height: 3px; background: #EBEBEB; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: #F5C430; border-radius: 99px; transition: width 0.5s ease; }

/* ── CUERPO (lista de ítems) ────────────────────────────────── */
.cart-body { flex: 1; overflow-y: auto; }
.cart-body::-webkit-scrollbar       { width: 3px; }
.cart-body::-webkit-scrollbar-thumb { background: rgba(204,153,255,0.30); border-radius: 99px; }

.cart-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 72px 28px; text-align: center;
}
.cart-empty-ico { font-size: 52px; opacity: 0.25; }
.cart-empty h3  {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 600; color: #2d1155;
}
.cart-empty p   {
  font-size: 13px; color: rgba(61,31,110,0.68);
  line-height: 1.65; max-width: 240px;
  font-family: 'Poppins', sans-serif; font-weight: 300;
}
.cart-empty-btn {
  padding: 11px 30px; background: #cc99ff; color: #fff;
  border: none; border-radius: 2px;
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  transition: background var(--e);
}
.cart-empty-btn:hover { background: #F5C430; color: #0D0520; }

/* ── ÍTEM DEL CARRITO ───────────────────────────────────────── */
.cart-item {
  display: flex; gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(204,153,255,0.15);
  background: #f0e6ff;
  animation: ciIn 0.3s ease;
}

.ci-img {
  width: 72px; height: 72px; flex-shrink: 0;
  background: #e8d6ff;
  border: 1px solid rgba(204,153,255,0.20); border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  overflow: hidden;
}
.ci-photo { width: 100%; height: 100%; object-fit: cover; }

.ci-info    { flex: 1; min-width: 0; }
.ci-name    {
  font-size: 13.5px; font-weight: 500; color: #2d1155;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3; font-family: 'Poppins', sans-serif;
}
.ci-variant { font-size: 11px; color: rgba(61,31,110,0.65); margin-top: 2px; font-family: 'Poppins', sans-serif; }
.ci-price   { font-size: 16px; font-weight: 700; color: #F5C430; margin-top: 8px; font-family: 'Poppins', sans-serif; }

.ci-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; flex-shrink: 0; }
.ci-remove  {
  font-size: 10.5px; font-weight: 500; color: rgba(61,31,110,0.58);
  background: none; border: none; letter-spacing: 0.3px; text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  transition: color var(--e);
}
.ci-remove:hover { color: var(--red); }

/* Control de cantidad */
.qty-wrap {
  display: flex; align-items: center;
  border: 1px solid rgba(204,153,255,0.25); border-radius: 2px; overflow: hidden;
}
.qty-b {
  width: 30px; height: 30px; background: rgba(204,153,255,0.10); border: none;
  font-size: 17px; color: rgba(61,31,110,0.72);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--e), color var(--e);
}
.qty-b:hover  { background: #cc99ff; color: #fff; }
.qty-n {
  width: 32px; text-align: center;
  font-size: 14px; font-weight: 700; color: #2d1155;
  border-left: 1px solid rgba(204,153,255,0.20); border-right: 1px solid rgba(204,153,255,0.20);
  line-height: 30px; font-family: 'Poppins', sans-serif;
}

/* ── COTIZADOR DE ENVÍO ─────────────────────────────────────── */

.ship-calc {
  padding: 14px 22px;
  border-bottom: 1px solid #EBEBEB;
  background: #FFFFFF;
  flex-shrink: 0;
}
.ship-calc-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: rgba(26,26,26,0.60);
  font-family: 'Poppins', sans-serif; letter-spacing: .3px;
  margin-bottom: 10px; text-transform: uppercase;
}
.ship-calc-title svg { width: 15px; height: 15px; flex-shrink: 0; stroke: #F5C430; }

.ship-calc-row { display: flex; gap: 8px; }
.ship-cp-input {
  flex: 1; padding: 8px 11px;
  border: 1px solid #E4E1DC; border-radius: 2px;
  font-size: 13px; color: #1A1A1A; background: #FBFBFA;
  font-family: 'Poppins', sans-serif; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.ship-cp-input:focus        { border-color: #F5C430; box-shadow: 0 0 0 3px rgba(245,196,48,.08); }
.ship-cp-input::placeholder { color: rgba(26,26,26,.28); font-size: 12px; }

.ship-cp-btn {
  padding: 8px 16px; background: #1A1A1A; color: #fff;
  border: none; border-radius: 2px;
  font-size: 11px; font-weight: 600; letter-spacing: .5px;
  font-family: 'Poppins', sans-serif; cursor: pointer;
  transition: background .2s; white-space: nowrap;
}
.ship-cp-btn:hover    { background: #F5C430; color: #111; }
.ship-cp-btn:disabled { opacity: .5; cursor: default; }

.ship-result { margin-top: 10px; border-radius: 2px; overflow: hidden; }
.ship-result.hidden { display: none; }

.ship-result-card {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  background: #F8F7F5; border: 1px solid #EBEBEB; border-radius: 2px;
}
.ship-result-card.free { background: rgba(6,95,70,.05); border-color: rgba(6,95,70,.20); }
.ship-result-icon { font-size: 20px; flex-shrink: 0; }
.ship-result-info { flex: 1; min-width: 0; }
.ship-result-zona { font-size: 12px; font-weight: 600; color: #1A1A1A; font-family: 'Poppins', sans-serif; }
.ship-result-desc { font-size: 11px; color: rgba(26,26,26,.45); margin-top: 1px; font-family: 'Poppins', sans-serif; }
.ship-result-cost { font-size: 15px; font-weight: 700; color: #1A1A1A; font-family: 'Poppins', sans-serif; flex-shrink: 0; }
.ship-result-cost.free-text { color: #065F46; }

.ship-free-hint {
  margin-top: 8px; padding: 9px 13px;
  background: rgba(245,196,48,.07); border: 1px solid rgba(245,196,48,.25);
  border-radius: 2px; font-size: 12px; color: rgba(26,26,26,.65);
  font-family: 'Poppins', sans-serif; line-height: 1.5;
}
.ship-free-hint strong { color: #92640A; font-weight: 700; }

.ship-error {
  padding: 9px 13px; background: rgba(239,68,68,.06);
  border: 1px solid rgba(239,68,68,.20); border-radius: 2px;
  font-size: 12px; color: #991B1B; font-family: 'Poppins', sans-serif;
}

/* ── FOOTER DEL CARRITO ─────────────────────────────────────── */
.cart-ftr {
  padding: 14px 22px;
  border-top: 1px solid rgba(204,153,255,0.20);
  background: #e8d6ff;
  flex-shrink: 0;
}

/* Cupón */
.coupon-wrap { display: flex; gap: 8px; margin-bottom: 12px; }
.coupon-in {
  flex: 1; padding: 9px 13px;
  border: 1px solid rgba(204,153,255,0.25); border-radius: 2px;
  font-size: 13px; color: #2d1155; background: rgba(204,153,255,0.08); outline: none;
  font-family: 'Poppins', sans-serif;
  transition: border-color var(--e), box-shadow var(--e);
}
.coupon-in:focus       { border-color: #F5C430; box-shadow: 0 0 0 3px rgba(245,196,48,0.10); }
.coupon-in::placeholder { color: rgba(61,31,110,0.48); }
.coupon-btn {
  padding: 9px 16px;
  background: rgba(204,153,255,0.12); border: 1px solid rgba(204,153,255,0.28); border-radius: 2px;
  font-size: 12px; font-weight: 600; color: #6633aa;
  letter-spacing: 0.3px;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  transition: all var(--e);
}
.coupon-btn:hover { background: #cc99ff; color: #fff; border-color: #cc99ff; }

.sum-row      { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; font-family: 'Poppins', sans-serif; }
.sum-row .l   { color: rgba(61,31,110,0.68); font-weight: 400; }
.sum-row .v   { color: #2d1155; font-weight: 500; }
.sum-row.free .v { color: #F5C430; font-weight: 600; }

.sum-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-top: 1px solid rgba(204,153,255,0.18); margin-top: 4px;
}
.sum-total .l { font-size: 13px; font-weight: 600; color: rgba(61,31,110,0.72); font-family: 'Poppins', sans-serif; letter-spacing: 0.5px; text-transform: uppercase; }
.sum-total .v { font-size: 20px; font-weight: 700; color: #2d1155; font-family: 'Poppins', sans-serif; }

/* Botón de compra */
.checkout-btn {
  position: relative; overflow: hidden;
  width: 100%; padding: 15px;
  background: #6b21a8; color: #fff;
  border: none; border-radius: 2px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Poppins', sans-serif;
  transition: background var(--e), transform var(--e), box-shadow var(--e), color var(--e);
}
.checkout-btn::after {
  content: ''; position: absolute; top: -50%; left: -80%;
  width: 40%; height: 200%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-20deg); transition: left 0.55s ease;
  pointer-events: none;
}
.checkout-btn:hover  {
  background: #F5C430; color: #0D0520;
  box-shadow: 0 4px 24px rgba(245,196,48,0.28);
  transform: translateY(-1px);
}
.checkout-btn:hover::after { left: 130%; }
.checkout-btn:active { transform: none; }
.checkout-btn svg    { width: 16px; height: 16px; }

.secure-row {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 12px;
  font-size: 10.5px; color: rgba(61,31,110,0.58);
  font-family: 'Poppins', sans-serif; letter-spacing: 0.3px;
}

/* ── WISH DRAWER ────────────────────────────────────────────── */
.wish-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 420px;
  background: #e8d6ff;
  z-index: 900;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  border-left: 1px solid #E4E1DC;
  box-shadow: -12px 0 48px rgba(0,0,0,0.10);
}
.wish-drawer.open { transform: translateX(0); }

/* Badge sobre el icono de favoritos en el nav */
.nav-icon { position: relative; }
.wish-badge {
  position: absolute; top: 2px; right: 2px;
  width: 8px; height: 8px;
  background: #F5C430; border-radius: 50%;
  display: none;
}
.wish-badge.show { display: block; }

/* Botón "Agregar" dentro del wish drawer */
.wi-add-btn {
  padding: 5px 11px;
  background: #1A1A1A; color: #fff;
  border: none; border-radius: 2px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  transition: background var(--e), color var(--e);
}
.wi-add-btn:hover { background: #F5C430; color: #111; }

/* ── FILTER DRAWER (móvil) ──────────────────────────────────── */
.filter-drawer {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 290px;
  background: #FBFBFA;
  z-index: 900;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px 0;
  border-right: 1px solid #E4E1DC;
}
.filter-drawer.open { transform: translateX(0); }

.filter-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 20px;
  border-bottom: 1px solid #EBEBEB;
  margin-bottom: 8px;
}
.filter-drawer-head h3 {
  font-size: 14px; font-weight: 600; color: #1A1A1A;
  font-family: 'Poppins', sans-serif; letter-spacing: 0.5px;
}
.filter-close {
  width: 32px; height: 32px;
  border: 1px solid #E4E1DC; background: #F0F0F0; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(26,26,26,0.55);
  transition: background var(--e);
}
.filter-close:hover { background: #EBEBEB; color: #1A1A1A; }
.filter-close svg { width: 15px; height: 15px; }

.filter-drawer .sb-box {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  margin-top: 1px;
}

/* ── TOAST NOTIFICATIONS ────────────────────────────────────── */
.toast-zone {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  background: #111111; color: #fff;
  border-left: 3px solid #F5C430;
  border-radius: 2px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  min-width: 260px; max-width: 340px;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
  pointer-events: auto;
}
.toast.out         { animation: toastOut 0.25s ease forwards; }
.toast-ico         { font-size: 20px; }
.toast-body .t-h   { font-size: 13px; font-weight: 600; font-family: 'Poppins', sans-serif; }
.toast-body .t-p   { font-size: 11px; color: rgba(255,255,255,0.48); margin-top: 1px; font-family: 'Poppins', sans-serif; }
