/* =============================
   LAYOUT GERAL DO CONFIGURADOR
   ============================= */

#configurador-tabuleiro {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  box-sizing: border-box;
}

/* =============================
   ÁREA DO TABULEIRO
   ============================= */

.tabuleiro-visual {
  flex: 0 0 auto;
  max-width: 420px; /* controla o tamanho */
  width: 100%;
}

.tabuleiro-visual svg {
  width: 100%;
  height: auto;
  display: block;

  /* Rotação do tabuleiro */
  transform: rotate(90deg);
  transform-origin: center center;
}

/* =============================
   ÁREA DE OPÇÕES
   ============================= */

.tabuleiro-opcoes {
  flex: 1;
  max-width: 480px;
}

.tabuleiro-opcoes h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

/* =============================
   SEÇÕES DE OPÇÕES
   ============================= */

.grupo-opcoes {
  border: 1px solid #ddd;
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.grupo-opcoes legend {
  font-weight: 700;
  padding: 0 6px;
  font-size: 14px;
}

/* Espaçamento interno */
.grupo-opcoes label {
  margin-top: 8px;
}

/* Compacta selects */
.grupo-opcoes select {
  margin-bottom: 6px;
}


/* =============================
   FORMULÁRIO / CAMPOS
   ============================= */

#opcoes-configurador {
  display: flex;
  flex-direction: column;
  gap: 14px; /* espaçamento vertical entre campos */
}

/* Agrupa visualmente label + select */
#opcoes-configurador label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

/* Selects em linha inteira */
#opcoes-configurador select {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  box-sizing: border-box;
}

/* Blocos condicionais (fita / borda personalizada) */
#opcao-cor-fita,
#opcao-cor-borda {
  margin-top: 6px;
}

/* =============================
   PREÇO
   ============================= */

.tabuleiro-preco {
  position: sticky;
  top: 20px;
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  margin-top: 20px;
  z-index: 5;
}


#preco-final {
  font-weight: bold;
  font-size: 22px;
  display: block;
  margin-top: 6px;
}

/* =============================
   BOTÕES
   ============================= */

.tabuleiro-acoes {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tabuleiro-acoes button {
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 4px;
  border: none;
  flex: 1 1 auto;
}

.btn-carrinho {
  background: #333;
  color: #fff;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

/* =============================
   RESPONSIVO (CELULAR)
   ============================= */

@media (max-width: 768px) {
  #configurador-tabuleiro {
    flex-direction: column;
    align-items: center;
  }

  .tabuleiro-visual {
    max-width: 320px;
  }

  .tabuleiro-opcoes {
    max-width: 100%;
  }

  .tabuleiro-acoes {
    width: 100%;
  }

  .tabuleiro-acoes button {
    width: 100%;
  }
}

/* =============================
   MOBILE — SEÇÕES DO CONFIGURADOR
   ============================= */

@media (max-width: 768px) {

  /* Área geral */
  #configurador-tabuleiro {
    padding: 12px;
  }

  /* Remove visual pesado dos fieldsets */
  .grupo-opcoes {
    border: none;
    padding: 0;
    margin-bottom: 18px;
  }

  /* Título da seção */
  .grupo-opcoes legend {
    font-size: 15px;
    font-weight: 700;
    padding: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
    width: 100%;
  }

  /* Espaçamento entre campos */
  .grupo-opcoes label {
    margin-top: 10px;
    font-size: 14px;
  }

  .grupo-opcoes select {
    font-size: 14px;
    padding: 10px;
  }

  /* Preço fixo no topo no mobile */
  .tabuleiro-preco {
    position: sticky;
    top: 0;
    margin: 0 0 16px 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    background: #fff;
  }

  /* Botões em coluna */
  .tabuleiro-acoes {
    flex-direction: column;
  }

  .tabuleiro-acoes button {
    width: 100%;
  }
}

