/* ============================================================
   CARRINHO.CSS – Drawer do carrinho de compras
============================================================ */

/* ── Ícone no navbar ── */
.btn-cart-nav {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--heading);
  font-size: 20px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.btn-cart-nav:hover { color: var(--primary); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

/* ── Overlay ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Drawer ── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100dvh;
  background: #fff;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -6px 0 32px rgba(15,13,29,.12);
}
.cart-drawer.open { transform: translateX(0); }

/* ── Header ── */
.cart-header {
  background: var(--primary);
  border-bottom: 1px solid rgba(56,75,255,0.2);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-title {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}
.cart-close:hover { color: #fff; }

/* ── Body ── */
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Estado vazio */
.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  gap: 12px;
}

.cart-empty-icon {
  font-size: 72px;
  color: var(--primary);
  opacity: 0.25;
  margin-bottom: 8px;
}

.cart-empty h3 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  color: var(--heading);
  margin: 0;
}

.cart-empty p {
  font-size: 14px;
  color: var(--body);
  margin: 0;
}

/* Item do carrinho */
.cart-item {
  background: #fff;
  border: 1px solid rgba(56,75,255,0.1);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 2px 8px rgba(15,13,29,.06);
}

.cart-item-img {
  width: 68px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--heading);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

/* Controles de quantidade */
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(56,75,255,0.2);
  border-radius: 4px;
  background: #f8f9ff;
  color: var(--body);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
}
.qty-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.qty-num {
  font-size: 15px;
  font-weight: 600;
  color: var(--heading);
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--body);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
  margin-top: 2px;
}
.cart-item-remove:hover { color: #e53935; }

/* ── Footer ── */
.cart-footer {
  background: #f8f9ff;
  padding: 18px 20px 20px;
  border-top: 1px solid rgba(56,75,255,0.1);
  flex-shrink: 0;
}

.cart-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--body);
}

.cart-total-main {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(56,75,255,0.1);
}

.cart-total-main strong {
  font-family: var(--font-body);
  font-size: 22px;
  color: var(--primary);
}

.btn-cart-finalizar {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 15px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
  margin-bottom: 12px;
}
.btn-cart-finalizar:hover {
  background: #2a3ce0;
  transform: translateY(-1px);
}

.btn-cart-continuar {
  width: 100%;
  background: none;
  border: none;
  color: var(--body);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s;
}
.btn-cart-continuar:hover { color: var(--heading); }

/* ── Botão Adicionar ao Carrinho (produto.html) ── */
.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  flex: 1;
  justify-content: center;
  min-width: 180px;
  font-family: var(--font-body);
}
.btn-add-cart:hover {
  background: #2a3ce0;
  border-color: #2a3ce0;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56,75,255,0.3);
}
.btn-add-cart.added {
  background: #2a3ce0;
  color: #fff;
}

/* ── Responsivo ── */
@media (max-width: 480px) {
  .cart-drawer { width: 100vw; }
}


/* ============================================================
   CENTRAL DE ATENDIMENTO – Modal
============================================================ */

.atend-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.atend-overlay.open { opacity: 1; pointer-events: auto; }

.atend-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: 90dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  z-index: 1100;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.atend-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Header verde */
.atend-header {
  background: #3CB54E;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px 16px 0 0;
}

.atend-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.atend-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.atend-close:hover { color: #fff; }

/* Body */
.atend-body {
  padding: 28px 26px 32px;
  text-align: center;
  font-family: 'Kumbh Sans', sans-serif;
}

.atend-question {
  font-size: 24px;
  font-weight: 800;
  color: #1B3A7A;
  margin-bottom: 10px;
}

.atend-subtitle {
  font-size: 15px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 22px;
}

/* Botão WhatsApp */
.btn-atend-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #3CB54E;
  color: #fff;
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
  transition: background 0.25s ease, transform 0.2s ease;
}
.btn-atend-whatsapp:hover {
  background: #2ea040;
  color: #fff;
  transform: translateY(-2px);
}
.btn-atend-whatsapp i { font-size: 26px; }

/* Botão E-mail */
.btn-atend-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #4A8FD4;
  color: #fff;
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 24px;
  transition: background 0.25s ease, transform 0.2s ease;
}
.btn-atend-email:hover {
  background: #3a7ec0;
  color: #fff;
  transform: translateY(-2px);
}
.btn-atend-email i { font-size: 22px; }

/* Televendas / SAC */
.atend-section {
  margin-bottom: 16px;
}

.atend-section p {
  font-size: 15px;
  color: #444;
  margin-bottom: 4px;
}

.atend-phone {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: #1B3A7A;
  line-height: 1.2;
  transition: color 0.2s;
}
.atend-phone:hover { color: #3CB54E; }

.atend-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 16px 0;
}

/* Horário */
.atend-horario {
  margin-top: 16px;
}
.atend-horario p {
  font-size: 14px;
  color: #444;
  margin-bottom: 2px;
}
.atend-horario p:first-child {
  font-size: 15px;
  font-weight: 700;
  color: #222;
}

/* Botão flutuante de atendimento */
.atend-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #3CB54E;
  color: #fff;
  border: none;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 990;
  box-shadow: 0 4px 16px rgba(60,181,78,0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.atend-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 22px rgba(60,181,78,0.55);
}

@media (max-width: 480px) {
  .atend-modal { border-radius: 16px; }
}

/* ============================================================
   WISHLIST DRAWER
============================================================ */
.wishlist-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1099;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s;
}
.wishlist-overlay.open { opacity: 1; pointer-events: auto; }

.wishlist-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 380px; max-width: 100vw;
  height: 100%;
  background: #fff;
  z-index: 1100;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 32px rgba(0,0,0,0.14);
}
.wishlist-drawer.open { transform: translateX(0); }

/* ── Botão de coração nos cards ── */
.btn-wishlist {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.93);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 15px;
  color: #aaa;
  transition: all 0.2s;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.btn-wishlist:hover { color: #e53935; background: #fff; }
.btn-wishlist.active { color: #e53935; background: #fff; }

/* ── Botão "Adicionar ao carrinho" dentro do wishlist drawer ── */
.btn-wish-to-cart {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  background: rgba(56,75,255,0.08);
  border: none; border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.2s;
}
.btn-wish-to-cart:hover { background: rgba(56,75,255,0.16); }

/* ============================================================
   PEDIDOS DRAWER
============================================================ */
.pedidos-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1099;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s;
}
.pedidos-overlay.open { opacity: 1; pointer-events: auto; }

.pedidos-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 420px; max-width: 100vw;
  height: 100%;
  background: #f8f9ff;
  z-index: 1100;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 32px rgba(0,0,0,0.14);
  overflow-y: auto;
}
.pedidos-drawer.open { transform: translateX(0); }

.pedido-card {
  background: #fff;
  border-radius: 12px;
  margin: 12px 16px;
  padding: 16px;
  border: 1px solid #e8eaf0;
}
.pedido-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap; gap: 6px;
}
.pedido-id {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--primary);
  font-family: monospace;
}
.pedido-data {
  display: block;
  font-size: 12px; color: var(--body);
}
.pedido-status {
  display: inline-block;
  background: #fff8e1;
  color: #e65100;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap;
}
.pedido-itens { display: flex; flex-direction: column; gap: 8px; }
.pedido-item-row {
  display: flex; align-items: center; gap: 10px;
}
.pedido-item-img {
  width: 44px; height: 44px;
  object-fit: contain; border-radius: 8px;
  background: #f0f4ff; flex-shrink: 0;
}
.pedido-item-info { display: flex; flex-direction: column; }
.pedido-item-nome { font-size: 13px; font-weight: 600; color: var(--heading); }
.pedido-item-qty  { font-size: 12px; color: var(--body); }
.pedido-total {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid #f0f0f6;
  font-size: 14px; color: var(--heading);
  text-align: right;
}

/* ── Modal confirmar pedido ── */
.modal-confirmar-pedido {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 18px;
  padding: 28px 28px 22px;
  width: calc(100% - 48px);
  max-width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  z-index: 1300;
  text-align: center;
  border: 1px solid #e8e8f0;
}
.modal-confirmar-pedido.open { display: block; animation: slideUpModal .25s ease; }
@keyframes slideUpModal {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.mcp-icon {
  font-size: 2.2rem;
  color: #25d366;
  margin-bottom: 10px;
}
.mcp-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}
.mcp-sub {
  font-size: .82rem;
  color: #7a7a9a;
  line-height: 1.5;
  margin-bottom: 20px;
}
.mcp-btns { display: flex; gap: 10px; }
.mcp-btn {
  flex: 1;
  padding: 11px;
  border: none;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.mcp-btn:hover { opacity: .85; }
.mcp-btn-sim  { background: #25d366; color: #fff; }
.mcp-btn-nao  { background: #f1f1f7; color: #555; }
