/* ========== VARIÁVEIS E RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
  background: linear-gradient(145deg, #fff0f5 0%, #ffe4e9 100%);
  color: #1e1e2a;
  line-height: 1.5;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== TIPOGRAFIA ========== */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.6rem;
  color: #d6405f;
  border-left: 6px solid #ff9f1a;
  padding-left: 12px;
  margin-bottom: 1.5rem;
}

/* ========== HEADER ========== */
header {
  background-color: #EEB0BE;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  transition: opacity 0.2s;
}
.logo:hover {
  opacity: 0.9;
}

.carrinho-icon {
  background-color: rgba(255,255,255,0.2);
  color: white;
  border-radius: 40px;
  padding: 8px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}
.carrinho-icon:hover {
  background-color: rgba(255,255,255,0.3);
}
#qtdCarrinho {
  background-color: white;
  color: #5CE1E6;
  border-radius: 30px;
  padding: 2px 8px;
  font-weight: bold;
}

/* ========== MENU DE CATEGORIAS ========== */
.categorias-nav {
  background: #fff0f5;
  border-bottom: 1px solid #ffe0e7;
  padding: 10px 0;
  position: sticky;
  top: 70px;
  z-index: 99;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.categorias-nav .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.categorias-label {
  font-weight: 700;
  color: #d6405f;
  font-size: 0.9rem;
  letter-spacing: -0.3px;
}

.categorias-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.categorias-links a {
  background: white;
  padding: 6px 20px;
  border-radius: 40px;
  text-decoration: none;
  color: #d6405f;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  border: 1px solid #ffe0e7;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.categorias-links a:hover {
  background: #d6405f;
  color: white;
  border-color: #d6405f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(214,64,95,0.2);
}

/* ========== BANNER ========== */
.banner {
  background: linear-gradient(120deg, #EEB0BE, #EEB0BE);
  border-radius: 36px;
  margin: 32px 0;
  padding: 56px 32px;
  text-align: center;
  color: white;
  box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}
.banner h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: white;
  border-left: none;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.banner p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========== BARRA DE BENEFÍCIOS ========== */
.benefits-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto 0;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 60px;
  max-width: 95%;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #1e1e2a;
  transition: 0.2s;
  white-space: nowrap;
}
.benefit-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

/* ========== FILTROS ========== */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 24px;
  justify-content: center;
}
.filtro-btn {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}
.filtro-btn.ativo,
.filtro-btn:hover {
  background-color: #d6405f;
  border-color: #d6405f;
  color: white;
  box-shadow: 0 4px 10px rgba(214,64,95,0.2);
}

/* ========== GRID DE PRODUTOS ========== */
.produtos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  margin: 32px 0 64px;
}

.card-produto {
  background: white;
  border-radius: 28px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border: 1px solid #ffe0e7;
  cursor: pointer;
}
.card-produto:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px -8px #ff2e6380;
  border-color: #ff9f1a;
}
.card-produto img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f9c7d1;
}
.card-produto .info {
  padding: 20px;
}
.card-produto h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ff2e63;
  margin-bottom: 8px;
}
.preco {
  font-size: 1.5rem;
  font-weight: 800;
  color: #d6405f;
  margin: 10px 0;
}
.btn-adicionar {
  background: linear-gradient(90deg, #EEB0BE, #d6405f);
  color: white;
  border: none;
  width: 100%;
  padding: 12px;
  border-radius: 40px;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
}
.btn-adicionar:hover {
  filter: brightness(1.05);
  transform: scale(0.98);
}

/* ========== MODAL ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: white;
  max-width: 500px;
  width: 90%;
  border-radius: 28px;
  padding: 24px;
  position: relative;
  animation: fadeIn 0.2s;
  border-top: 8px solid #ff2e63;
}
.fechar-modal {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95);}
  to { opacity: 1; transform: scale(1);}
}

/* ========== CARRINHO / CHECKOUT ========== */
.carrinho-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: white;
  padding: 20px;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid #edf2f7;
}
.carrinho-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 16px;
}
.quantidade {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 40px;
}
.quantidade button {
  background: white;
  border: 1px solid #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 32px;
  font-weight: bold;
  cursor: pointer;
}
.quantidade button:hover {
  background: #d6405f;
  color: white;
}
.btn-remover {
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  text-decoration: underline;
}
.total-carrinho {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: right;
  margin: 24px 0;
  padding-top: 16px;
  border-top: 2px solid #eef2f6;
}
.btn-finalizar {
  display: inline-block;
  background: linear-gradient(90deg, #ff2e63, #ff9f1a);
  color: white;
  padding: 14px 28px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
}
.card-form {
  background: white;
  border-radius: 28px;
  padding: 32px;
  max-width: 720px;
  margin: 32px auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}
.btn-whatsapp {
  background: #25D366;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 40px;
  font-weight: 700;
  color: white;
  cursor: pointer;
}

/* ========== RODAPÉ ========== */
footer {
  background: #EEB0BE;
  color: #000000;
  border-top: 4px solid #ff2e63;
  margin-top: 60px;
  padding: 32px 0;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
hr {
  margin: 16px 0;
  border-color: rgba(0,0,0,0.1);
}
.copyright {
  text-align: center;
  font-size: 0.85rem;
}

/* ========== ADMIN (TELAS DE LOGIN, CATEGORIAS, LISTA DE PRODUTOS) ========== */
.tela-login {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #EEB0BE, #ffde59);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.login-card {
  background: white;
  border-radius: 32px;
  padding: 32px 24px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 35px rgba(0,0,0,0.15);
}
.login-card h2 {
  color: #d6405f;
  margin: 8px 0;
  font-size: 1.6rem;
}
.login-card input {
  width: 100%;
  padding: 14px;
  border-radius: 40px;
  border: 1px solid #e2e8f0;
  margin-bottom: 16px;
  text-align: center;
  font-size: 1rem;
}
.login-card button {
  background: linear-gradient(135deg, #d6405f, #b12a4a);
  width: 100%;
  padding: 12px;
  border-radius: 40px;
  color: white;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.erro-login {
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 12px;
}
.card {
  background: white;
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  border: 1px solid #edf2f7;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.form-field {
  display: flex;
  flex-direction: column;
}
.form-field label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #b05770;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.form-field input, .form-field select, .form-field textarea {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}
.full-width {
  grid-column: span 2;
}
.form-buttons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.btn-primary {
  background: linear-gradient(135deg, #d6405f, #b12a4a);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary {
  background: #e2e8f0;
  color: #4a4a5a;
  border: none;
  padding: 12px 24px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
}
.admin-produtos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.admin-produto-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #f0f2f5;
  transition: 0.2s;
}
.admin-produto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}
.admin-produto-imagem {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #f9c7d1;
}
.admin-produto-info {
  padding: 16px;
}
.admin-produto-info h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.admin-produto-preco {
  color: #d6405f;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 8px 0;
}
.admin-produto-detalhes {
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
}
.admin-produto-detalhes span {
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 20px;
}
.admin-produto-acoes {
  display: flex;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid #edf2f7;
}
.admin-produto-acoes button {
  flex: 1;
  background: #f1f5f9;
  border: none;
  padding: 8px;
  border-radius: 40px;
  font-weight: 500;
  cursor: pointer;
}
.admin-produto-acoes button:first-child {
  background: #d6405f10;
  color: #d6405f;
}
.admin-produto-acoes button:first-child:hover {
  background: #d6405f;
  color: white;
}
.admin-produto-acoes button:last-child {
  background: #fee2e2;
  color: #b91c1c;
}
.admin-produto-acoes button:last-child:hover {
  background: #b91c1c;
  color: white;
}
.categorias-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.categoria-item {
  background: #f1f5f9;
  border-radius: 40px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.categoria-item button {
  background: none;
  border: none;
  cursor: pointer;
  color: #d6405f;
  font-weight: bold;
  font-size: 1.1rem;
}
.preview-image {
  margin-top: 8px;
}
.preview-image img {
  max-width: 100px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.btn-logout {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 500;
}
.btn-logout:hover {
  background: rgba(255,255,255,0.4);
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  header .container { flex-direction: column; height: auto; padding: 12px 16px; text-align: center; }
  .categorias-nav { top: 0; position: relative; }
  .categorias-nav .container { justify-content: center; gap: 12px; }
  .categorias-links { justify-content: center; }
  .banner { padding: 32px 16px; }
  .banner h2 { font-size: 1.5rem; }
  .produtos-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .card-produto .info { padding: 12px; }
  .card-produto h3 { font-size: 0.9rem; }
  .preco { font-size: 1rem; }
  .btn-adicionar { font-size: 0.75rem; padding: 8px; }
  .benefits-bar { background: transparent; backdrop-filter: none; border: none; width: 100%; padding: 0; }
  .benefit-item { white-space: normal; text-align: center; justify-content: center; background: rgba(255,255,255,0.9); }
  .form-grid { grid-template-columns: 1fr; }
  .full-width { grid-column: span 1; }
  .form-buttons { flex-direction: column; }
  .admin-produtos-grid { grid-template-columns: 1fr; }
}
/* ========== ESTILO DA BARRA DE PESQUISA DE PRODUTOS (ADMIN) ========== */
.busca-produtos-admin {
  position: relative;
  max-width: 400px;
  margin-bottom: 1.5rem;
}

.busca-produtos-admin input {
  width: 100%;
  padding: 12px 16px 12px 44px; /* espaço à esquerda para o ícone */
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  border: 1px solid #e2e8f0;
  border-radius: 48px;
  background-color: white;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.busca-produtos-admin input:focus {
  outline: none;
  border-color: #d6405f;
  box-shadow: 0 0 0 3px rgba(214, 64, 95, 0.15);
}

/* Ícone de lupa via pseudo-elemento */
.busca-produtos-admin::before {
  content: "🔍";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s;
}

.busca-produtos-admin input:focus + ::before,
.busca-produtos-admin input:hover + ::before {
  color: #d6405f;
}
/* ========== BOTÃO ATUALIZAR (ESTOQUE ZERADO) ========== */
.btn-atualizar {
  background: linear-gradient(135deg, #e67e22, #d35400);
  border: none;
  color: white;
  padding: 6px 18px;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-atualizar:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #d35400, #b83b00);
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.btn-atualizar:active {
  transform: translateY(1px);
}
/* Ajuste responsivo */
@media (max-width: 768px) {
  .busca-produtos-admin {
    max-width: 100%;
  }

  .produto-imagem {
  width: 100%;
  aspect-ratio: 1 / 1; /* Força a proporção 1:1 */
  object-fit: cover;   /* Faz a imagem preencher o quadrado sem distorcer */
}
}

.preview-imagens img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #ffe0e7;
}

/* Lightbox */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: pointer;
}
#lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
/* Miniaturas */
.miniatura {
  transition: transform 0.2s;
}
.miniatura:hover {
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .produtos-grid { gap: 12px; }
  .card-produto img { height: 160px; }
  .categorias-links a { padding: 4px 14px; font-size: 0.75rem; }
}

/* ========== GALERIA DE IMAGENS DO PRODUTO ========== */
.produto-detalhe {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.galeria-produto {
  width: 100%;
}
.imagem-principal-wrap {
  position: relative;
  background: #fff0f5;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #ffe0e7;
}
.imagem-principal-produto {
  width: 100%;
  max-height: 440px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: white;
}
.galeria-miniaturas {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.galeria-miniatura {
  border: 2px solid transparent;
  background: white;
  border-radius: 14px;
  padding: 2px;
  cursor: pointer;
  min-width: 68px;
  height: 68px;
  overflow: hidden;
}
.galeria-miniatura.ativa {
  border-color: #d6405f;
}
.galeria-miniatura img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.galeria-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #d6405f;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.galeria-prev { left: 10px; }
.galeria-next { right: 10px; }
.btn-zoom-imagem {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: none;
  background: rgba(214,64,95,0.95);
  color: white;
  padding: 8px 14px;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 700;
}
.descricao-produto-detalhe {
  margin: 14px 0;
  color: #475569;
  white-space: pre-line;
}
#lightboxProduto {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}
#lightboxProduto img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 16px;
}
.fechar-lightbox {
  position: fixed;
  top: 18px;
  right: 24px;
  color: white;
  font-size: 42px;
  line-height: 1;
}
.preview-imagens-admin {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.preview-imagens-admin img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid #ffe0e7;
}
.btn-novo-produto {
  background: linear-gradient(135deg, #25D366, #128C7E) !important;
}
@media (min-width: 760px) {
  .produto-detalhe {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
  .modal-content {
    max-width: 920px;
  }
}

/* ========== VÍDEO DO PRODUTO ========== */
.produto-video-box {
  margin-top: 14px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}
.produto-video-box video,
.produto-video-box iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* =====================================================
   CORREÇÃO DEFINITIVA DO MODAL DO PRODUTO NO CELULAR
   Corrige imagem cortada / modal começando fora da tela
===================================================== */

.modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  padding: 12px !important;
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.modal-content {
  margin: 0 auto 24px auto !important;
  width: min(100%, 920px) !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 20px !important;
}

.produto-detalhe {
  width: 100% !important;
}

.galeria-produto,
.imagem-principal-wrap {
  width: 100% !important;
  max-width: 100% !important;
}

.imagem-principal-wrap {
  overflow: hidden !important;
}

.imagem-principal-produto {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
}

.produto-video-box iframe,
.produto-video-box video {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
}

@media (max-width: 768px) {
  .modal {
    padding: 10px 8px 28px !important;
    align-items: flex-start !important;
  }

  .modal-content {
    width: 100% !important;
    margin-top: 0 !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .produto-detalhe {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .imagem-principal-produto {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }

  .galeria-miniaturas {
    width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .galeria-miniatura {
    flex: 0 0 64px !important;
    width: 64px !important;
    min-width: 64px !important;
    height: 64px !important;
  }

  .produto-video-box {
    border-radius: 18px !important;
  }

  .produto-detalhe-info h2 {
    font-size: 1.45rem !important;
    line-height: 1.2 !important;
  }

  .descricao-produto-detalhe {
    font-size: 1rem !important;
    line-height: 1.65 !important;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 8px 6px 24px !important;
  }

  .modal-content {
    padding: 12px !important;
    border-radius: 20px !important;
  }

  .fechar-modal {
    right: 16px !important;
    top: 8px !important;
    z-index: 20 !important;
  }
}

/* ========== PDV / CAIXA ========== */
.pdv-body {
  min-height: 100vh;
}
.pdv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  padding-top: 28px;
  align-items: start;
}
.pdv-card {
  margin-bottom: 0;
}
.pdv-venda-card {
  min-width: 0;
}
.pdv-resumo-card {
  position: sticky;
  top: 92px;
}
.pdv-busca-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 90px auto;
  gap: 14px;
  align-items: end;
}
.pdv-btn-add {
  height: 46px;
  white-space: nowrap;
}
.pdv-sugestoes {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.pdv-sugestoes p {
  color: #64748b;
  background: #f8fafc;
  padding: 12px;
  border-radius: 16px;
}
.pdv-sugestao {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid #ffe0e7;
  background: #fff;
  border-radius: 18px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}
.pdv-sugestao:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}
.pdv-sugestao img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
  background: #ffe0e7;
}
.pdv-sugestao span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pdv-sugestao small,
.pdv-tabela small {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
}
.pdv-tabela-wrap {
  overflow-x: auto;
  border: 1px solid #edf2f7;
  border-radius: 20px;
  background: white;
}
.pdv-tabela {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.pdv-tabela th,
.pdv-tabela td {
  padding: 14px 12px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
  text-align: left;
}
.pdv-tabela th {
  background: #fff5f7;
  color: #b05770;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pdv-qtd-item {
  width: 76px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.pdv-remover {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-weight: 800;
}
.pdv-totais {
  background: #fff5f7;
  border-radius: 22px;
  padding: 16px;
  margin: 20px 0;
  border: 1px solid #ffe0e7;
}
.pdv-totais p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}
.pdv-total-final {
  border-top: 1px solid #ffd1dc;
  padding-top: 12px;
  font-size: 1.25rem;
  color: #d6405f;
}
.pdv-historico-card {
  grid-column: 1 / -1;
}
.pdv-historico {
  display: grid;
  gap: 10px;
}
.pdv-venda-historico {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #edf2f7;
}
.pdv-venda-historico span {
  color: #64748b;
  font-size: 0.9rem;
  text-align: right;
}
@media (max-width: 980px) {
  .pdv-layout { grid-template-columns: 1fr; }
  .pdv-resumo-card { position: static; }
  .pdv-busca-grid { grid-template-columns: 1fr 1fr; }
  .pdv-btn-add { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .pdv-busca-grid { grid-template-columns: 1fr; }
  .pdv-venda-historico { flex-direction: column; align-items: flex-start; }
  .pdv-venda-historico span { text-align: left; }
}

/* ========== PDV: LEITOR DE CÓDIGO PELA CÂMERA ========== */
.pdv-btn-scan {
  height: 46px;
  white-space: nowrap;
  background: #111827 !important;
  color: #fff !important;
}
.pdv-scanner-box {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #ffe0e7;
  border-radius: 22px;
  background: #fff5f7;
}
.pdv-scanner-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #b05770;
}
.pdv-fechar-scanner {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}
.pdv-scanner-reader {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}
.pdv-scanner-reader video,
.pdv-scanner-reader canvas {
  border-radius: 18px !important;
}
.pdv-scanner-status {
  margin: 10px 0 4px;
  color: #475569;
  font-weight: 600;
}
.pdv-scanner-box small {
  display: block;
  color: #64748b;
  line-height: 1.4;
}

@media (min-width: 981px) {
  .pdv-busca-grid {
    grid-template-columns: 1.05fr 1.15fr 86px auto auto;
  }
}
@media (max-width: 980px) {
  .pdv-btn-scan { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .pdv-layout { padding-top: 14px; gap: 16px; }
  .pdv-card { padding: 16px !important; border-radius: 22px !important; }
  .pdv-btn-add,
  .pdv-btn-scan,
  #pdvFinalizarVenda,
  #pdvLimparVenda {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }
  .pdv-scanner-box { padding: 10px; border-radius: 18px; }
  .pdv-scanner-topo { flex-direction: column; align-items: stretch; }
  .pdv-fechar-scanner { width: 100%; }
  .pdv-scanner-reader { max-width: 100%; }
  .pdv-tabela { min-width: 640px; }
}


/* ========== ADMIN ERP / RELATÓRIOS AVANÇADOS ========== */
.admin-top-menu {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}
.admin-menu-btn,
.admin-menu-link {
  border: 0;
  background: rgba(255,255,255,0.22);
  color: white;
  padding: 9px 15px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}
.admin-menu-btn.ativo,
.admin-menu-btn:hover,
.admin-menu-link:hover {
  background: white;
  color: #d6405f;
}
.admin-aba { display: none; }
.admin-aba.ativa { display: block; }
.admin-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.relatorios-filtros {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 16px 0 22px;
}
.dash-card {
  background: linear-gradient(135deg, #fff, #fff5f8);
  border: 1px solid #ffe0e7;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(214,64,95,0.08);
}
.dash-card span { display:block; color:#64748b; font-size:.82rem; font-weight:700; margin-bottom:8px; }
.dash-card strong { display:block; color:#d6405f; font-size:1.25rem; line-height:1.15; }
.relatorios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.relatorio-box {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.relatorio-box h3 { color:#d6405f; margin-bottom:12px; font-size:1rem; }
.relatorio-lista { display:flex; flex-direction:column; gap:8px; }
.relatorio-lista > div,
.venda-detalhada {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  background:#f8fafc;
  border-radius:14px;
  padding:10px 12px;
  font-size:.9rem;
}
.venda-detalhada { flex-wrap: wrap; }
.venda-detalhada span { color:#64748b; }
.insights-admin { padding-left: 20px; color:#334155; }
.insights-admin li { margin-bottom: 8px; }
.grafico-barras-admin { display:flex; flex-direction:column; gap:10px; }
.grafico-barra-linha { display:grid; grid-template-columns: 80px 1fr auto; gap:8px; align-items:center; font-size:.82rem; }
.grafico-barra-linha > div { background:#f1f5f9; border-radius:999px; height:10px; overflow:hidden; }
.grafico-barra-linha i { display:block; height:100%; background:linear-gradient(90deg,#EEB0BE,#d6405f); border-radius:999px; }

/* ========== COMPROVANTE 80MM / ELGIN I9 ========== */
.comprovante-modal-content { max-width: 460px; }
.comprovante-acoes { display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; }
.cupom-80mm {
  width: 80mm;
  max-width: 100%;
  margin: 0 auto;
  background: white;
  color: #111;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.35;
  padding: 8px;
}
.cupom-centro { text-align:center; display:flex; flex-direction:column; align-items:center; gap:2px; }
.cupom-logo { font-size: 18px; }
.cupom-itens { width:100%; border-collapse: collapse; margin: 8px 0; }
.cupom-itens th, .cupom-itens td { border-bottom: 1px dashed #999; padding: 4px 2px; text-align:left; vertical-align:top; }
.cupom-itens th:nth-child(n+2), .cupom-itens td:nth-child(n+2) { text-align:right; }
.cupom-linha { display:flex; justify-content:space-between; gap:8px; margin:3px 0; }
.cupom-total { font-size: 14px; }
.cupom-qrcode { width: 130px; height: 130px; margin: 6px auto; }

@media print {
  body * { visibility: hidden !important; }
  #areaComprovantePdv, #areaComprovantePdv * { visibility: visible !important; }
  #areaComprovantePdv { position: absolute; left: 0; top: 0; width: 80mm; }
  .cupom-80mm { width: 80mm; padding: 0; box-shadow: none; }
  @page { size: 80mm auto; margin: 3mm; }
}

@media (max-width: 768px) {
  .admin-top-menu { overflow-x:auto; justify-content:flex-start; flex-wrap:nowrap; padding-bottom:8px; }
  .admin-menu-btn, .admin-menu-link { flex:0 0 auto; }
  .relatorios-filtros { grid-template-columns: 1fr; }
  .grafico-barra-linha { grid-template-columns: 1fr; }
  .relatorio-lista > div, .venda-detalhada { align-items:flex-start; flex-direction:column; }
}



/* ========== ADMIN VISUAL PREMIUM - TOPO E ORGANIZAÇÃO ========== */
body {
  background: radial-gradient(circle at top, #fff7fa 0%, #ffeaf1 42%, #fff5f8 100%) !important;
  min-height: 100vh;
}
#conteudoAdmin > header.admin-pro-header {
  background: linear-gradient(135deg, #9f1239 0%, #d6405f 45%, #f4729a 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 16px 38px rgba(159,18,57,.26) !important;
  position: sticky;
  top: 0;
  z-index: 500;
}
.admin-header-inner {
  width: min(1680px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 0 12px;
}
.admin-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  min-width: 260px;
}
.admin-brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  font-size: 1.35rem;
}
.admin-brand h1 {
  color: #fff !important;
  font-size: clamp(1.25rem, 1.6vw, 1.75rem) !important;
  line-height: 1.08;
  margin: 0 !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.18);
  letter-spacing: -.03em;
}
.admin-brand small {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.86);
  font-weight: 600;
  font-size: .82rem;
}
.admin-quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-action-pill,
.admin-pro-header .btn-logout.admin-action-pill {
  appearance: none;
  border: 1px solid rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 15px !important;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
  transition: .18s ease;
}
.admin-action-pill:hover,
.admin-pro-header .btn-logout.admin-action-pill:hover {
  background: #fff !important;
  color: #b91c4c !important;
  transform: translateY(-1px);
}
.admin-action-pdv {
  background: #fff !important;
  color: #b91c4c !important;
  border-color: #fff !important;
}
.admin-top-menu {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 10px !important;
  margin: 0 !important;
  padding: 10px !important;
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 22px rgba(0,0,0,.08);
}
.admin-menu-btn,
.admin-menu-link {
  min-height: 46px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.24) !important;
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
  font-weight: 900 !important;
  font-size: .88rem;
  letter-spacing: -.01em;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: none !important;
  transition: .18s ease;
}
.admin-menu-btn span,
.admin-menu-link span { font-size: 1rem; }
.admin-menu-btn.ativo,
.admin-menu-btn:hover,
.admin-menu-link:hover {
  background: #fff !important;
  color: #be123c !important;
  border-color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,.12) !important;
}
#conteudoAdmin > main.container {
  max-width: 1680px !important;
  padding: 28px 20px 60px !important;
}
.card {
  border: 1px solid rgba(244,114,154,.26) !important;
  box-shadow: 0 18px 45px rgba(190,18,60,.08) !important;
}
.admin-subtitle {
  color: #64748b;
  margin-top: -12px;
  margin-bottom: 0;
  font-size: .92rem;
}
.produtos-section-head h2 { margin-bottom: 14px !important; }
.produtos-section-head {
  margin-bottom: 18px;
  align-items: flex-start !important;
}
.produtos-section-head .btn-novo-produto {
  min-width: 180px;
  min-height: 46px;
  box-shadow: 0 10px 22px rgba(37,211,102,.20);
}
.busca-produtos-pro {
  background: #fff7fa;
  border: 1px solid #ffe0e7;
  border-radius: 22px;
  padding: 12px;
  margin-bottom: 22px !important;
}
.busca-produtos-pro input {
  min-height: 46px;
  background: white;
  box-shadow: 0 4px 14px rgba(15,23,42,.04);
}
.admin-produtos-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch;
}
.admin-produto-card {
  min-width: 0;
  height: 100%;
  border-radius: 22px !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.admin-produto-imagem {
  height: 150px !important;
}
.admin-produto-acoes {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px !important;
}
.relatorios-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}
.dashboard-cards {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
}
@media (max-width: 1180px) {
  .admin-top-menu {
    display: flex !important;
    overflow-x: auto;
    justify-content: flex-start !important;
    scrollbar-width: thin;
  }
  .admin-menu-btn,
  .admin-menu-link { flex: 0 0 auto; }
}
@media (max-width: 760px) {
  .admin-header-inner { width: calc(100% - 24px); padding: 12px 0; }
  .admin-brand-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .admin-brand { min-width: 0; }
  .admin-quick-actions { justify-content: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .admin-action-pill { text-align: center; }
  .admin-action-pdv { grid-column: 1 / -1; }
  .admin-top-menu { padding: 8px !important; border-radius: 20px; }
  .admin-menu-btn, .admin-menu-link { min-height: 44px; padding: 9px 12px !important; }
  #conteudoAdmin > main.container { padding: 18px 12px 44px !important; }
  .produtos-section-head { flex-direction: column; }
  .produtos-section-head .btn-novo-produto { width: 100%; }
  .admin-produtos-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; gap: 12px !important; }
  .admin-produto-imagem { height: 125px !important; }
  .admin-produto-info { padding: 12px !important; }
  .admin-produto-acoes { grid-template-columns: 1fr !important; }
}

/* ========== MELHORIAS: FUNCIONÁRIOS, TROCAS E CANCELAMENTO PDV ========== */
#btnAbrirFuncionarios {
  border: none;
  cursor: pointer;
  font-family: inherit;
}
#modalFuncionarios .modal-content h3 {
  color: #d6405f;
  font-size: 1.35rem;
  margin-bottom: 8px;
}
#listaFuncionariosAdmin div,
#historicoTrocas div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: #fff7fa;
  border: 1px solid #ffe0e7;
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
#listaFuncionariosAdmin strong,
#historicoTrocas strong {
  color: #d6405f;
  text-align: right;
}
.campo-troca-novo small,
#trocaCodigo + small {
  color: #64748b;
  font-size: .74rem;
  margin-top: 5px;
}
.btn-cancelar-venda {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #fed7aa !important;
  font-weight: 800;
}
.btn-cancelar-venda:hover {
  background: #ffedd5 !important;
}
@media (max-width: 768px) {
  #listaFuncionariosAdmin div,
  #historicoTrocas div {
    flex-direction: column;
  }
  #listaFuncionariosAdmin strong,
  #historicoTrocas strong {
    text-align: left;
  }
}

/* ========== PRODUTOS POR CATEGORIA NO ADMIN ========== */
#listaProdutosAdmin.admin-produtos-grid {
  display: block !important;
}
.admin-categorias-produtos {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.admin-categoria-bloco {
  background: linear-gradient(180deg, #ffffff 0%, #fff8fb 100%);
  border: 1px solid #ffe0e7;
  border-radius: 26px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}
.admin-categoria-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ffe0e7;
}
.admin-categoria-head h3 {
  color: #b12a4a;
  font-size: 1.1rem;
  margin: 0 0 4px;
}
.admin-categoria-head p {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0;
}
.admin-categoria-head p[data-filtro-ativo]::after {
  content: ' • ' attr(data-filtro-ativo);
  color: #d6405f;
  font-weight: 700;
}
.admin-categoria-total {
  background: #d6405f;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(214,64,95,.18);
}
.admin-produto-desc {
  color: #64748b;
  font-size: 0.83rem;
  margin-top: 8px;
  min-height: 22px;
}
.admin-empty-state {
  background: #fff7fa;
  border: 1px dashed #ffb6c8;
  border-radius: 20px;
  padding: 22px;
  color: #b12a4a;
  text-align: center;
  font-weight: 700;
}
@media (max-width: 760px) {
  .admin-categoria-bloco { padding: 12px; border-radius: 22px; }
  .admin-categoria-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-categoria-total { width: 100%; text-align: center; }
}

/* ========== CARRINHO E CHECKOUT PREMIUM ========== */
.link-header {
  color: white;
  text-decoration: none;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
}
.header-actions-loja { display: flex; gap: 10px; align-items: center; }
.loja-checkout-container { padding-top: 28px; }
.loja-page-title {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1px solid #ffe0e7;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 12px 28px rgba(214,64,95,0.08);
  margin-bottom: 22px;
}
.loja-page-title > span { font-size: 2.2rem; }
.loja-page-title h1 { margin: 0; color: #d6405f; font-size: 1.8rem; }
.loja-page-title p { margin: 4px 0 0; color: #64748b; }
.carrinho-layout-premium, .checkout-layout-premium {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}
.carrinho-lista-card, .resumo-compra-card, .checkout-form-premium, .checkout-resumo-premium {
  background: white;
  border: 1px solid #ffe0e7;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 12px 28px rgba(214,64,95,0.08);
}
.carrinho-lista-topo {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.carrinho-lista-topo h2, .resumo-compra-card h2, .checkout-bloco h2, .checkout-resumo-premium h2 {
  border-left: 0;
  padding-left: 0;
  margin-bottom: 0;
  color: #b12a4a;
  font-size: 1.2rem;
}
.carrinho-lista-topo a, .btn-continuar-comprando {
  color: #d6405f;
  text-decoration: none;
  font-weight: 700;
}
.carrinho-item-premium {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 130px 110px 80px;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  border-radius: 22px;
  border: 1px solid #f4d9df;
  padding: 14px;
}
.carrinho-produto-info { display: flex; flex-direction: column; gap: 4px; }
.carrinho-produto-info strong { color: #1e1e2a; }
.carrinho-produto-info span { color: #d6405f; font-weight: 800; }
.carrinho-produto-info small { color: #64748b; }
.alerta-carrinho { color: #b91c1c !important; font-weight: 800; }
.quantidade-premium { justify-content: center; width: fit-content; }
.carrinho-subtotal-item { font-weight: 900; color: #1e1e2a; text-align: right; }
.btn-remover-premium {
  background: #fee2e2;
  color: #b91c1c;
  border: 0;
  border-radius: 999px;
  padding: 9px 10px;
  font-weight: 800;
  text-decoration: none;
}
.resumo-compra-card, .checkout-resumo-premium {
  position: sticky;
  top: 92px;
}
.resumo-linha, .resumo-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}
.resumo-total {
  border-bottom: 0;
  margin-top: 8px;
  font-size: 1.25rem;
  color: #1e1e2a;
}
.resumo-total strong { color: #d6405f; font-size: 1.6rem; }
.btn-finalizar-full { display: block; width: 100%; margin-top: 16px; text-align: center; }
.btn-continuar-comprando { display: block; text-align: center; margin-top: 14px; }
.carrinho-vazio-premium { text-align: center; padding: 46px 20px; }
.carrinho-vazio-premium div { font-size: 3rem; }
.carrinho-vazio-premium h3 { color: #d6405f; margin: 10px 0; }
.carrinho-vazio-premium p { color: #64748b; margin-bottom: 18px; }
.checkout-layout-premium { grid-template-columns: minmax(0, 1fr) 420px; }
.checkout-form-premium { display: flex; flex-direction: column; gap: 18px; }
.checkout-bloco {
  border: 1px solid #f6d7df;
  border-radius: 22px;
  padding: 18px;
  background: #fffafa;
}
.checkout-bloco h2 { margin-bottom: 16px; }
.checkout-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.btn-checkout-finalizar { font-size: 1rem; min-height: 52px; }
.btn-checkout-finalizar:disabled { opacity: .55; cursor: not-allowed; }
.checkout-resumo-itens { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.checkout-resumo-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff5f7;
}
.checkout-resumo-item img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.checkout-resumo-item strong { display: block; color: #1e1e2a; font-size: .92rem; }
.checkout-resumo-item small { color: #64748b; }
.checkout-resumo-item span { color: #d6405f; font-weight: 900; }
.checkout-selo-seguranca {
  background: #ecfdf5;
  color: #047857;
  padding: 10px 12px;
  border-radius: 16px;
  font-weight: 800;
  font-size: .85rem;
  margin-top: 14px;
}
.checkout-pix-modal { max-width: 430px; text-align: center; background: white; border-radius: 28px; padding: 24px; }
.checkout-pix-modal h3 { color: #d6405f; margin-top: 10px; }
.checkout-pix-modal img { width: 100%; max-width: 220px; margin: 15px auto; display: block; border-radius: 18px; }
.pix-total-modal { font-size: 1.7rem; color: #d6405f; font-weight: 900; margin: 12px 0; }
.btn-pix-copy, .btn-pix-confirm {
  width: 100%;
  border: 0;
  padding: 12px 18px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  margin-top: 10px;
  cursor: pointer;
}
.btn-pix-copy { background: #25D366; }
.btn-pix-confirm { background: linear-gradient(135deg, #d6405f, #b12a4a); }
.pedido-sucesso-modal { text-align: center; max-width: 380px; }
.pedido-sucesso-modal h3 { color: #16a34a; }

@media (max-width: 980px) {
  .carrinho-layout-premium, .checkout-layout-premium { grid-template-columns: 1fr; }
  .resumo-compra-card, .checkout-resumo-premium { position: static; }
  .carrinho-item-premium { grid-template-columns: 72px minmax(0, 1fr); }
  .quantidade-premium, .carrinho-subtotal-item, .btn-remover-premium { grid-column: 2; justify-self: start; }
  .carrinho-subtotal-item { text-align: left; }
}
@media (max-width: 640px) {
  .loja-page-title { align-items: flex-start; padding: 18px; }
  .loja-page-title h1 { font-size: 1.45rem; }
  .carrinho-lista-card, .resumo-compra-card, .checkout-form-premium, .checkout-resumo-premium { padding: 16px; border-radius: 22px; }
  .carrinho-lista-topo { flex-direction: column; align-items: flex-start; }
  .checkout-grid-2 { grid-template-columns: 1fr; }
  .checkout-resumo-item { grid-template-columns: 48px minmax(0, 1fr); }
  .checkout-resumo-item span { grid-column: 2; }
  .link-header { width: 100%; text-align: center; }
  .header-actions-loja { width: 100%; }
}


/* ========== OPERAÇÃO AVANÇADA / PDV SEGURO / MODO ESCURO ========== */
.pdv-painel-cliente {
  background: linear-gradient(145deg, #fff, #fff7fa);
  border: 1px solid #ffe0e7;
}
.pdv-cliente-neutro {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffe4ec, #fff8fb);
  color: #4a1f2c;
  text-align: center;
}
.pdv-cliente-neutro strong { font-size: 1.1rem; color: #d6405f; }
.pdv-cliente-neutro span { font-weight: 700; }
.pdv-cliente-neutro small { color: #7f5362; }
.pdv-atalhos-neutros {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}
.pdv-atalhos-neutros a {
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #ffe0e7;
  color: #d6405f;
  text-decoration: none;
  font-weight: 700;
}
.caixa-status {
  padding: 18px;
  border-radius: 22px;
  margin-bottom: 18px;
  display: grid;
  gap: 6px;
}
.caixa-status.aberto { background: #ecfdf5; border: 1px solid #bbf7d0; color: #14532d; }
.caixa-status.fechado { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.caixa-status strong { font-size: 1.1rem; }
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.relatorio-box input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  margin: 8px 0 10px;
}
body.modo-escuro {
  background: linear-gradient(145deg, #10131b 0%, #1a1020 100%);
  color: #f8fafc;
}
body.modo-escuro .card,
body.modo-escuro .relatorio-box,
body.modo-escuro .admin-produto-card,
body.modo-escuro .card-form,
body.modo-escuro .modal-content {
  background: #171923 !important;
  color: #f8fafc;
  border-color: #2d3344 !important;
}
body.modo-escuro input,
body.modo-escuro textarea,
body.modo-escuro select {
  background: #0f1320;
  color: #f8fafc;
  border-color: #354055;
}
body.modo-escuro h2,
body.modo-escuro h3,
body.modo-escuro .admin-subtitle { color: #fce7f3; }
body.modo-escuro .relatorio-lista div,
body.modo-escuro .venda-detalhada,
body.modo-escuro .categoria-item {
  background: #0f1320;
  border-color: #354055;
  color: #f8fafc;
}
body.modo-escuro .admin-menu-btn,
body.modo-escuro .admin-menu-link,
body.modo-escuro .admin-action-pill {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
@media (max-width: 768px) {
  .backup-actions { flex-direction: column; }
  .backup-actions button { width: 100%; }
  .pdv-atalhos-neutros { flex-direction: column; }
  .pdv-atalhos-neutros a, .pdv-atalhos-neutros button { width: 100%; text-align: center; }
}


/* ========== PDV DARK PREMIUM - CAIXA LIVRE ========== */
body.pdv-body {
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 46, 99, 0.26), transparent 30%),
    radial-gradient(circle at 85% 8%, rgba(92, 225, 230, 0.14), transparent 34%),
    linear-gradient(145deg, #090914 0%, #121222 52%, #1a1020 100%) !important;
  color: #f8fafc;
}
.pdv-body header {
  background: rgba(12, 12, 24, 0.88) !important;
  border-bottom: 1px solid rgba(255, 46, 99, 0.26) !important;
  box-shadow: 0 18px 45px rgba(0,0,0,0.28) !important;
  backdrop-filter: blur(14px);
}
.pdv-body header .container {
  min-height: 78px;
}
.pdv-body .logo {
  color: #ffffff !important;
  text-shadow: 0 0 18px rgba(255, 46, 99, 0.38);
}
.pdv-body header a:not(.logo),
.pdv-body header button {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}
.pdv-body header #btnNovaVendaPdv {
  background: linear-gradient(135deg, #ff2e63, #d6405f) !important;
  border: none !important;
}
.pdv-body .container.pdv-layout {
  max-width: 1480px;
}
.pdv-body .card,
.pdv-body .pdv-card,
.pdv-body .card-form {
  background: rgba(20, 20, 34, 0.92) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: #f8fafc !important;
  box-shadow: 0 20px 55px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(12px);
}
.pdv-body h2 {
  color: #ffffff !important;
  border-left-color: #ff2e63 !important;
  text-shadow: 0 0 18px rgba(255, 46, 99, 0.25);
}
.pdv-body .form-field label {
  color: #ffb6c8 !important;
}
.pdv-body input,
.pdv-body select,
.pdv-body textarea {
  background: rgba(8, 8, 18, 0.88) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.pdv-body input::placeholder { color: rgba(248,250,252,0.46) !important; }
.pdv-body .btn-primary,
.pdv-body .btn-whatsapp,
.pdv-body .pdv-btn-add {
  background: linear-gradient(135deg, #ff2e63, #b91448) !important;
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(255,46,99,0.23) !important;
}
.pdv-body .btn-secondary,
.pdv-body .pdv-btn-scan {
  background: rgba(255,255,255,0.08) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,0.13) !important;
}
.pdv-body .pdv-tabela-wrap {
  background: rgba(10,10,20,0.72) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}
.pdv-body .pdv-tabela th {
  background: rgba(255,46,99,0.14) !important;
  color: #ffc1d0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.10) !important;
}
.pdv-body .pdv-tabela td {
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  color: #f8fafc !important;
}
.pdv-body .pdv-tabela small,
.pdv-body .pdv-sugestao small { color: #a8b3c7 !important; }
.pdv-body .pdv-sugestao,
.pdv-body .pdv-sugestoes p {
  background: rgba(10,10,20,0.82) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: #f8fafc !important;
}
.pdv-body .pdv-sugestao:hover {
  box-shadow: 0 16px 32px rgba(255,46,99,0.18) !important;
  border-color: rgba(255,46,99,0.46) !important;
}
.pdv-body .pdv-totais {
  background: linear-gradient(145deg, rgba(255,46,99,0.13), rgba(255,255,255,0.04)) !important;
  border: 1px solid rgba(255,46,99,0.22) !important;
}
.pdv-body .pdv-totais p { color: #e5e7eb !important; }
.pdv-body .pdv-total-final {
  color: #ffffff !important;
  border-top: 1px solid rgba(255,46,99,0.35) !important;
}
.pdv-body #pdvTotal {
  color: #7CFF9B !important;
  text-shadow: 0 0 18px rgba(124,255,155,0.22);
}
.pdv-body .pdv-painel-cliente {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,46,99,0.25), transparent 40%),
    rgba(16,16,30,0.94) !important;
  border: 1px solid rgba(255,46,99,0.26) !important;
  grid-column: 1 / -1;
}
.pdv-body .pdv-historico { display: block !important; }
.pdv-body .pdv-cliente-neutro,
.pdv-body .pdv-caixa-livre-box {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 145px;
  padding: 28px 18px !important;
  border-radius: 28px !important;
  background:
    linear-gradient(135deg, rgba(255,46,99,0.21), rgba(255,255,255,0.04)),
    rgba(8,8,18,0.78) !important;
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff !important;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 48px rgba(0,0,0,0.20);
}
.pdv-body .pdv-cliente-neutro strong {
  color: #fff !important;
  font-size: clamp(1.4rem, 3vw, 2.15rem) !important;
  letter-spacing: -0.04em;
  text-shadow: 0 0 20px rgba(255,46,99,0.35);
}
.pdv-body .pdv-status-caixa-livre {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(34,197,94,0.16);
  border: 1px solid rgba(34,197,94,0.42);
  color: #86efac !important;
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
  font-weight: 900 !important;
  letter-spacing: 0.06em;
  box-shadow: 0 0 28px rgba(34,197,94,0.16);
}
.pdv-body .pdv-atalhos-neutros { display: none !important; }
.pdv-body .pdv-scanner-box {
  background: rgba(10,10,20,0.92) !important;
  border-color: rgba(255,46,99,0.25) !important;
  color: #f8fafc !important;
}
@media (max-width: 980px) {
  .pdv-body .pdv-resumo-card { position: static !important; }
  .pdv-body header .container { gap: 14px; }
}
@media (max-width: 620px) {
  .pdv-body header a:not(.logo), .pdv-body header button { width: 100%; text-align: center; }
  .pdv-body .pdv-cliente-neutro, .pdv-body .pdv-caixa-livre-box { min-height: 120px; }
}


/* ========== AJUSTES FINOS PDV DARK PREMIUM ========== */
.pdv-body #pdvLogin {
  background:
    radial-gradient(circle at 18% 5%, rgba(255,46,99,0.32), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(92,225,230,0.18), transparent 30%),
    linear-gradient(145deg, #080812 0%, #111124 52%, #1b1022 100%) !important;
}
.pdv-body #pdvLogin .login-card {
  background: rgba(18,18,32,0.94) !important;
  border: 1px solid rgba(255,46,99,0.28) !important;
  box-shadow: 0 28px 70px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.06) !important;
  backdrop-filter: blur(16px);
  color: #f8fafc !important;
}
.pdv-body #pdvLogin .login-card h2 {
  color: #ffffff !important;
  font-size: clamp(1.8rem, 4vw, 2.35rem) !important;
  letter-spacing: -0.05em;
  text-shadow: 0 0 22px rgba(255,46,99,0.52), 0 2px 16px rgba(0,0,0,0.35);
  margin-top: 10px !important;
  margin-bottom: 6px !important;
}
.pdv-body #pdvLogin .login-card p {
  color: #ffb6c8 !important;
  font-weight: 700;
}
.pdv-body #pdvLogin .login-card input {
  background: rgba(8,8,18,0.9) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
}
.pdv-body #pdvLogin .login-card button {
  background: linear-gradient(135deg, #ff2e63, #b91448) !important;
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(255,46,99,0.28) !important;
}
.pdv-body #pdvLogin .login-card a {
  color: #ffc1d0 !important;
  font-weight: 700;
}
.pdv-body .pdv-status-caixa-ocupado {
  background: rgba(251,146,60,0.17) !important;
  border-color: rgba(251,146,60,0.48) !important;
  color: #fdba74 !important;
  box-shadow: 0 0 30px rgba(251,146,60,0.18) !important;
}
.pdv-body .pdv-caixa-ocupado-box {
  background:
    linear-gradient(135deg, rgba(251,146,60,0.17), rgba(255,255,255,0.04)),
    rgba(8,8,18,0.78) !important;
}
.pdv-body .comprovante-acoes .btn-primary,
.pdv-body .comprovante-acoes .btn-fechar-comprovante-premium {
  min-height: 44px;
  border-radius: 999px !important;
  padding: 12px 22px !important;
  font-weight: 900 !important;
}


/* Imagem do produto na comanda do PDV */
.pdv-produto-comanda {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}
.pdv-produto-comanda img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  flex: 0 0 auto;
}
.pdv-produto-comanda span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pdv-produto-comanda strong {
  line-height: 1.2;
}
@media (max-width: 768px) {
  .pdv-produto-comanda { min-width: 220px; }
  .pdv-produto-comanda img { width: 48px; height: 48px; border-radius: 12px; }
}


/* Firebase Auth */
.admin-user-email {
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .82rem;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.login-card input[type="email"] {
  width: 100%;
  padding: 14px;
  border-radius: 40px;
  border: 1px solid #e2e8f0;
  margin-bottom: 12px;
  text-align: center;
  font-size: 1rem;
}
