/* Reset e Estilos Globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Cores Principais - Modo Escuro */
  --primary-color: #E91E63;
  --primary-dark: #C2185B;
  --secondary-color: #9C27B0;
  --secondary-dark: #6A1B9A;
  
  /* Backgrounds - Modo Escuro */
  --bg-dark: #0D0A10;
  --bg-secondary: #1A151F;
  --bg-card: #221C2B;
  --bg-hover: #2A2433;
  
  /* Rose Gold - CTA */
  --rose-gold: #F8B8C9;
  --rose-gold-dark: #F7B2C3;
  
  /* Textos - Modo Escuro */
  --text-light: #FFFFFF;
  --text-secondary: #D1C8DB;
  --text-gray: #A89BB5;
  
  /* Bordas */
  --border-color: #3A3145;
  
  /* Status */
  --success-color: #00d084;
  --danger-color: #ff4444;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #E91E63, #9C27B0);
  --gradient-primary-hover: linear-gradient(135deg, #C2185B, #6A1B9A);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: var(--gradient-primary);
  padding: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

header h1 {
  font-size: 1.8rem;
  font-weight: bold;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
}

#search {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 25px;
  width: 100%;
  max-width: 300px;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.95);
  color: #212121;
}

#search:focus {
  box-shadow: 0 0 15px rgba(248, 184, 201, 0.5);
  background: white;
}

.btn-carrinho {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid white;
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.btn-carrinho:hover {
  background: white;
  color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-admin {
  background: rgba(0, 0, 0, 0.25);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.btn-admin:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

/* Categorias */
.categories {
  background: var(--bg-secondary);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.categories .container {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}

.category-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.category-btn:hover,
.category-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(233, 30, 99, 0.4);
  transform: translateY(-2px);
}

/* Catálogo */
main {
  padding: 2rem 0;
  min-height: 60vh;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(233, 30, 99, 0.3);
  border-color: var(--primary-color);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-hover);
}

.product-info {
  padding: 1rem;
}

.product-category {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.price-current {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--rose-gold);
}

.price-old {
  font-size: 1rem;
  color: var(--text-gray);
  text-decoration: line-through;
}

.product-stock {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.product-stock.low {
  color: var(--rose-gold);
  font-weight: 600;
}

.btn-add-cart {
  width: 100%;
  padding: 0.8rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(233, 30, 99, 0.3);
}

.btn-add-cart:hover {
  background: var(--gradient-primary-hover);
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(233, 30, 99, 0.5);
}

.badge-destaque {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gradient-primary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.4);
}

.badge-promocao {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--rose-gold);
  color: #1A151F;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(247, 178, 195, 0.4);
}

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

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

.modal-content {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 15px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border-color);
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-gray);
  cursor: pointer;
  transition: color 0.3s;
}

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

/* Carrinho */
.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 1rem;
  align-items: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.cart-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 3px 10px rgba(233, 30, 99, 0.2);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

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

.cart-item-name {
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.cart-item-price {
  color: var(--rose-gold);
  font-weight: bold;
  font-size: 1.1rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.quantity-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(233, 30, 99, 0.3);
}

.quantity-btn:hover {
  background: var(--gradient-primary-hover);
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(233, 30, 99, 0.5);
}

.btn-remove {
  background: var(--danger-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-remove:hover {
  opacity: 0.8;
}

.cart-total {
  border-top: 2px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 1rem;
  text-align: right;
}

.cart-total h3 {
  font-size: 1.5rem;
  color: var(--rose-gold);
  text-shadow: 0 2px 5px rgba(248, 184, 201, 0.3);
}

.btn-finalizar {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-finalizar:hover {
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.empty-cart {
  text-align: center;
  padding: 2rem;
  color: var(--text-gray);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

footer p {
  color: var(--text-secondary);
  margin: 0.3rem 0;
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* Responsivo */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    text-align: center;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
  }

  #search {
    max-width: 100%;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
  }

  .modal-content {
    padding: 1.5rem;
    width: 95%;
  }

  .cart-item {
    flex-direction: column;
    text-align: center;
  }
}

/* Animações e Efeitos Especiais */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.badge-promocao {
  animation: pulse 2s infinite;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-primary-hover);
}
