/* Modais customizados — estilo isolado com prefixo .mm- (my modal) */
/* Evita qualquer colisão com Tailwind/React */

.mm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  display: none;
  animation: mm-fade-in 0.25s ease-out;
}

.mm-overlay.mm-open {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mm-overlay.mm-closing {
  animation: mm-fade-out 0.25s ease-out forwards;
}

.mm-overlay.mm-closing .mm-sheet {
  animation: mm-slide-down 0.25s ease-out forwards;
}

.mm-sheet {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  position: relative;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
  animation: mm-slide-up 0.3s ease-out;
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@keyframes mm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mm-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes mm-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes mm-slide-down {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

.mm-header {
  position: sticky;
  top: 0;
  background: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f0f0f0;
  z-index: 2;
}

.mm-title {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.mm-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #444;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mm-close:hover { color: #000; }

.mm-body {
  padding: 20px;
}

/* ===== Modal Preço ===== */
.mm-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.mm-price-label {
  color: #444;
}

.mm-price-value {
  color: #111;
  font-weight: 600;
}

.mm-price-value.mm-price-discount {
  color: #e11d48;
}

.mm-price-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 6px 0;
}

.mm-price-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 4px;
}

.mm-price-total-label {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.mm-price-total-value {
  font-size: 22px;
  font-weight: 700;
  color: #e11d48;
}

.mm-price-info {
  margin-top: 12px;
  text-align: right;
}

.mm-price-info p {
  font-size: 12px;
  color: #888;
  margin: 2px 0;
  line-height: 1.4;
}

/* ===== Modal Proteção ===== */
.mm-sheet.mm-sheet-trust {
  background: #FEF3E2;
  max-height: 75vh;
}

.mm-sheet-trust .mm-header {
  background: #FEF3E2;
  border-bottom: none;
  padding: 18px 20px 12px;
  align-items: flex-start;
}

.mm-sheet-trust .mm-title {
  color: #B8860B;
  font-size: 18px;
  font-weight: 700;
}

.mm-trust-shield {
  position: relative;
  width: 90px;
  height: 70px;
  flex-shrink: 0;
}

.mm-trust-shield .mm-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 2px solid #D4A574;
}

.mm-trust-shield .mm-ring-1 { width: 104px; height: 104px; opacity: 0.15; transform: translate(-50%, -50%); }
.mm-trust-shield .mm-ring-2 { width: 88px; height: 88px; opacity: 0.25; transform: translate(-50%, -50%); }
.mm-trust-shield .mm-ring-3 { width: 72px; height: 72px; opacity: 0.35; transform: translate(-50%, -50%); }

.mm-trust-shield svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
}

.mm-trust-close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #222;
  z-index: 10;
  padding: 4px;
  display: flex;
}

.mm-trust-body {
  padding: 0 20px 20px;
}

.mm-trust-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #E5D5C0;
}

.mm-trust-item:last-child {
  border-bottom: none;
}

.mm-trust-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #92400E;
  margin-top: 2px;
}

.mm-trust-text {
  flex: 1;
}

.mm-trust-text h3 {
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
  margin: 0 0 6px;
  line-height: 1.3;
}

.mm-trust-text p {
  font-size: 13px;
  color: #444;
  margin: 0 0 6px;
  line-height: 1.45;
}

.mm-trust-text p:last-child { margin-bottom: 0; }

.mm-trust-text a {
  color: #2563eb;
  text-decoration: underline;
  font-size: 13px;
}

.mm-trust-certs {
  display: flex;
  gap: 6px;
  margin: 8px 0 6px;
  flex-wrap: wrap;
}

.mm-trust-cert {
  background: #fff;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 700;
}

.mm-trust-cert.mm-cert-mc { color: #dc2626; }
.mm-trust-cert.mm-cert-visa { color: #1d4ed8; }

/* Body sem scroll quando modal aberto */
body.mm-modal-open {
  overflow: hidden !important;
}

/* Indicador visual de clickable na área de preço + trust */
.mm-clickable-area {
  cursor: pointer;
  transition: filter 0.15s ease;
}

.mm-clickable-area:hover {
  filter: brightness(1.02);
}

.mm-clickable-area:active {
  filter: brightness(0.97);
}
