:root {
  --cor-principal: #007BFF;
  --cor-escura: #0056b3;
  --cor-cinza: #6b7280;
  --cor-cinza-claro: #f8f9fa;
  --cor-branco: #ffffff;
  --cor-sucesso: #28a745;
  --cor-verde: #25D366;
  --cor-verde-escura: #1DA851;
  --cor-perigo: #dc3545;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --border-radius: 0.375rem;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  background-color: var(--cor-cinza-claro);
  color: #333;
}
/* ============================================
 * CONTAINER PRINCIPAL
 * ============================================ */

.orcamento-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  min-height: 100vh;
}

/* ============================================
 * BANNER DO ORÇAMENTO
 * ============================================ */

.orcamento-banner {
  background: linear-gradient(135deg, var(--cor-principal) 0%, var(--cor-escura) 100%);
  color: var(--cor-branco);
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.orcamento-banner h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.orcamento-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ============================================
 * LAYOUT PRINCIPAL (GRID)
 * ============================================ */

.orcamento-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
}

/* ============================================
 * LISTA DE ITENS
 * ============================================ */

.orcamento-items {
  background: var(--cor-branco);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--cor-cinza-claro);
}

.items-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 10px;
}

.items-count {
  background: var(--cor-principal);
  color: var(--cor-branco);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-limpar {
  background: var(--cor-perigo);
  color: var(--cor-branco);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-limpar:hover {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* ============================================
 * ITEM DO ORÇAMENTO
 * ============================================ */

.orcamento-item {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 1rem;
  transition: var(--transition);
  background: var(--cor-branco);
}

.orcamento-item:hover {
  border-color: var(--cor-principal);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.item-imagem {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  margin-right: 1rem;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--cor-branco);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid #e2e8f0;
}

.item-imagem img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.item-info {
  flex: 1;
  margin-right: 1rem;
}

.item-nome {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.item-codigo {
  font-size: 0.85rem;
  color: var(--cor-cinza);
  font-family: 'Courier New', monospace;
  background: #f7fafc;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid #e5e7eb;
}

.item-marca {
  font-size: 0.9rem;
  color: var(--cor-cinza);
  margin: 0.25rem 0;
}

.item-categoria {
  margin-top: 0.5rem;
}

.badge-tipo {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--cor-principal);
  color: var(--cor-branco);
}

/* ============================================
 * CONTROLES DE QUANTIDADE
 * ============================================ */

.item-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quantidade-control {
  display: flex;
  align-items: center;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cor-branco);
}

.qty-btn {
  background: var(--cor-branco);
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--cor-cinza);
  font-weight: 600;
  font-size: 1.2rem;
}

.qty-btn:hover {
  background: var(--cor-principal);
  color: var(--cor-branco);
}

.qty-btn:active {
  transform: scale(0.95);
}

.qty-input {
  width: 60px;
  height: 40px;
  border: none;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  background: var(--cor-cinza-claro);
  color: #2d3748;
}

.qty-input:focus {
  outline: none;
  background: #e2e8f0;
}

.btn-remover {
  background: var(--cor-perigo);
  color: var(--cor-branco);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
}

.btn-remover:hover {
  background: #c82333;
  transform: scale(1.05);
}

.btn-remover:active {
  transform: scale(0.98);
}

/* ============================================
 * RESUMO DO ORÇAMENTO
 * ============================================ */

.orcamento-resumo {
  background: var(--cor-branco);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 120px;
  height: fit-content;
}

.resumo-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 1.5rem;
  text-align: center;
}

.resumo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.resumo-item:last-of-type {
  border-bottom: 2px solid var(--cor-principal);
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--cor-principal);
}

.resumo-label {
  color: var(--cor-cinza);
  font-weight: 500;
}

.resumo-valor {
  font-weight: 700;
  color: #2d3748;
  font-size: 1.1rem;
}

/* ============================================
 * BOTÕES
 * ============================================ */

/* Botão WhatsApp - Verde */
.btn-whatsapp {
  width: 100%;
  background: linear-gradient(135deg, var(--cor-verde), var(--cor-verde-escura));
  color: var(--cor-branco);
  border: none;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, var(--cor-verde-escura), #128C7E);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 211, 102, 0.3);
  color: var(--cor-branco);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

.btn-whatsapp:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-whatsapp i {
  font-size: 1.3rem;
}

/* Botão Login */
.btn-login {
  background: var(--cor-principal);
  color: var(--cor-branco);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.btn-login:hover {
  background: var(--cor-escura);
  color: var(--cor-branco);
  transform: translateY(-1px);
}

/* Botão Continuar Comprando */
.btn-continuar {
  background: var(--cor-principal);
  color: var(--cor-branco);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-continuar:hover {
  background: var(--cor-escura);
  color: var(--cor-branco);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Botão Adicionar ao Orçamento */
.btn-add-orcamento {
  background: var(--cor-sucesso);
  color: var(--cor-branco);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.btn-add-orcamento:hover {
  background: #1e7e34;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-add-orcamento:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
}

/* ============================================
 * ALERTAS
 * ============================================ */

/* Alerta de Login */
.login-alert {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #856404;
}

.login-alert i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #f39c12;
}

.login-alert h4 {
  margin-bottom: 0.5rem;
  color: #856404;
  font-weight: 600;
}

/* ============================================
 * ESTADO VAZIO
 * ============================================ */

.orcamento-vazio {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--cor-branco);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.vazio-icon {
  font-size: 4rem;
  color: #cbd5e0;
  margin-bottom: 1.5rem;
}

.vazio-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 1rem;
}

.vazio-desc {
  color: var(--cor-cinza);
  margin-bottom: 2rem;
}

/* ============================================
 * HISTÓRICO DE PRODUTOS
 * ============================================ */

.historico-produtos {
  background: var(--cor-cinza-claro);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.historico-produtos h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 1rem;
}

.produtos-grid {
  display: grid;
  gap: 0.75rem;
}

.produto-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--cor-branco);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: var(--transition);
}

.produto-card:hover {
  border-color: var(--cor-principal);
  box-shadow: var(--shadow-sm);
}

.produto-details {
  flex: 1;
}

.produto-details strong {
  display: block;
  color: #2d3748;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.produto-details small {
  display: block;
  color: var(--cor-cinza);
  font-size: 0.85rem;
  line-height: 1.4;
}

.produto-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ============================================
 * FOOTER
 * ============================================ */

.footer {
  background: #343a40;
  color: var(--cor-branco);
  padding: 4rem 20px 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-title {
  color: var(--cor-branco);
  font-size: 1.125rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-description {
  color: #ced4da;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ced4da;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #17a2b8;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #495057;
  color: var(--cor-branco);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-link:hover {
  transform: translateY(-2px);
}

.social-link.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link.whatsapp:hover {
  background: var(--cor-verde);
}

.footer-divider {
  height: 1px;
  background: #495057;
  margin: 2rem 0;
}

.footer-bottom {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.copyright {
  color: #adb5bd;
  margin: 0;
  font-size: 0.9rem;
}

/* ============================================
 * ELEMENTOS UTILITÁRIOS
 * ============================================ */

code {
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  color: #1f2937;
  border: 1px solid #e5e7eb;
}

/* ============================================
 * RESPONSIVIDADE
 * ============================================ */

@media (max-width: 1024px) {
  .orcamento-layout {
    grid-template-columns: 1fr 300px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .orcamento-container {
    padding: 100px 15px 40px;
  }

  .orcamento-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .orcamento-resumo {
    position: static;
    order: -1;
    top: auto;
  }

  .orcamento-banner h1 {
    font-size: 2rem;
  }

  .orcamento-banner p {
    font-size: 1rem;
  }

  .orcamento-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .item-imagem {
    margin-right: 0;
    align-self: center;
  }

  .item-info {
    margin-right: 0;
    width: 100%;
  }

  .item-controls {
    width: 100%;
    justify-content: space-between;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .produto-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .produto-actions {
    width: 100%;
    justify-content: stretch;
  }

  .produto-actions button {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .orcamento-banner {
    padding: 1.5rem;
  }

  .orcamento-banner h1 {
    font-size: 1.75rem;
  }

  .orcamento-items,
  .orcamento-resumo {
    padding: 1.5rem;
  }

  .orcamento-item {
    padding: 1rem;
  }

  .item-imagem {
    width: 60px;
    height: 60px;
  }

  .item-nome {
    font-size: 1rem;
  }

  .qty-btn {
    width: 35px;
    height: 35px;
  }

  .qty-input {
    width: 50px;
    height: 35px;
  }

  .btn-remover {
    width: 35px;
    height: 35px;
  }

  .resumo-title {
    font-size: 1.25rem;
  }

  .btn-whatsapp {
    font-size: 1rem;
    padding: 12px 16px;
  }
}