/* ============================================
   DESIGN SYSTEM - TEMA CLARO PROFISSIONAL
   ============================================ */

:root {
  /* Cores principais */
  --primary: #D4AF37;
  --primary-dark: #B8960C;
  --primary-light: #F3E5AB;
  
  /* Cores neutras */
  --white: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  
  /* Cores de feedback */
  --success: #10B981;
  --success-dark: #059669;
  --error: #EF4444;
  --error-dark: #DC2626;
  --warning: #F59E0B;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Bordas */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Transições */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header moderno */
header {
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
  color: var(--gray-800);
  padding: 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

/* Banner topo */
.banner-topo {
  width: 100%;
  max-width: 1600px;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .banner-topo {
    max-height: 300px;
  }
}

/* Logo container */
.logo-container {
  text-align: center;
  margin-top: -60px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 10;
}

.logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  transition: transform var(--transition-base);
}

.logo:hover {
  transform: scale(1.05);
}

/* Promo bar */
.promo-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 0.875rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

/* Horário funcionamento */
.horario-funcionamento {
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-200);
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn var(--transition-base);
}

/* Botões - Estilo Premium */
button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(0);
}

/* Botão voltar aos produtos */
#voltar-aos-produtos {
  background: var(--gray-600);
  color: var(--white);
}

#voltar-aos-produtos:hover {
  background: var(--gray-700);
  transform: translateY(-2px);
}

/* Carrinho */
#carrinho {
  background: var(--white);
  padding: 1.5rem;
  margin: 2rem auto;
  width: 90%;
  max-width: 700px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

#carrinho h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Lista carrinho */
#lista-carrinho {
  list-style: none;
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}

#lista-carrinho li {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: background var(--transition-fast);
}

#lista-carrinho li:hover {
  background: var(--gray-100);
}

#lista-carrinho li:last-child {
  border-bottom: none;
}

#lista-carrinho li button.remover {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--error) !important;
  border: none;
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

#lista-carrinho li button.remover:hover {
  background: var(--error-dark) !important;
  transform: translateY(-50%) scale(1.05);
}

/* Observação texto */
.observacao-texto {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  border-left: 3px solid var(--primary);
}

#total-carrinho {
  font-weight: 700;
  font-size: 1.25rem;
  display: block;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--gray-800);
  padding: 1rem;
  background: var(--gray-100);
  border-radius: var(--radius-md);
}

/* Produtos Grid */
#produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  transition: opacity var(--transition-base);
}

/* Cards de produtos */
.produto {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.produto::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: translateX(-100%);
  transition: transform var(--transition-base);
}

.produto:hover::before {
  transform: translateX(0);
}

.produto:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--gray-300);
}

.produto h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: var(--gray-800);
}

/* Observação produto */
.observacao-produto {
  margin-top: 0.75rem;
  padding: 0.625rem;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background-color: var(--gray-50);
  color: var(--gray-700);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.observacao-produto:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Detalhes produto */
.detalhes-produto {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0.5rem 0;
}

.preco-produto {
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 0.5rem;
  display: inline-block;
  font-size: 1.125rem;
}

/* Scrollbar personalizada */
#lista-carrinho::-webkit-scrollbar {
  width: 8px;
}

#lista-carrinho::-webkit-scrollbar-track {
  background: var(--gray-200);
  border-radius: 10px;
}

#lista-carrinho::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

#lista-carrinho::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Dados usuário */
#dados-usuario {
  display: none;
  margin-top: 2rem;
  animation: fadeIn var(--transition-base);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

#dados-usuario input,
#dados-usuario select {
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 0.625rem 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background-color: var(--white);
  color: var(--gray-800);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

#dados-usuario input:focus,
#dados-usuario select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

#dados-usuario input::placeholder {
  color: var(--gray-400);
}

#dados-usuario label {
  font-weight: 500;
  color: var(--gray-700);
  display: block;
  margin-top: 0.5rem;
}

/* Botões pagamento */
#pagar,
#finalizar-compra {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border: none;
  padding: 0.875rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
}

/* Filtros */
#filtros {
  text-align: center;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 1rem;
}

#filtros button {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  padding: 0.625rem 1.25rem;
  margin: 0;
  font-weight: 500;
}

#filtros button:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Botões especiais */
#confirmar-compra,
#copiar-codigo {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  color: var(--white);
  border: none;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  width: 100%;
}

/* Modal QR Code */
#modal-qrcode {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  z-index: 1000;
  width: 90vw;
  max-width: 380px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  animation: fadeIn var(--transition-base);
  color: var(--gray-800);
}

#modal-content {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

#modal-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

#qrcode-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary);
  padding: 0.5rem;
  background: var(--white);
  margin: 0 auto 1rem;
  display: block;
}

#valor-pagamento {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0.75rem 0;
  color: var(--primary-dark);
}

#codigo-container {
  padding: 0.75rem;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  color: var(--gray-700);
  font-size: 0.875rem;
  word-break: break-word;
  margin-bottom: 0.5rem;
  border: 1px solid var(--gray-200);
}

/* Modal Sabores */
#modal-sabores {
  display: none;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

#modal-sabores > div {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 400px;
  color: var(--gray-800);
  box-shadow: var(--shadow-xl);
}

#modal-sabores h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--gray-800);
}

#modal-sabores label {
  font-weight: 600;
  color: var(--gray-700);
  display: block;
  margin-top: 0.75rem;
}

#modal-sabores select,
#modal-sabores textarea {
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background-color: var(--white);
  color: var(--gray-800);
  padding: 0.625rem;
  width: 100%;
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

#modal-sabores select:focus,
#modal-sabores textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Modal Confirmação */
#modal-confirmacao {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  color: var(--gray-800);
  padding: 2rem;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  z-index: 9999;
  box-shadow: var(--shadow-xl);
  animation: fadeIn var(--transition-base);
  text-align: center;
}

#modal-confirmacao h2 {
  margin-top: 0;
  color: var(--primary-dark);
  font-size: 1.5rem;
}

#detalhes-pedido {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  text-align: left;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
}

#detalhes-pedido p {
  margin: 0.5rem 0;
}

#fechar-confirmacao {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

/* Pedidos */
.pedido-item {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
}

.pedido-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
}

.status-pendente {
  background-color: #FEF3C7;
  color: #D97706;
}

.status-entregue {
  background-color: #D1FAE5;
  color: #059669;
}

.status-cancelado {
  background-color: #FEE2E2;
  color: #DC2626;
}

.pedido-produto {
  padding: 0.5rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  border: 1px solid var(--gray-200);
}

/* Botão WhatsApp */
.whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all var(--transition-base);
  animation: float 3s ease-in-out infinite;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

/* Botão Meus Pedidos */
#btn-meus-pedidos-flutuante {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all var(--transition-base);
  animation: float 3s ease-in-out infinite;
  cursor: pointer;
}

#btn-meus-pedidos-flutuante:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.pedido-icon {
  width: 30px;
  height: 30px;
}

/* Footer moderno */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer h3,
.footer h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer h3 {
  font-size: 1.5rem;
}

.footer-links ul,
.footer-contact ul {
  list-style: none;
  padding: 0;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  width: 32px;
  height: 32px;
  transition: transform var(--transition-fast);
  opacity: 0.8;
}

.social-icon:hover {
  transform: scale(1.1);
  opacity: 1;
}

.footer-copyright {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-800);
  font-size: 0.875rem;
}

/* Validação de erro */
.input-error {
  border: 2px solid var(--error) !important;
  background-color: #FEF2F2 !important;
  outline: none !important;
}

.shake {
  animation: shake 0.35s linear;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shake {
  10%, 90% {
    transform: translateX(-2px);
  }
  20%, 80% {
    transform: translateX(3px);
  }
  30%, 50%, 70% {
    transform: translateX(-4px);
  }
  40%, 60% {
    transform: translateX(4px);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  #produtos {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }
  
  .produto {
    padding: 1rem;
  }
  
  #carrinho {
    width: 95%;
    padding: 1rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
  
  .footer-contact li {
    justify-content: center;
  }
  
  .whatsapp-btn,
  #btn-meus-pedidos-flutuante {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .whatsapp-btn {
    bottom: 1rem;
    right: 1rem;
  }
  
  #btn-meus-pedidos-flutuante {
    bottom: 1rem;
    left: 1rem;
  }
}

@media (max-width: 480px) {
  #produtos {
    grid-template-columns: 1fr;
  }
  
  .produto {
    max-width: 100%;
  }
  
  #filtros button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}