/* Reset e variáveis */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #27ae60;
  --primary-dark: #219150;
  --secondary-color: #f39c12;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --danger-color: #e74c3c;
  --gray-color: #95a5a6;
  --border-radius: 8px;
  --shadow: 0 2px 10px rgba(0,0,0,0.3);
  /* Cores do tema escuro */
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-dark: #333333;
}

/* Switch Toggle - REMOVED */
/*
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}
*/

.setting-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  border: 1px solid var(--border-dark);
}

.setting-label {
  margin-left: 15px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.setting-description {
  margin-left: 15px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 5px;
}

.settings-container {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 20px;
  border: 1px solid var(--border-dark);
}

.admin-settings h2 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

/* Estilos específicos para a página de pedidos */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  height: 100vh;
  overflow: auto;
}

/* Container principal mobile - versão com scroll */
.mobile-container {
  max-width: 100%;
  height: 100vh;
  margin: 0 auto;
  background: var(--bg-dark);
  position: relative;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

/* Cabeçalho */
.app-header {
  background: #000000;
  color: var(--text-primary);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  z-index: 100;
  border-bottom: 1px solid var(--border-dark);
  flex-shrink: 0;
}

/* Barra de pesquisa no cabeçalho */
.header-search {
  position: relative;
  flex: 1;
  max-width: 300px;
  margin: 0 16px;
}

#search-input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border-radius: 24px;
  border: 2px solid var(--border-dark);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

#search-input:focus {
  border-color: var(--primary-color);
}

.search-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: var(--shadow);
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #2d2d2d;
}

.search-result-image {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #333;
}

.search-result-info {
  flex: 1;
}

.search-result-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 16px;
}

.search-result-price {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
}

/* Seletor de Categorias */
.category-selector {
  display: flex;
  background: var(--bg-card);
  padding: 12px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border-dark);
  flex-shrink: 0;
}

.category-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: var(--border-radius);
  background: #2d2d2d;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn.active {
  background: var(--primary-color);
  color: white;
}

.category-btn:hover:not(.active) {
  background: #3d3d3d;
}

/* Carrossel de Produtos - altura flexível */
.product-carousel {
  padding: 20px 0;
  background: var(--bg-dark);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  margin-bottom: 16px;
  flex: 1;
  overflow: auto;
}

.current-product {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  width: 100%;
  height: 100%;
  cursor: default;
  user-select: none;
  transition: transform 0.2s ease;
  touch-action: auto; /* Restaurar o comportamento padrão de toque */
  /* Garantir que o container não interfira com eventos de toque nos botões */
  pointer-events: none;
}

.current-product > * {
  /* Reativar eventos de ponteiro para os elementos filhos */
  pointer-events: auto;
}

.current-product:active {
  cursor: default;
  transform: none;
}

.product-card {
  width: 100%;
  max-width: 100%;
  border-radius: var(--border-radius);
  overflow: hidden;
  text-align: center;
  transition: none;
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* Efeito de vidro (glassmorphism) */
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  cursor: default;
  /* Alteração importante: permitir cliques nos botões dentro do card */
  touch-action: auto; /* Restaurar o comportamento padrão de toque */
  /* Adicionar propriedades para melhor experiência de toque */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Garantir que o card não interfira com eventos de toque nos botões */
  pointer-events: auto;
}

.product-card:active {
  cursor: default;
  transform: none;
}

.product-image-container {
  width: 100%;
  height: 65%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.product-info {
  padding: 8px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.product-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.add-to-cart {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 10px 16px;
  font-size: 1.0rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
  flex-shrink: 0;
  /* Propriedades importantes para touch */
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* Adicionar propriedades para melhor experiência de toque */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Adicionar transições suaves */
  transition: all 0.2s ease;
  /* Garantir que o botão esteja sempre acima de outros elementos */
  z-index: 10;
  position: relative;
  /* REMOVIDO TEMPORARIAMENTE: transformações que podem interferir com o clique */
  transform: none !important;
}

.add-to-cart:hover {
  background: var(--primary-dark);
}

.add-to-cart:active {
  /* REMOVIDO TEMPORARIAMENTE: transform: scale(0.98); */
  background: var(--primary-dark);
  transform: none;
}

.add-to-cart:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  padding: 12px 0;
  flex-shrink: 0;
}

.dots-container {
  display: flex;
  gap: 12px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #444;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active {
  background: var(--primary-color);
}

/* Botões do Carrossel */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(39, 174, 96, 0.3);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  color: white;
  font-size: 1.5rem;
}

.carousel-btn:hover {
  background: var(--primary-color);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-btn i {
  pointer-events: none; /* Evitar que o ícone interfira nos cliques */
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(100, 100, 100, 0.3);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  overflow-y: auto;
}

.modal.show {
  display: block;
}

.modal-content {
  background: var(--bg-card);
  margin: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  animation: modalSlideIn 0.3s ease;
  border: 1px solid var(--border-dark);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalSlideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-dark);
}

.modal-header h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.close-button {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  color: var(--danger-color);
}

.modal-body {
  padding: 20px;
}

/* Modal de Quantidade */
.quantity-modal .modal-content {
  max-width: 400px;
}

.product-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-dark);
}

.preview-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.product-details h3 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 1.3rem;
}

.quantity-selector {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 20px;
}

.quantity-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border-dark);
  background: #2d2d2d;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.quantity-btn:hover {
  background: #3d3d3d;
}

.quantity-display {
  min-width: 50px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
}

/* Seção de Adicionais */
.additionals-section {
  margin: 24px 0;
}

.additionals-section h3 {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 1.3rem;
}

.additionals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.additional-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
}

.additional-checkbox {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  accent-color: var(--primary-color);
}

.additional-info {
  flex: 1;
}

.additional-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.additional-price {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 500;
}

/* Seção de Lanches no Carrinho */
.cart-items-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dark);
}

.cart-items-section h4 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-selector {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
  cursor: pointer;
}

.cart-item-selector:hover {
  background: #3d3d3d;
}

.cart-item-checkbox {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  accent-color: var(--primary-color);
}

.cart-item-info-selector {
  flex: 1;
}

.cart-item-name-selector {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.cart-item-quantity-selector {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Observações */
.observation-section {
  margin: 24px 0;
}

.observation-section label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.observation-section textarea {
  width: 100%;
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  background: #2d2d2d;
  color: var(--text-primary);
}

.observation-section textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Seção de Entrega */
.delivery-section {
  margin: 24px 0;
  padding: 20px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
}

.delivery-section h3 {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 1.3rem;
}

.use-location-btn {
  width: 100%;
  padding: 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.3s;
  margin-bottom: 16px;
}

.use-location-btn:hover {
  background: var(--primary-dark);
}

.use-location-btn i {
  font-size: 1.2rem;
}

.delivery-info {
  padding: 16px;
  background: rgba(39, 174, 96, 0.1);
  border-radius: var(--border-radius);
  border: 1px solid var(--primary-color);
}

.delivery-info p {
  margin: 8px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.delivery-info span {
  font-weight: bold;
  color: var(--primary-color);
}

.delivery-error {
  padding: 16px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: var(--border-radius);
  border: 1px solid var(--danger-color);
  font-size: 0.95rem;
}

/* Modal do Mapa */
.map-modal-content {
  max-width: 90%;
  width: 600px;
  margin: 20px auto;
}

#map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
  margin-bottom: 20px;
}

.map-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.map-controls button {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

#confirm-location-btn {
  background: var(--primary-color);
  color: white;
}

#confirm-location-btn:hover {
  background: var(--primary-dark);
}

#cancel-map-btn {
  background: #2d2d2d;
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
}

#cancel-map-btn:hover {
  background: #3d3d3d;
}

/* Modal de Imagem */
.image-modal .modal-content {
  max-width: 450px;
}

.image-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-dark);
}

.tab-btn {
  flex: 1;
  padding: 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.image-upload-section, .image-url-section {
  margin-top: 24px;
}

.image-upload-section label, .image-url-section label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.image-upload-section input[type="file"], .image-url-section input[type="text"] {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 20px;
  background: #2d2d2d;
  color: var(--text-primary);
}

.image-upload-section input[type="file"]:focus, .image-url-section input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color);
}

.image-upload-section input[type="file"] {
  padding: 14px;
}

/* Seção de Centralização de Imagem */
.image-position-section {
  margin: 24px 0;
  padding: 20px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
}

.image-position-section h3 {
  margin-bottom: 20px;
  color: var(--text-primary);
  font-size: 1.4rem;
}

.image-position-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.position-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.position-control label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.position-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #1e1e1e;
  outline: none;
  -webkit-appearance: none;
}

.position-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

.position-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
}

.position-control span {
  align-self: flex-end;
  font-weight: 500;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.reset-button {
  background: #3d3d3d;
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.reset-button:hover {
  background: #4d4d4d;
}

/* Estilos para a imagem no modal de edição */
.preview-image {
  transition: transform 0.2s ease;
  max-width: 100%;
  height: auto;
}

/* Formulário de Edição */
.edit-form {
  margin: 24px 0;
  padding: 20px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.form-control {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  background: #1e1e1e;
  color: var(--text-primary);
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-control[readonly] {
  background-color: #3d3d3d;
  cursor: not-allowed;
}

.admin-product-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-style: italic;
}

/* Carrinho */
.cart-items {
  list-style: none;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-dark);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.cart-item-additionals {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.cart-item-observation {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.cart-item-price {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 500;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quantity-control-cart {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-btn-cart {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-dark);
  background: #2d2d2d;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.quantity-btn-cart:hover {
  background: #3d3d3d;
}

.quantity-cart {
  min-width: 40px;
  text-align: center;
  font-weight: 500;
  color: var(--text-primary);
}

.remove-item {
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-summary {
  border-top: 1px solid var(--border-dark);
  padding-top: 20px;
}

.total {
  display: flex;
  justify-content: space-between;
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.checkout-button, .confirm-button, .new-order-button {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.checkout-button, .confirm-button {
  background: var(--primary-color);
  color: white;
}

.checkout-button:hover, .confirm-button:hover {
  background: var(--primary-dark);
}

.new-order-button {
  background: var(--secondary-color);
  color: white;
}

.new-order-button:hover {
  background: #e67e22;
}

/* Campo para valor pago em dinheiro */
#dinheiro-section {
  margin-top: 15px;
  padding: 15px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
}

#dinheiro-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

#valor-pago {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #1e1e1e;
  color: var(--text-primary);
}

#valor-pago:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.help-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* Resumo do Pedido */
.order-summary {
  margin: 0;
  padding: 0;
}

.order-summary h3 {
  margin-bottom: 16px;
  color: var(--text-primary);
  text-align: center;
  font-size: 1.4rem;
}

.order-item-summary {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-dark);
}

.order-item-summary:last-child {
  border-bottom: none;
}

.order-item-additionals {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.order-item-observation {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 6px;
}

/* Confirmação */
.confirmation {
  text-align: center;
  padding: 30px;
}

.confirmation-icon {
  font-size: 5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.confirmation h2 {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 2rem;
}

.confirmation p {
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* Indicador de swipe para cima */
.swipe-up-indicator {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 90;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  animation: bounce 2s infinite;
}

.swipe-up-indicator:hover {
  opacity: 1;
}

.swipe-up-bar {
  width: 40px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
  margin-bottom: 8px;
}

.swipe-up-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Informações do WhatsApp */
.whatsapp-info {
  background: #25D366;
  color: white;
  padding: 15px;
  border-radius: var(--border-radius);
  text-align: center;
  margin-bottom: 20px;
}

.whatsapp-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.whatsapp-info p {
  margin: 0;
  font-weight: 500;
}

/* Seção do formulário do cliente */
.client-form {
  margin-bottom: 24px;
}

.client-form h3 {
  margin-bottom: 20px;
  color: var(--text-primary);
  font-size: 1.5rem;
  text-align: center;
}

/* Estilos específicos para campos de nome e endereço */
#client-name, #client-address {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  background: #1e1e1e;
  color: var(--text-primary);
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#client-name:focus, #client-address:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#client-name::placeholder, #client-address::placeholder {
  color: #666;
}

/* Estilos para o campo de endereço (textarea) */
#client-address {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

/* Estilos para labels dos campos */
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 1.1rem;
}

/* Previous Address */
.previous-address {
  margin-top: 12px;
  padding: 12px;
  background: rgba(39, 174, 96, 0.1);
  border-radius: var(--border-radius);
  border: 1px solid var(--primary-color);
}

.previous-address label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.previous-address input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  margin-top: 2px;
}

.previous-address span {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Estilos para o painel administrativo */
.admin-products {
  padding: 20px;
}

.admin-products h2 {
  margin-bottom: 20px;
  color: var(--text-primary);
  font-size: 1.8rem;
}

.products-list {
  display: grid;
  gap: 20px;
}

.admin-product-card {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-dark);
}

.admin-product-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  background: #2d2d2d;
}

.admin-product-info {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.admin-product-info h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 1.3rem;
}

.admin-product-category {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.admin-product-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-style: italic;
  flex-grow: 1;
}

.admin-product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: auto;
}

.admin-product-actions {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #2d2d2d;
  gap: 10px;
}

.edit-image-btn, .delete-product-btn {
  padding: 10px 16px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.3s;
  font-size: 0.9rem;
}

.edit-image-btn {
  background: var(--primary-color);
  color: white;
}

.edit-image-btn:hover {
  background: var(--primary-dark);
}

.delete-product-btn {
  background: var(--danger-color);
  color: white;
}

.delete-product-btn:hover {
  background: #c0392b;
}

/* Modal de imagem no admin */
.image-container {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.draggable-image {
  max-width: 100%;
  height: auto;
  cursor: grab;
  user-select: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.draggable-image:active {
  cursor: grabbing;
}

.zoom-controls {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: center;
}

.zoom-button {
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
}

.zoom-button:hover {
  background: var(--primary-dark);
}

/* Mensagens de erro e estado */
.error-message {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--danger-color);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  margin: 20px 0;
}

.error-message p {
  color: var(--text-primary);
  margin-bottom: 15px;
}

.error-message button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 10px 20px;
  font-weight: 500;
  cursor: pointer;
}

.no-products {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 40px 20px;
}

/* Estilos para a página de personalização */
.color-picker-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-picker {
  width: 50px;
  height: 40px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.color-value {
  flex: 1;
  font-family: monospace;
}

.logo-preview {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--border-dark);
  border-radius: var(--border-radius);
  text-align: center;
  color: var(--text-secondary);
}

.logo-preview img {
  max-width: 100%;
  height: auto;
}

/* Botão de voltar */
#back-to-admin {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;

/* Estilos para a página de detalhes do pedido */
.pedido-detalhe-container {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.pedido-detalhe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-dark);
}

.pedido-detalhe-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.pedido-id {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.pedido-status {
  text-align: center;
  margin-bottom: 30px;
}

.status-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 500;
  color: white;
}

.pedido-info-section, .pedido-itens-section {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-dark);
}

.pedido-info-section h3, .pedido-itens-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-dark);
}

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

.label {
  font-weight: 500;
  color: var(--text-primary);
}

.itens-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.item-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-dark);
}

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

.item-details {
  display: flex;
  flex-direction: column;
}

.item-name {
  font-weight: 500;
  color: var(--text-primary);
}

.item-quantity {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.item-price {
  font-weight: 500;
  color: var(--text-primary);
}

.pedido-total-section {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-dark);
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.actions-section {
  text-align: center;
  margin-top: 30px;
}

.whatsapp-button {
  background: #25D366;
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 15px 25px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.3s;
}

.whatsapp-button:hover {
  background: #128C7E;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-spinner {
  text-align: center;
  color: white;
}

.loading-spinner i {
  font-size: 3rem;
  margin-bottom: 20px;
}

/* Error message */
.error-message {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  margin: 20px 0;
  border: 1px solid var(--border-dark);
}

.error-message p {
  color: var(--text-primary);
  margin-bottom: 15px;
}

.retry-button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 10px 20px;
  font-weight: 500;
  cursor: pointer;
}

.no-products {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 40px 20px;
}

/* Estilos para o modal do QR Code do WhatsApp */
.qr-code-container {
  text-align: center;
  margin: 20px 0;
  padding: 20px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
}

.qr-code-container img {
  max-width: 100%;
  height: auto;
  border: 2px solid white;
  border-radius: 8px;
}

.qr-code-container p {
  margin: 10px 0;
  color: var(--text-primary);
}

.qr-code-container .error {
  color: var(--danger-color);
  font-weight: bold;
}

.qr-code-container ol {
  text-align: left;
  margin: 15px 0;
  padding-left: 20px;
  color: var(--text-primary);
}

.qr-code-container li {
  margin: 10px 0;
}


/* Estilos para os diferentes estados do WhatsApp */
.whatsapp-connected {
  color: var(--text-primary);
  padding: 20px;
}

.whatsapp-connected h3 {
  color: #25D366;
  margin-bottom: 15px;
}

.whatsapp-pending {
  color: var(--text-primary);
  padding: 20px;
}

.whatsapp-pending h3 {
  color: #f39c12;
  margin-bottom: 15px;
}

.whatsapp-error {
  color: var(--text-primary);
  padding: 20px;
}

.whatsapp-error h3 {
  color: var(--danger-color);
  margin-bottom: 15px;
}



#back-to-admin:hover {
  color: var(--primary-color);
}

/* Preview da Personalização */
.preview-container {
  background: var(--preview-background, var(--bg-dark));
  border-radius: var(--border-radius);
  padding: 20px;
  border: 1px solid var(--border-dark);
  margin-top: 20px;
}

.preview-header {
  background: rgba(30, 30, 30, 0.7);
  padding: 15px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid var(--border-dark);
}

.preview-header h3 {
  color: var(--text-primary);
  margin: 0;
}

.preview-content {
  display: flex;
  justify-content: center;
}

.preview-product-card {
  width: 100%;
  max-width: 300px;
  background: rgba(30, 30, 30, 0.7);
  border-radius: var(--border-radius);
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--border-dark);
}

.preview-product-info {
  padding: 20px;
}

.preview-product-info h4 {
  color: var(--text-primary);
  margin-bottom: 10px;
}

.preview-product-info p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.preview-product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--preview-primary, var(--primary-color));
  margin-bottom: 20px;
}

.preview-add-to-cart {
  background: var(--preview-primary, var(--primary-color));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 15px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s;
}

.preview-add-to-cart:hover {
  background: var(--preview-secondary, var(--primary-dark));
}

.notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #27ae60;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1001;
  animation: fadeInOut 3s ease;
}

.notification.error {
  background: #e74c3c;
}

@keyframes fadeInOut {
  0% { opacity: 0; bottom: 0; }
  10% { opacity: 1; bottom: 20px; }
  90% { opacity: 1; bottom: 20px; }
  100% { opacity: 0; bottom: 0; }
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
  .admin-product-card {
    flex-direction: column;
  }
  
  .admin-product-image {
    width: 100%;
    height: 200px;
  }
  
  .admin-product-actions {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .edit-image-btn, .delete-product-btn {
    flex: 1;
    margin: 0 5px;
  }
  
  /* Ajuste para o indicador de swipe em mobile */
  .swipe-up-indicator {
    bottom: 5px;
  }
  
  .swipe-up-text {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .admin-product-actions {
    flex-direction: column;
  }
  .edit-image-btn, .delete-product-btn {
    width: 100%;
    margin: 5px 0;
  }
  
  .admin-product-image {
    height: 150px;
  }
  
  /* Esconder o indicador de swipe em telas muito pequenas */
  .swipe-up-indicator {
    display: none;
  }
}

/* Seção PIX */
.pix-section {
  margin: 24px 0;
  padding: 20px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
}

.pix-section h3 {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 1.3rem;
  text-align: center;
}

.pix-info {
  text-align: center;
}

.pix-info p {
  margin: 10px 0;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.pix-info p strong {
  color: var(--primary-color);
}

.copy-button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s;
}

.copy-button:hover {
  background: var(--primary-dark);
}

.icon-button {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--secondary-color);
  color: white;
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Botão de calcular taxa de entrega */
.calcular-taxa-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.calcular-taxa-btn:hover {
  background-color: #2980b9;
}

.calcular-taxa-btn:active {
  background-color: #21618c;
}

.calcular-taxa-btn i {
  font-size: 18px;
}

/* Estilo específico para o ícone do carrinho */
#cart-icon {
  background: rgba(39, 174, 96, 0.1); /* Fundo verde transparente */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color); /* Borda verde */
}

#cart-icon:hover {
  background: rgba(39, 174, 96, 0.2); /* Fundo verde mais claro ao passar o mouse */
  transform: scale(1.1); /* Leve aumento ao passar o mouse */
}

#cart-icon i {
  color: var(--primary-color); /* Ícone verde */
  font-size: 1.4rem;
}

#cart-icon .cart-badge {
  top: -5px;
  right: -5px;
  background: var(--secondary-color);
  color: white;
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Estilos para o modal do QR Code do WhatsApp */
.qr-code-container {
  text-align: center;
  margin: 20px 0;
  padding: 20px;
  background: #2d2d2d;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
}

.qr-code-container img {
  max-width: 100%;
  height: auto;
  border: 2px solid white;
  border-radius: 8px;
}

.qr-code-container p {
  margin: 10px 0;
  color: var(--text-primary);
}

.qr-code-container .error {
  color: var(--danger-color);
  font-weight: bold;
}

.qr-code-container ol {
  text-align: left;
  margin: 15px 0;
  padding-left: 20px;
  color: var(--text-primary);
}

.qr-code-container li {
  margin: 10px 0;
}
