/* ============================================================
   CA2 Brindes – simulacao.css
   Overlay de simulação de orçamento (index.html)
   ============================================================ */

/* ── OVERLAY ── */
.sim-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  padding: 16px;
}
.sim-overlay.open { display: flex; align-items: flex-start; justify-content: center; }

/* ── TELAS ── */
.sim-screen { width: 100%; max-width: 680px; margin: auto; }

/* ── PAINEL ── */
.sim-panel {
  background: #F9FAFB;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.sim-panel--contact { max-width: 560px; }

/* ── HEADER ── */
.sim-header {
  background: #1A1A2E;
  padding: .85rem 1.5rem;
  display: flex; align-items: center; gap: .75rem;
}
.sim-header__brand { display: flex; align-items: center; gap: .6rem; flex: 1; }
.sim-header__brand i { color: #4ade80; font-size: 1.1rem; }
.sim-header__brand strong { color: #fff; font-size: .98rem; font-weight: 700; }
.sim-header__brand span { color: rgba(255,255,255,.55); font-size: .78rem; margin-left: .3rem; }
.sim-header__actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.sim-close-btn {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: white; width: 36px; height: 36px; border-radius: 8px;
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.sim-close-btn:hover { background: rgba(255,255,255,.22); }

/* Botão de carrinho no header */
.sim-cart-btn {
  position: relative;
  background: rgba(234,179,8,.2); border: 1px solid rgba(234,179,8,.4);
  color: #EAB308; width: 42px; height: 36px; border-radius: 8px;
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.sim-cart-btn:hover { background: rgba(234,179,8,.35); }
.sim-cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: #EAB308; color: #1A1A2E;
  border-radius: 20px; padding: .05rem .45rem;
  font-size: .65rem; font-weight: 800; min-width: 18px; text-align: center;
}

/* ── TELA 1: CONFIG ── */
.sim-config-body { padding: 1.4rem 1.5rem; overflow-y: auto; max-height: calc(100vh - 140px); }

/* Seletor de produto */
.sim-prod-bar {
  display: flex; align-items: center; gap: .75rem;
  background: #fff; border: 1.5px solid #E5E7EB; border-radius: 12px;
  padding: .7rem 1rem; margin-bottom: 1.2rem;
}
.sim-prod-bar__name { flex: 1; font-weight: 700; font-size: .9rem; color: #1A1A2E; }
.sim-prod-bar__cat  { font-size: .72rem; color: #6B7280; font-weight: 400; margin-left: .3rem; }
.sim-btn-outro-prod {
  background: none; border: 1.5px solid #E5E7EB; border-radius: 8px;
  padding: .38rem .8rem; font-size: .74rem; font-weight: 600; color: #6B7280;
  cursor: pointer; white-space: nowrap; transition: all .2s;
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: 'Poppins', sans-serif;
}
.sim-btn-outro-prod:hover { border-color: #16A34A; color: #16A34A; }

/* Picker de produtos */
.sim-picker {
  background: #fff; border: 1.5px solid #E5E7EB; border-radius: 12px;
  padding: 1rem; margin-bottom: 1.2rem;
}
.sim-picker__search {
  width: 100%; padding: .55rem .9rem;
  border: 1.5px solid #E5E7EB; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .85rem;
  outline: none; transition: border .2s; margin-bottom: .7rem;
}
.sim-picker__search:focus { border-color: #16A34A; }
.sim-picker__list { display: flex; flex-direction: column; gap: .35rem; max-height: 220px; overflow-y: auto; }
.sim-picker__item {
  padding: .6rem .85rem; border: 1.5px solid #E5E7EB; border-radius: 8px;
  background: #F9FAFB; cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: space-between;
}
.sim-picker__item:hover { border-color: #16A34A; background: #f0fdf4; }
.sim-picker__item-name { font-size: .85rem; font-weight: 600; color: #1A1A2E; }
.sim-picker__item-cat  { font-size: .72rem; color: #6B7280; }

/* Steps */
.sim-step-card {
  background: #fff; border: 1.5px solid #E5E7EB; border-radius: 12px;
  padding: 1rem 1.1rem .85rem; margin-bottom: .85rem;
}
.sim-step-title {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: .88rem; color: #1A1A2E; margin-bottom: .85rem;
}
.sim-step-badge {
  background: linear-gradient(135deg, #16A34A, #EAB308);
  color: white; width: 26px; height: 26px; border-radius: 50%;
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sim-options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 8px; }
.sim-opt-btn {
  border: 2px solid #E5E7EB; background: #F9FAFB; border-radius: 10px;
  padding: 11px 8px; text-align: center; cursor: pointer;
  transition: all .18s; font-family: 'Poppins', sans-serif;
}
.sim-opt-btn:hover { border-color: #16A34A; background: #f0fdf4; }
.sim-opt-btn.selected {
  border-color: #16A34A; background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(22,163,74,.13);
}
.sim-opt-label { font-size: .84rem; font-weight: 600; color: #1A1A2E; }
.sim-opt-sub   { font-size: .7rem; color: #6B7280; margin-top: 3px; }
.sim-opt-btn.selected .sim-opt-sub { color: #16A34A; font-weight: 600; }

/* Qty livre */
.sim-qty-free { display: flex; align-items: center; gap: .7rem; }
.sim-qty-free input {
  width: 110px; padding: .55rem .75rem;
  border: 1.5px solid #E5E7EB; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .9rem; outline: none; transition: border .2s;
}
.sim-qty-free input:focus { border-color: #16A34A; }
.sim-qty-free span { font-size: .85rem; color: #6B7280; }

/* Preview de preço */
.sim-preview {
  background: #1A1A2E; color: white; border-radius: 12px;
  padding: 1.1rem 1.25rem; margin: 1.1rem 0 .9rem;
}
.sim-preview__placeholder {
  text-align: center; color: rgba(255,255,255,.4); font-size: .85rem; padding: .4rem 0;
}
.sim-res-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .48rem 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .84rem;
}
.sim-res-row:last-child { border-bottom: none; }
.sim-res-label { color: rgba(255,255,255,.7); }
.sim-res-value { font-weight: 600; }
.sim-price-accent { color: #EAB308; }
.sim-price-total  { color: #EAB308; font-size: 1.1rem; }
.sim-discount     { color: #4ade80; }
.sim-add-tag {
  font-size: .7rem; background: rgba(234,179,8,.18);
  padding: .1rem .4rem; border-radius: 4px; margin-left: .3rem;
}

/* Botão adicionar ao carrinho */
.sim-btn-add {
  width: 100%; padding: .82rem;
  background: linear-gradient(135deg, #16A34A, #EAB308);
  color: white; font-family: 'Poppins', sans-serif; font-size: .9rem; font-weight: 700;
  border: none; border-radius: 10px; cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.sim-btn-add:hover:not(:disabled) {
  background: linear-gradient(135deg, #15803D, #CA8A04);
  transform: translateY(-1px); box-shadow: 0 4px 14px rgba(22,163,74,.3);
}
.sim-btn-add:disabled { opacity: .35; cursor: not-allowed; }

/* Pós-adição */
.sim-post-add {
  background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: 12px;
  padding: 1rem 1.1rem;
}
.sim-post-add__msg {
  font-size: .88rem; font-weight: 700; color: #16A34A;
  display: flex; align-items: center; gap: .45rem; margin-bottom: .8rem;
}
.sim-post-add__btns { display: flex; gap: .65rem; }
.sim-btn-continuar {
  flex: 1; padding: .7rem .9rem;
  background: white; color: #1A1A2E;
  border: 1.5px solid #E5E7EB; border-radius: 10px; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 600;
  transition: all .18s; display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.sim-btn-continuar:hover { border-color: #16A34A; color: #16A34A; }
.sim-btn-ver-carrinho {
  flex: 1; padding: .7rem .9rem;
  background: #1A1A2E; color: white;
  border: none; border-radius: 10px; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 600;
  transition: all .18s; display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.sim-btn-ver-carrinho:hover { background: #2d2d4e; }
.sim-cart-count-pill {
  background: #EAB308; color: #1A1A2E;
  border-radius: 20px; padding: .05rem .45rem;
  font-size: .68rem; font-weight: 800;
}

/* ── TELA 2: CARRINHO ── */
.sim-cart-body {
  padding: 1.2rem 1.5rem;
  overflow-y: auto; max-height: calc(100vh - 260px);
}
.sim-cart-empty {
  border: 2px dashed #E5E7EB; border-radius: 10px;
  padding: 2rem 1rem; text-align: center;
  color: #6B7280; font-size: .85rem; line-height: 1.8;
}
.sim-cart-item {
  background: #fff; border: 1.5px solid #E5E7EB; border-radius: 12px;
  padding: 1rem 1.1rem; margin-bottom: .75rem;
}
.sim-cart-item__info { margin-bottom: .75rem; }
.sim-cart-item__name {
  font-weight: 700; font-size: .92rem; color: #1A1A2E; margin-bottom: .25rem;
}
.sim-cart-item__qty {
  font-size: .8rem; color: #6B7280; margin-bottom: .4rem;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.sim-cart-disc {
  background: #f0fdf4; color: #16A34A;
  border-radius: 20px; padding: .1rem .55rem;
  font-size: .7rem; font-weight: 700;
}
.sim-cart-item__opts {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .45rem;
}
.sim-cart-opt {
  background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 6px;
  padding: .2rem .6rem; font-size: .72rem; color: #6B7280;
}
.sim-cart-opt em { font-style: normal; color: #16A34A; font-weight: 600; }
.sim-cart-item__price {
  font-size: .82rem; color: #6B7280;
}
.sim-cart-item__price strong { color: #16A34A; font-size: .95rem; }
.sim-cart-item__actions {
  display: flex; gap: .55rem; padding-top: .75rem;
  border-top: 1px solid #F3F4F6;
}
.sim-cart-btn-edit,
.sim-cart-btn-remove {
  flex: 1; padding: .52rem .7rem;
  border-radius: 8px; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: .78rem; font-weight: 600;
  transition: all .18s; display: flex; align-items: center; justify-content: center; gap: .35rem;
}
.sim-cart-btn-edit {
  background: white; color: #1A1A2E;
  border: 1.5px solid #E5E7EB;
}
.sim-cart-btn-edit:hover { border-color: #16A34A; color: #16A34A; }
.sim-cart-btn-remove {
  background: white; color: #e53e3e;
  border: 1.5px solid #fed7d7;
}
.sim-cart-btn-remove:hover { background: #fff5f5; border-color: #e53e3e; }

/* Rodapé do carrinho */
.sim-cart-footer { padding: .9rem 1.5rem 1.2rem; border-top: 1px solid #E5E7EB; }
.sim-cart-total {
  background: #1A1A2E; color: white; border-radius: 10px;
  padding: .8rem 1.1rem; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .85rem;
}
.sim-cart-total span   { font-size: .78rem; opacity: .7; }
.sim-cart-total strong { font-size: 1.2rem; color: #EAB308; }
.sim-cart-footer__btns { display: flex; gap: .65rem; }
.sim-btn-enviar {
  flex: 1; padding: .82rem;
  background: linear-gradient(135deg, #16A34A, #EAB308);
  color: white; font-family: 'Poppins', sans-serif; font-size: .88rem; font-weight: 700;
  border: none; border-radius: 10px; cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: center; gap: .45rem;
}
.sim-btn-enviar:hover:not(:disabled) { background: linear-gradient(135deg, #15803D, #CA8A04); }
.sim-btn-enviar:disabled { opacity: .4; cursor: not-allowed; }

/* ── TELA 3: CONTATO ── */
.sim-contact-body { padding: 1.75rem 2rem; }
.sim-contact-summary {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
  padding: .85rem 1rem; margin-bottom: 1.5rem;
  font-size: .85rem; color: #15803D; font-weight: 600;
  display: flex; align-items: center; gap: .5rem;
}
.sim-field { margin-bottom: 1.1rem; }
.sim-field label {
  display: block; font-size: .76rem; font-weight: 700; color: #6B7280;
  margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .04em;
}
.sim-field label .req { color: #e53e3e; }
.sim-field input,
.sim-field textarea {
  width: 100%; padding: .7rem .9rem;
  border: 1.5px solid #E5E7EB; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: .9rem;
  outline: none; transition: border .2s; resize: vertical; color: #1A1A2E;
}
.sim-field input:focus,
.sim-field textarea:focus { border-color: #16A34A; box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.sim-contact-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }
.sim-btn-voltar {
  padding: .75rem 1.2rem; background: white; color: #6B7280;
  border: 1.5px solid #E5E7EB; border-radius: 10px; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: .84rem; font-weight: 600;
  transition: all .18s; display: flex; align-items: center; gap: .4rem;
}
.sim-btn-voltar:hover { border-color: #6B7280; color: #1A1A2E; }
.sim-btn-confirmar {
  flex: 1; padding: .82rem;
  background: linear-gradient(135deg, #16A34A, #EAB308);
  color: white; border: none; border-radius: 10px; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: .9rem; font-weight: 700;
  transition: all .18s; display: flex; align-items: center; justify-content: center; gap: .45rem;
}
.sim-btn-confirmar:hover { background: linear-gradient(135deg, #15803D, #CA8A04); }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .sim-overlay { padding: 0; }
  .sim-screen { max-width: 100%; }
  .sim-panel { border-radius: 0; min-height: 100vh; }
  .sim-config-body { max-height: none; }
  .sim-cart-body   { max-height: none; }
  .sim-options-grid { grid-template-columns: 1fr 1fr; }
  .sim-post-add__btns { flex-direction: column; }
  .sim-contact-body { padding: 1.25rem 1rem; }
  .sim-cart-footer__btns { flex-direction: column-reverse; }
}
