/**
 * ============================================================================
 * ESTILOS DA SACOLA DE COMPRAS (FLUXO 1) - ELLIS MODA ÍNTIMA
 * Arquivo: public_html/assets/css/sacola.css
 * ============================================================================
 */

/* ── Overlay Escuro de Fundo ──────────────────────────────────────────────── */
.sacola-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.sacola-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Drawer Lateral Deslizante ────────────────────────────────────────────── */
.sacola-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: #ffffff;
  z-index: 9999;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sacola-drawer.active {
  transform: translateX(0);
}

/* ── Topo do Drawer ───────────────────────────────────────────────────────── */
.sacola-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid #ededed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
}

.sacola-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sacola-header-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.sacola-badge-count {
  background: var(--primary, #8B004F);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.sacola-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.sacola-close-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

/* ── Corpo da Sacola ──────────────────────────────────────────────────────── */
.sacola-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.sacola-itens-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card de Item Individual */
.sacola-item-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  transition: box-shadow 0.15s ease;
}

.sacola-item-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sacola-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sacola-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sacola-item-sem-foto {
  font-size: 24px;
}

.sacola-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sacola-item-nome {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
  line-height: 1.25;
}

.sacola-item-detalhes {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.sacola-badge-var {
  font-size: 10.5px;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.sacola-item-preco-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.sacola-item-unit {
  font-size: 11px;
  color: #94a3b8;
}

.sacola-item-subtotal {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary, #8B004F);
}

.sacola-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stepper de Quantidade dentro da Sacola */
.sacola-qty-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.sacola-btn-qty {
  width: 26px;
  height: 24px;
  background: #f8fafc;
  border: none;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.sacola-btn-qty:hover {
  background: #e2e8f0;
}

.sacola-qty-num {
  width: 28px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.sacola-btn-remover {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.15s ease, transform 0.15s ease;
  padding: 4px;
}

.sacola-btn-remover:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* ── Sacola Vazia ─────────────────────────────────────────────────────────── */
.sacola-vazia {
  text-align: center;
  padding: 40px 16px;
}

.sacola-vazia-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.sacola-vazia h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.sacola-vazia p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* ── Rodapé do Drawer ─────────────────────────────────────────────────────── */
.sacola-drawer-rodape {
  padding: 16px 20px;
  border-top: 1px solid #ededed;
  background: #fafafa;
}

.sacola-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 15px;
  color: #334155;
}

.sacola-total-val {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.btn-finalizar-sacola {
  background: #25D366;
  color: #ffffff;
  width: 100%;
  height: 48px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-finalizar-sacola:hover {
  background: #1eb954;
}

.btn-finalizar-sacola:active {
  transform: scale(0.98);
}

.sacola-aviso-seguro {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin-top: 8px;
}

/* ── Botão Flutuante de Sacola ────────────────────────────────────────────── */
.sacola-float-btn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary, #8B004F);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  transition: transform 0.2s ease, background 0.2s ease;
}

.sacola-float-btn:hover {
  transform: scale(1.08);
}

.sacola-float-btn .sacola-float-icon {
  font-size: 22px;
}

.sacola-float-btn .sacola-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff3b30;
  border: 2px solid #ffffff;
}

/* ── Toast de Feedback ────────────────────────────────────────────────────── */
.sacola-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.sacola-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Botão de Sacola no Cabeçalho ─────────────────────────────────────────── */
.header-sacola-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  order: 3;
  flex-shrink: 0;
}

.header-sacola-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
