:root {
  --primary: #1a5d4a;
  --primary-light: #2d7a63;
  --primary-dark: #0f3d2b;
  --accent: #c9a961;
  --accent-light: #ddbf7a;
  --bg: #0a0f0d;
  --panel: #152018;
  --panel-light: #1f2e22;
  --text: #ffffff;
  --text-muted: #b8c5bc;
  --border: #2d4a35;
  --glass: rgba(26, 93, 74, 0.15);
  --shadow: rgba(0, 0, 0, 0.3);
  --heart-red: #ff4757;
  --admin-blue: #3498db;
  --admin-red: #e74c3c;
  --admin-green: #2ecc71;
  --admin-orange: #f39c12;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(273deg, var(--bg) 0%, #0f1612 100%);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 15, 13, 0.85) 0%, rgba(15, 22, 18, 0.85) 100%);
  z-index: 0;
  pointer-events: none;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 15, 13, 0.95);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px var(--shadow);
}

/* HEADER LAYOUT REORGANIZADO */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px 10px;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 10;
}

/* LINHA SUPERIOR: Logo centralizado, Bandeiras à direita */
.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  position: relative;
  min-height: 80px;
}

.center-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  width: 70px;
  height: 70px;
  background-image: url('./img/logo.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(201, 169, 97, 0.3);
  transition: transform 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.logo:hover {
  transform: scale(1.05);
}

.logo:active {
  transform: scale(0.95);
}

/* BANDEIRAS À DIREITA */
.right-flags {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.flag-btn {
  background: rgba(26, 93, 74, 0.2);
  border: 1px solid rgba(26, 93, 74, 0.4);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  width: 40px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.7;
  backdrop-filter: blur(8px);
}

.flag-btn:hover {
  opacity: 1;
  background: rgba(26, 93, 74, 0.3);
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.2);
}

.flag-btn.active {
  background: rgba(201, 169, 97, 0.25);
  border-color: var(--accent);
  opacity: 1;
  box-shadow: 0 0 8px rgba(201, 169, 97, 0.4);
}

/* CARROSSEL DE FILTROS */
.filters-carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(21, 32, 24, 0.3);
}

.filters-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filters-carousel::-webkit-scrollbar {
  display: none;
}

/* FILTROS NO CARROSSEL */
.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(26, 93, 74, 0.2);
  border: 1px solid rgba(26, 93, 74, 0.4);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  opacity: 0.8;
  font-size: 12px;
  line-height: 1;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-badge:hover {
  opacity: 1;
  background: rgba(26, 93, 74, 0.4);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filter-badge.active {
  opacity: 1;
  background: rgba(201, 169, 97, 0.3);
  border-color: var(--accent);
  color: var(--accent-light);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(201, 169, 97, 0.4);
  transform: scale(1.05);
}

.filter-icon {
  font-size: 14px;
  line-height: 1;
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* FAVORITOS ESPECIAL */
.filter-badge[data-tag="favorites"] {
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.3);
}

.filter-badge[data-tag="favorites"] .filter-icon {
  color: #ff4757;
}

.filter-badge[data-tag="favorites"].active {
  background: rgba(255, 71, 87, 0.25);
  border-color: #ff4757;
  color: #ff4757;
  box-shadow: 0 0 12px rgba(255, 71, 87, 0.4);
}

/* PROMOÇÕES ESPECIAL */
.filter-badge[data-tag="promocao"] {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.3);
}

.filter-badge[data-tag="promocao"] .filter-icon {
  color: #FF6B6B;
}

.filter-badge[data-tag="promocao"].active {
  background: rgba(255, 107, 107, 0.25);
  border-color: #FF6B6B;
  color: #FF6B6B;
}

/* NOVIDADES ESPECIAL */
.filter-badge[data-tag="new"] {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
}

.filter-badge[data-tag="new"] .filter-icon {
  color: #00D4FF;
}

.filter-badge[data-tag="new"].active {
  background: rgba(0, 212, 255, 0.25);
  border-color: #00D4FF;
  color: #00D4FF;
}

/* TOP 10 ESPECIAL */
.filter-badge[data-tag="top10"] {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
}

.filter-badge[data-tag="top10"] .filter-icon {
  color: #FFD700;
}

.filter-badge[data-tag="top10"].active {
  background: rgba(255, 215, 0, 0.25);
  border-color: #FFD700;
  color: #FFD700;
}

/* CHEF ESPECIAL */
.filter-badge[data-tag="chef"] {
  background: rgba(155, 89, 182, 0.1);
  border-color: rgba(155, 89, 182, 0.3);
}

.filter-badge[data-tag="chef"] .filter-icon {
  color: #9B59B6;
}

.filter-badge[data-tag="chef"].active {
  background: rgba(155, 89, 182, 0.25);
  border-color: #9B59B6;
  color: #9B59B6;
}

.container {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5px;
}

/* Carrossel de Categorias */
.categories-section {
  margin: 10px 0 0;
}

.categories-carousel {
  display: flex;
  overflow-x: auto;
  gap: 5px;
  padding: 3px 10px 10px 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.category-card {
  flex: 0 0 auto;
  width: 80px;
  height: 50px;
  background: linear-gradient(135deg, rgba(21, 32, 24, 0.80) 0%, rgba(31, 46, 34, 0.75) 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
}

.category-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(201, 169, 97, 0.2);
  transform: translateY(-2px);
}

.category-card.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(201, 169, 97, 0.3);
}

.category-name {
  font-weight: 600;
  font-size: 9px;
  text-align: center;
  color: var(--text);
  line-height: 1.1;
  padding: 0 4px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 30px;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: linear-gradient(135deg, rgba(21, 32, 24, 0.85) 0%, rgba(31, 46, 34, 0.80) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  transition: all 0.3s ease;
  backdrop-filter: blur(15px);
  cursor: pointer;
  z-index: 10;
  position: relative;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.thumb {
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
  border-radius: 15px;
  border: 2px solid #6fd1a5;
  background-color: rgba(21, 32, 24, 0.9);
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  overflow: hidden;
}

.title {
  font-weight: 800;
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--text);
  position: relative;
}

.favorite-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 4px;
  color: rgba(255, 255, 255, 0.3);
  z-index: 20;
}

.favorite-btn:hover {
  transform: scale(1.2);
  color: rgba(255, 71, 87, 0.8);
}

.favorite-btn.favorited {
  color: var(--heart-red);
  filter: drop-shadow(0 0 4px rgba(255, 71, 87, 0.6));
}

.favorite-btn::before {
  content: '♡';
}

.favorite-btn.favorited::before {
  content: '♥';
}

.desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.desc.has-more::after {
  content: '...(+)';
  position: absolute;
  bottom: 0;
  right: 0;
  background: linear-gradient(to right, transparent, rgba(31, 46, 34, 0.80) 20%);
  padding-left: 20px;
  color: var(--accent);
  font-weight: 600;
}

.price {
  margin-left: auto;
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
}

@media (min-width: 768px) and (max-width: 1024px) {
  .card {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .card > div:nth-of-type(2) {
    width: 100%;
  }

  .thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 18px;
    background-position: center 65%;
  }

  .price {
    margin-left: 0;
    align-self: flex-end;
    margin-top: 12px;
  }
}

details {
  background: linear-gradient(135deg, rgba(21, 32, 24, 0.80) 0%, rgba(31, 46, 34, 0.75) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(15px);
  z-index: 10;
  position: relative;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 25px;
  display: flex;
  gap: 15px;
  align-items: center;
  transition: all 0.3s ease;
}

summary::-webkit-details-marker {
  display: none;
}

.cat-title {
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}

.items {
  padding: 20px;
}

.badge {
  background: var(--accent);
  color: var(--primary-dark);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.tag.top10 {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.tag.new {
  background: rgba(0, 212, 255, 0.2);
  color: #00D4FF;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.tag.promocao {
  background: rgba(255, 107, 107, 0.2);
  color: #FF6B6B;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.tag.chef {
  background: rgba(155, 89, 182, 0.2);
  color: #9B59B6;
  border: 1px solid rgba(155, 89, 182, 0.3);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: block;
}

.modal-content {
  background: linear-gradient(135deg, rgba(21, 32, 24, 0.95) 0%, rgba(31, 46, 34, 0.95) 100%);
  margin: 5% auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  backdrop-filter: blur(20px);
}

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

.modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 25px;
}

.modal-image {
  width: 100%;
  min-height: 300px;
  border-radius: 16px;
  border: 3px solid #6fd1a5;
  background: linear-gradient(135deg, rgba(21, 32, 24, 0.9) 0%, rgba(31, 46, 34, 0.85) 100%);
  background-size: cover;
  background-position: center 65%;
  background-repeat: no-repeat;
  margin-bottom: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .modal-image {
    aspect-ratio: 3 / 4;
    max-height: 520px;
  }
}

.modal-price-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modal-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.modal-favorite-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.modal-favorite-btn:hover {
  transform: scale(1.1);
}

.modal-favorite-btn.favorited {
  color: var(--heart-red);
}

.modal-favorite-btn::before {
  content: '♡';
}

.modal-favorite-btn.favorited::before {
  content: '♥';
}

.modal-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

/* ESTILOS DE ADMINISTRAÇÃO */
.admin-controls {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.edit-btn {
  background: var(--admin-blue);
  color: white;
}

.edit-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.delete-btn {
  background: var(--admin-red);
  color: white;
}

.delete-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

.image-btn {
  background: var(--admin-green);
  color: white;
}

.image-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
}

.duplicate-btn {
  background: var(--admin-orange);
  color: white;
}

.duplicate-btn:hover {
  background: #e67e22;
  transform: translateY(-2px);
}

/* Modal de edição */
.edit-modal-content {
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 32, 24, 0.5);
  color: var(--text);
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(201, 169, 97, 0.3);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.form-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-actions button[type="submit"] {
  background: var(--admin-green);
  color: white;
}

.form-actions button[type="submit"]:hover {
  background: #27ae60;
}

.form-actions button[type="button"] {
  background: var(--text-muted);
  color: var(--bg);
}

.form-actions button[type="button"]:hover {
  background: var(--text);
}

/* Modal de senha de admin */
#adminModal .modal-body {
  text-align: center;
}

#adminPassword {
  width: 100%;
  max-width: 300px;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 32, 24, 0.5);
  color: var(--text);
  font-size: 16px;
  text-align: center;
}

#adminLogin {
  padding: 12px 24px;
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#adminLogin:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

footer {
  color: var(--text-muted);
  text-align: center;
  padding: 50px 20px;
  border-top: 1px solid var(--border);
  margin-top: 50px;
  background: var(--panel);
}

/* RESPONSIVO MOBILE */
@media (max-width: 768px) {
  .header-container {
    padding: 12px 15px 8px;
  }

  .header-top {
    margin-bottom: 12px;
    min-height: 60px;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .flag-btn {
    width: 35px;
    height: 24px;
    font-size: 14px;
  }

  .filters-carousel {
    gap: 6px;
    padding: 2px;
  }

  .filter-badge {
    padding: 6px 10px;
    gap: 4px;
    font-size: 11px;
  }

  .filter-icon {
    font-size: 12px;
  }

  .filter-label {
    font-size: 10px;
  }

  .category-card {
    width: 70px;
    height: 40px;
  }

  .category-name {
    font-size: 8px;
  }

  .admin-controls {
    flex-direction: column;
  }

  .admin-btn {
    width: 100%;
    text-align: center;
  }

  .modal-content {
    width: 95%;
    margin: 2% auto;
  }

  .edit-modal-content {
    max-height: 95vh;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 10px 10px 0px 10px;
  }

  .header-top {
    min-height: 50px;
  }

  .logo {
    width: 50px;
    height: 50px;
  }

  .flag-btn {
    width: 30px;
    height: 20px;
    font-size: 12px;
    gap: 3px;
  }

  .right-flags {
    gap: 4px;
  }

  .filter-badge {
    padding: 5px 8px;
    font-size: 10px;
  }

  .filter-icon {
    font-size: 11px;
  }

  .filter-label {
    font-size: 9px;
  }
  .admin-btn.category-btn {
    background: #9c27b0;
}

.admin-btn.category-btn:hover {
    background: #7b1fa2;
}

.current-category {
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}
}
