/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: linear-gradient(to bottom, #0f172a, #1e293b);
  color: #fff;
  min-height: 100vh;
}

/* Cabeçalho */
.site-header {
  background-color: #0f1115;
  padding: 15px 30px;
  display: flex;
  justify-content: center;
  border-bottom: 2px solid #0d0d0d;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* NOVAS SEÇÕES DO CABEÇALHO (ESQUERDA E DIREITA) */
.header-left, .header-right {
  display: flex;
  align-items: center;
}

.header-left {
  gap: 30px; /* Espaço entre a logo e os primeiros links */
}

.logo img {
  width: 64px;
  height: 64px;
  display: block;
}

/* ESTILO UNIFICADO DOS LINKS DE NAVEGAÇÃO */
.nav-links-main a, .nav-links-cart a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  padding: 5px; /* Adiciona área de clique */
}

.nav-links-main {
  display: flex;
  gap: 25px; /* Espaço entre COINS e MODIFICAÇÕES */
}

.nav-links-main a:hover, .nav-links-cart a:hover {
  color: #00d9ff;
}

/* PRODUTOS CONTAINER - CORRIGIDO PARA ZOOM RESPONSIVO */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
  gap: clamp(20px, 3vw, 30px);
  padding: clamp(40px, 8vw, 60px) clamp(15px, 3vw, 20px);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Cartão de produto - Melhorado para responsividade */
.product-card {
  background-color: #1a1a1a;
  border-radius: 15px;
  width: 100%;
  max-width: 320px;
  min-width: 280px;
  padding: clamp(15px, 2.5vw, 20px);
  text-align: center;
  box-shadow: 0 0 10px #000000aa;
  transition: transform 0.3s ease;
  margin: 0 auto;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image {
  width: clamp(100px, 15vw, 120px);
  margin-bottom: clamp(15px, 2.5vw, 20px);
}

.product-title {
  font-size: clamp(18px, 2.5vw, 20px);
  font-weight: 600;
  margin-bottom: 10px;
}

.product-price {
  font-size: clamp(16px, 2.2vw, 18px);
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
}

.product-description {
  font-size: clamp(11px, 1.5vw, 12px);
  color: #aaa;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.ver-mais {
  display: inline-block;
  font-size: clamp(12px, 1.6vw, 13px);
  margin-bottom: 15px;
  color: white;
  font-weight: bold;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.ver-mais:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: underline;
}

/* Botão */
.product-button {
  background: linear-gradient(to right, #00c6ff, #0072ff);
  color: white;
  font-weight: bold;
  border: none;
  padding: clamp(10px, 1.5vw, 12px) clamp(15px, 2.5vw, 20px);
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s;
  font-size: clamp(13px, 1.8vw, 14px);
}

.product-button:hover {
  background: linear-gradient(to right, #009ddb, #005fc1);
}

/* RESPONSIVIDADE MELHORADA PARA ZOOM */
@media (max-width: 1200px) {
  .products {
    grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
    gap: clamp(15px, 2.5vw, 25px);
  }
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 20px;
  }

  .header-left {
    flex-direction: column;
    gap: 20px;
  }
  
  .products {
    grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
    gap: clamp(15px, 4vw, 20px);
    padding: clamp(30px, 6vw, 40px) clamp(10px, 2vw, 15px);
  }
}

@media (max-width: 480px) {
  .products {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px 15px;
  }
  
  .product-card {
    min-width: auto;
    max-width: 100%;
  }
}

/* ZOOM ESPECÍFICO - Para diferentes níveis de zoom do navegador */
@media (min-resolution: 1.25dppx) {
  .products {
    gap: clamp(18px, 2.8vw, 28px);
    padding: clamp(35px, 7vw, 55px) clamp(12px, 2.5vw, 18px);
  }
}

@media (min-resolution: 1.5dppx) {
  .products {
    gap: clamp(16px, 2.5vw, 26px);
    padding: clamp(32px, 6.5vw, 52px) clamp(10px, 2.2vw, 16px);
  }
}

@media (min-resolution: 2dppx) {
  .products {
    gap: clamp(14px, 2.2vw, 24px);
    padding: clamp(28px, 6vw, 48px) clamp(8px, 2vw, 14px);
  }
}

/* --- ESTILOS DO MODAL (ATUALIZADO) --- */
/* Modal overlay e conteúdo */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  display: flex !important;
}

.modal-content {
  background: var(--surface-light, #23263a);
  border-radius: var(--radius-lg, 28px);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg, 0 16px 40px 0 rgba(0,0,0,0.22));
  padding: 0;
  animation: fadeInUp 0.5s cubic-bezier(.4,0,.2,1);
}

.modal-header {
  padding: 20px 30px 0;
  text-align: right;
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover,
.close:focus {
  color: #fff;
}

.modal-body {
  padding: 0 30px 30px;
}

.warning-text {
  text-align: center;
  color: #ff6b6b;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 25px;
  padding: 15px;
  background-color: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.modal-title {
  text-align: center;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 25px;
  line-height: 1.3;
}

.modal-description {
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
  text-align: left;
}

.modal-section {
  margin-bottom: 25px;
}

.modal-section h3 {
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: left;
}

.modal-list {
  list-style: none;
  padding-left: 20px;
}

.modal-list li {
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon {
  font-size: 18px;
  display: inline-block;
  width: 20px;
  text-align: center;
}

.icon.star {
  color: #ffd700;
}

.icon.diamond {
  color: #00d9ff;
}

/* Scrollbar personalizada para o modal */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #0a1428;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #4a5568;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #718096;
}

/* Responsividade */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 0;
    max-height: 85vh;
  }
  
  .modal-body {
    padding: 0 20px 20px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .modal-description {
    font-size: 14px;
  }
}

/* Carrinho de Compras */
.cart-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.cart-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #fff;
}

/* Carrinho vazio */
.empty-cart {
  text-align: center;
  padding: 80px 20px;
  background-color: #1a1a1a;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.empty-cart-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.empty-cart h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.empty-cart p {
  color: #aaa;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.empty-cart-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(to right, #00c6ff, #0072ff);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(to right, #009ddb, #005fc1);
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(to right, #00c6ff, #0072ff);
  color: white;
  border: 2px solid #555;
}

.btn-secondary:hover {
  background: #555;
  border-color: #777;
  transform: translateY(-2px);
}

/* Carrinho com produtos */
.cart-items {
  background-color: #1a1a1a;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #333;
}

.cart-header h2 {
  color: #fff;
  font-size: 1.8rem;
  margin: 0;
}

.btn-clear {
  background: #ff4757;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-clear:hover {
  background: #ff3742;
}

/* Lista de produtos do carrinho */
.cart-products-list {
  margin-bottom: 30px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background-color: #2a2a2a;
  border-radius: 10px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
}

.cart-item-image img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
}

.cart-item-details h3 {
  color: #fff;
  margin: 0 0 5px 0;
  font-size: 1.1rem;
}

.cart-item-category {
  color: #00c6ff;
  margin: 0 0 8px 0;
  font-size: 0.9rem;
}

.cart-item-price {
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-btn {
  background: #333;
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: background 0.3s;
}

.quantity-btn:hover {
  background: #555;
}

.quantity-value {
  color: #fff;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

.cart-item-total {
  color: #00c6ff;
  font-weight: bold;
  font-size: 1.2rem;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #ff4757;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  border-radius: 5px;
  transition: background 0.3s;
}

.cart-item-remove:hover {
  background: rgba(255, 71, 87, 0.1);
}

/* Resumo do carrinho */
.cart-summary {
  border-top: 2px solid #333;
  padding-top: 30px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.total-label {
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
}

.total-price {
  color: #00c6ff;
  font-size: 2rem;
  font-weight: bold;
}

.cart-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.btn-continue, .btn-checkout {
  padding: 15px 30px;
  border-radius: 10px;
  border: none;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-continue {
  background: #333;
  color: #fff;
  border: 2px solid #555;
}

.btn-continue:hover {
  background: #555;
  border-color: #777;
  transform: translateY(-2px);
}

.btn-checkout {
  background: linear-gradient(to right, #00c6ff, #0072ff);
  color: #fff;
}

.btn-checkout:hover {
  background: linear-gradient(to right, #009ddb, #005fc1);
  transform: translateY(-2px);
}

/* Mensagem de produto adicionado ao carrinho */
.add-to-cart-message {
  position: fixed;
  top: 80px;
  right: 20px;
  background: #2ed573;
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.add-to-cart-message.show {
  transform: translateX(0);
}

.message-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-icon {
  font-size: 1.2rem;
}

.message-text {
  font-weight: bold;
}

/* Responsividade do carrinho */
@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 15px;
  }
  
  .cart-item-quantity,
  .cart-item-total,
  .cart-item-remove {
    grid-column: 2;
    justify-self: start;
  }
  
  .cart-actions {
    flex-direction: column;
  }
  
  .add-to-cart-message {
    right: 10px;
    left: 10px;
    transform: translateY(-100px);
  }
  
  .add-to-cart-message.show {
    transform: translateY(0);
  }
}

/* --- ESTILOS DO MODAL DE LIMPAR CARRINHO (ATUALIZADO) --- */
#clear-cart-modal .modal-content {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  border: 2px solid rgba(255, 71, 87, 0.3);
  box-shadow: 0 30px 60px rgba(255, 71, 87, 0.2);
  animation: slideIn 0.5s ease-out;
  max-width: 500px; /* Largura máxima para este modal específico */
  padding: 20px; /* Adicionado padding interno */
}

#clear-cart-modal .modal-content h2 {
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 50%, #ff4757 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

#clear-cart-modal .modal-content p {
  color: #e0e0e0;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 35px;
  text-align: center;
  padding: 25px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#clear-cart-modal .modal-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

#clear-cart-modal .modal-buttons button {
  padding: 18px 35px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.3s ease;
  min-width: 140px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#clear-cart-modal .modal-buttons button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

#clear-cart-modal .modal-buttons button:hover::before {
  left: 100%;
}

#clear-cart-modal .btn-primary {
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.3);
}

#clear-cart-modal .btn-primary:hover {
  background: linear-gradient(135deg, #ff3742 0%, #ff2d3a 100%);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(255, 71, 87, 0.4);
}

#clear-cart-modal .btn-secondary {
  background: linear-gradient(135deg, #57606f 0%, #747d8c 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(87, 96, 111, 0.3);
}

#clear-cart-modal .btn-secondary:hover {
  background: linear-gradient(135deg, #747d8c 0%, #8395a7 100%);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(87, 96, 111, 0.4);
}

/* Responsividade do Modal de Limpar Carrinho */
@media (max-width: 768px) {
  #clear-cart-modal .modal-content {
    width: 95%;
    margin: 0;
  }
  
  #clear-cart-modal .modal-content h2 {
    font-size: 24px;
  }
  
  #clear-cart-modal .modal-content p {
    font-size: 16px;
    padding: 20px;
  }
  
  #clear-cart-modal .modal-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  #clear-cart-modal .modal-buttons button {
    width: 100%;
    padding: 15px 25px;
  }
}

@media (max-width: 480px) {
  #clear-cart-modal .modal-content {
    margin: 0;
    width: 98%;
  }
  
  #clear-cart-modal .modal-content h2 {
    font-size: 20px;
  }
  
  #clear-cart-modal .modal-content p {
    font-size: 14px;
    padding: 18px;
  }
}

/* --- CÓDIGO DO CONTADOR DO CARRINHO --- */

/* Estilo para o link do carrinho */
.nav-links-cart .cart-link {
  position: relative;
  display: inline-block;
  font-size: 28px; /* Ajusta o tamanho do emoji */
  padding: 5px;
}

/* Estilo para o contador de itens (a "bolinha") */
.cart-link .cart-item-count {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(40%, -40%); /* Ajuste para a posição superior direita */
  background-color: #ff4757; /* Cor de fundo vermelha para destaque */
  color: #ffffff; /* Cor do texto branca para visibilidade */
  border-radius: 50%; /* Transforma em um círculo */
  min-width: 20px; /* Largura mínima */
  height: 20px; /* Altura */
  font-size: 12px; /* Tamanho da fonte do número */
  font-weight: bold;
  
  /* Centraliza o número dentro do círculo */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1; /* Garante que o texto não tenha altura extra */
  box-shadow: 0 2px 5px rgba(0,0,0,0.3); /* Sombra sutil */
  
  /* Escondido por padrão, o JS controla a exibição */
  display: none; 
}