/* =========================================================
   TOKENS / BASE — minimal, arestas retas
========================================================= */
:root {
  --container: 1200px;

  /* Cores neutras */
  --ink: #0b0b0b;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8fafc;

  /* Ação/estados */
  --accent: #111111;
  --accent-contrast: #ffffff;

  --ok-50: #f0fdf4;
  --ok-600: #059669;

  --danger-50: #fef2f2;
  --danger-600: #dc2626;

  /* Tipografia/Espaços */
  --label-w: 600;
  --pad: 12px;
  --gap: 16px;

  /* Arestas retas */
  --radius: 0; /* ← canto reto */
  --radius-lg: 0; /* ← canto reto */
}

/* =========================================================
   MODAL (70% viewport), cabeçalho e layout
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999; /* ↑ garante que fica acima de headers/stickies */
}
.modal-overlay.is-open {
  display: flex;
}

/* Patch defensivo: impedir colisões com regras globais (.modal{display:none}) */
#customizer .modal {
  display: block;
}

.modal {
  width: min(70vw, 1100px);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.modal header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.modal header h3 {
  margin: 0;
  font-family:
    "Oswald",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.close-modal {
  all: unset;
  cursor: pointer;
  padding: 6px;
}

/* =========================================================
   FORM: grid, campos, foco e erros
========================================================= */
#customizer .content {
  padding: clamp(20px, 3vw, 28px);
}

#customizer .form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
#customizer .col-6 {
  grid-column: span 6;
}
#customizer .col-12 {
  grid-column: span 12;
}

#customizer label {
  display: block;
  margin: 0 0 6px;
  font-weight: var(--label-w);
  color: var(--ink);
}

#customizer input[type="text"],
#customizer input[type="tel"],
#customizer input[type="number"],
#customizer select,
#customizer textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.18s ease;
}

#customizer textarea {
  min-height: 120px;
  resize: vertical;
}

#customizer input:focus,
#customizer select:focus,
#customizer textarea:focus {
  outline: none;
  border-color: var(--accent);
}

#customizer [aria-invalid="true"] {
  border-color: var(--danger-600) !important;
  background: var(--danger-50);
}
#customizer .error-msg {
  color: var(--danger-600);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* =========================================================
   UPLOAD ZONES — minimal
========================================================= */
#customizer .upload-zone {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 14px;
  text-align: center;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}
#customizer .upload-zone:focus-within {
  border-color: var(--accent);
  background: #f4f6f8;
}
#customizer .upload-zone .zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
#customizer .upload-zone .counter {
  color: #475569;
  font-weight: 600;
}
#customizer .upload-zone .pick {
  all: unset;
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
#customizer .thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
#customizer .thumb {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
#customizer .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#customizer .zone-error {
  color: var(--danger-600);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* =========================================================
   BAG INFO — muito visível e limpo
========================================================= */
/* SP PRO: incluída (barra sólida à esquerda) */
#customizer #bagInfo.bag-included {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--ok-50);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-left: 4px solid var(--ok-600);
  color: #065f46;
  font-weight: 700;
}

/* SP X: escolha via <select> */
#customizer #bagInfo.bag-choice {
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
#customizer #bagInfo.bag-choice > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
#customizer #bagInfo.bag-choice select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

/* Fallback automático: quando existir <select>, aplicar estilo “choice” */
#customizer #bagInfo:has(select) {
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* =========================================================
   FOOTER / BOTÕES — minimal, retangulares
========================================================= */
#customizer .modal footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
#customizer .modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
#customizer .modal .btn:hover {
  background: #000;
  border-color: #000;
}
#customizer .modal .btn.ghost {
  background: transparent;
  color: var(--ink);
}
#customizer .modal .btn.ghost:hover {
  background: #f4f4f5;
}

/* Desativado (se usares validação em tempo real) */
#customizer .modal .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =========================================================
   PRODUTOS: “Detalhes” minimal (caso uses na mesma página)
========================================================= */
.product-card {
  position: relative;
}
.product-details {
  display: none;
}
.product-card.is-details .product-price,
.product-card.is-details .product-meta,
.product-card.is-details .product-cta {
  display: none !important;
}
.product-card.is-details .product-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.product-details h3 {
  margin: 0 0 4px;
  font-family:
    "Oswald",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.details-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}
.details-back,
.details-back2 {
  position: absolute;
  top: 12px;
  left: 12px;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  display: none;
}
.product-card.is-details .details-back,
.product-card.is-details .details-back2 {
  display: inline-flex;
}
.details-back i,
.details-back2 i {
  font-size: 18px;
}

/* =========================================================
   USP (secção completa) — grelha simples
========================================================= */
#usp-full .wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}
#usp-full .usp-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 10px;
}
#usp-full i {
  font-size: 20px;
  margin-top: 2px;
}
#usp-full h4 {
  margin: 0 0 6px;
  letter-spacing: 0.3px;
}
#usp-full p {
  margin: 0;
  color: #444;
}

/* =========================================================
   RESPONSIVO
========================================================= */
@media (max-width: 960px) {
  #usp-full .wrap {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 780px) {
  #customizer .col-6 {
    grid-column: span 12;
  }
}
@media (max-width: 560px) {
  #usp-full .wrap {
    grid-template-columns: 1fr;
  }
}
.info-wpp {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: #333;
  background: #f7f7f7;
  border: 1px dashed #dcdcdc;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
}
.info-wpp i {
  margin-top: 2px;
}
.info-wpp strong {
  font-weight: 600;
}
