/* ═══════════════════════════════════
   CARRITO — cart.css
   ═══════════════════════════════════ */

/* ── Overlay ── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 15, 35, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

/* ── Panel lateral ── */
.cart-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: #fff;
  z-index: 1101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.cart-panel.open { transform: translateX(0); }

/* ── Cabecera ── */
.cart-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid #eef0f5;
  flex-shrink: 0;
  background: #fff;
}
.cart-panel-head-left { display: flex; align-items: baseline; gap: 10px; }
.cart-panel-head h3 {
  font-size: 18px; font-weight: 900; color: #060d1a; margin: 0;
}
.cart-panel-count {
  font-size: 12px; font-weight: 700;
  color: rgba(0,0,0,0.35);
}
.cart-close-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  border: none; background: #f4f7fb;
  border-radius: 50%; cursor: pointer;
  font-size: 16px; color: #6b7a99;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.cart-close-btn:hover { background: #e8eef5; color: #060d1a; }

/* ── Cuerpo (lista de ítems) ── */
.cart-panel-body {
  flex: 1; overflow-y: auto; padding: 8px 0;
  scrollbar-width: thin; scrollbar-color: #d8e4ee transparent;
}
.cart-panel-body::-webkit-scrollbar { width: 5px; }
.cart-panel-body::-webkit-scrollbar-track { background: transparent; }
.cart-panel-body::-webkit-scrollbar-thumb { background: #d8e4ee; border-radius: 3px; }

/* ── Estado vacío ── */
.cart-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 60px 24px;
  color: #9ba6b8;
}
.cart-empty svg { opacity: 0.35; }
.cart-empty p { font-size: 15px; font-weight: 600; margin: 0; }
.cart-empty-link {
  margin-top: 4px;
  color: #00aee8; font-size: 14px; font-weight: 700;
  text-decoration: none;
  border: 1.5px solid #00aee8;
  padding: 8px 20px; border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.cart-empty-link:hover { background: #00aee8; color: #fff; }

/* ── Ítem individual ── */
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f2f4f8;
  transition: background 0.15s;
}
.cart-item:hover { background: #fafbfd; }

.cart-item-img {
  width: 72px; height: 72px;
  background: #f5f7fa; border-radius: 10px;
  overflow: hidden; display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.cart-item-info { min-width: 0; }
.cart-item-name {
  font-size: 12.5px; font-weight: 600; color: #060d1a;
  line-height: 1.4; margin: 0 0 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cart-item-price { font-size: 15px; font-weight: 900; color: #00aee8; margin: 0; }

/* ── Control de cantidad ── */
.cart-item-qty {
  display: flex; align-items: center;
  border: 1.5px solid #e2eaf2; border-radius: 8px;
  overflow: hidden; flex-shrink: 0;
}
.cart-qty-btn {
  width: 30px; height: 30px; border: none;
  background: #f5f7fb; font-size: 17px;
  cursor: pointer; color: #060d1a;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s;
  font-family: monospace;
}
.cart-qty-btn:hover { background: #e8eef5; }
.cart-qty-num {
  width: 32px; text-align: center;
  font-size: 14px; font-weight: 700; color: #060d1a;
}

/* ── Eliminar ítem ── */
.cart-item-remove {
  width: 28px; height: 28px; flex-shrink: 0;
  border: none; background: transparent;
  font-size: 15px; color: #c0cad9; cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, color 0.18s;
}
.cart-item-remove:hover { background: #fee8e8; color: #e53535; }

/* ── Pie del carrito ── */
.cart-panel-foot {
  padding: 18px 24px 20px;
  border-top: 1px solid #eef0f5;
  flex-shrink: 0; background: #fff;
}
.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 600; color: #6b7a99;
  margin-bottom: 14px;
}
.cart-total-row strong {
  font-size: 24px; font-weight: 900; color: #060d1a;
}
.cart-btn-checkout {
  width: 100%; padding: 14px;
  background: linear-gradient(90deg, #00aee8 0%, #007ac2 100%);
  color: #fff; font-size: 15px; font-weight: 800;
  border: none; border-radius: 10px; cursor: pointer;
  font-family: var(--font-main, 'Lato', sans-serif);
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.2px;
}
.cart-btn-checkout:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Formulario checkout ── */
.cart-checkout-form {
  flex: 1; overflow-y: auto;
  padding: 20px 24px 24px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: #d8e4ee transparent;
}
.cart-checkout-form h4 {
  font-size: 16px; font-weight: 900; color: #060d1a;
  margin: 0 0 6px;
}
.cart-checkout-form input,
.cart-checkout-form textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #d8e4ee; border-radius: 9px;
  font-size: 14px; font-family: var(--font-main, 'Lato', sans-serif);
  color: #060d1a; outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box; background: #fff;
}
.cart-checkout-form input:focus,
.cart-checkout-form textarea:focus { border-color: #00aee8; }
.cart-checkout-form input::placeholder,
.cart-checkout-form textarea::placeholder { color: #b0bad0; }
.cart-checkout-form textarea { resize: vertical; min-height: 68px; }

.cart-btn-place-order {
  width: 100%; padding: 14px;
  background: linear-gradient(90deg, #25D366 0%, #17a94e 100%);
  color: #fff; font-size: 15px; font-weight: 800;
  border: none; border-radius: 10px; cursor: pointer;
  font-family: var(--font-main, 'Lato', sans-serif);
  transition: opacity 0.2s;
  margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cart-btn-place-order:hover { opacity: 0.9; }
.cart-btn-place-order:disabled { opacity: 0.55; cursor: not-allowed; }

.cart-btn-back {
  background: none; border: none;
  color: #6b7a99; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font-main, 'Lato', sans-serif);
  text-align: left; padding: 0; display: flex; align-items: center; gap: 5px;
  transition: color 0.2s;
}
.cart-btn-back:hover { color: #00aee8; }

.cart-woo-note {
  font-size: 11.5px; color: #9ba6b8; line-height: 1.65;
  text-align: center; margin: 6px 0 0;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .cart-panel { width: 100vw; }
  .cart-item { grid-template-columns: 60px 1fr auto auto; padding: 12px 16px; }
  .cart-item-img { width: 60px; height: 60px; }
  .cart-panel-head { padding: 16px 18px 14px; }
  .cart-panel-foot { padding: 14px 18px 16px; }
  .cart-checkout-form { padding: 16px 18px 20px; }
}
