/* Estilos do Carrinho */
.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
}

.cart-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.cart-modal-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 450px;
  height: 100%;
  background: #1e1e2d;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.cart-modal.active .cart-modal-content {
  transform: translateX(0);
}

.cart-modal-header {
  padding: 20px;
  background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-cart {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-cart:hover {
  color: #ff6b6b;
}

.cart-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Estado vazio */
.cart-empty-state {
  padding: 40px 20px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #a0a0c0;
}

.empty-cart-icon {
  font-size: 3rem;
  color: #2c3e50;
  margin-bottom: 20px;
}

.cart-empty-state h3 {
  color: #e0e0ff;
  margin-bottom: 10px;
}

.cart-empty-state p {
  margin-bottom: 30px;
}

/* Itens do carrinho */
.cart-items-container {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.cart-items-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.cart-item {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #2a2a3a;
  padding: 10px;
}

.cart-item-details {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: #f1f1ff;
}

.cart-item-price {
  color: #4CAF50;
  font-weight: 500;
  margin-bottom: 10px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: #2a2a3a;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

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

.quantity-display {
  min-width: 30px;
  text-align: center;
}

.remove-btn {
  margin-left: auto;
  background: rgba(255, 107, 107, 0.2);
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.remove-btn:hover {
  background: rgba(255, 107, 107, 0.3);
}

/* Resumo do carrinho */
.cart-summary {
  padding: 20px;
  background: #2a2a3a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #c0c0e0;
}

.summary-row.total {
  font-size: 1.1rem;
  font-weight: bold;
  color: white;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.btn-continue-shopping, .btn-finalize-purchase {
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-continue-shopping {
  background: #3a3a4a;
  color: white;
}

.btn-continue-shopping:hover {
  background: #4a4a5a;
}

.btn-finalize-purchase {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  color: white;
}

.btn-finalize-purchase:hover {
  background: linear-gradient(135deg, #5CBF60 0%, #3E8D42 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(46, 125, 50, 0.3);
}

/* Responsivo */
@media (max-width: 768px) {
  .cart-modal-content {
    width: 90%;
    max-width: none;
  }
  
  .cart-item {
    flex-direction: column;
  }
  
  .cart-item-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
  }
}

/* Animações */
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cart-modal.active {
  display: block;
  animation: fadeIn 0.3s;
}

.cart-modal.active .cart-modal-content {
  animation: slideIn 0.3s forwards;
}

/* Estilo para o modal de resumo da compra */
.purchase-summary-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s;
}

.purchase-summary-content {
  background: #1e1e2d;
  border-radius: 10px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid #2a2a3a;
}

.purchase-summary-content h2 {
  color: #4CAF50;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-icon {
  color: #4CAF50;
  font-size: 1.5em;
}

.summary-details {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.summary-details p {
  margin: 8px 0;
}

.items-list {
  margin: 20px 0;
}

.items-list h3 {
  border-bottom: 1px solid #2a2a3a;
  padding-bottom: 8px;
}

.items-list ul {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.items-list li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.item-quantity {
  color: #4CAF50;
  font-weight: bold;
}

.delivery-info {
  font-size: 0.9em;
  color: #a0a0c0;
  margin: 20px 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
}

.btn-close-summary {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-weight: bold;
  transition: background 0.2s;
}

.btn-close-summary:hover {
  background: #3e8e41;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Estilos para o carrinho */
.cart-modal {
  /* Seus estilos existentes para o modal */
}

.cart-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 15px;
}

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

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

.cart-item-name {
  margin: 0;
  font-size: 1rem;
  color: #f8f8f8;
}

.cart-item-price {
  margin: 5px 0;
  color: #f39c12;
  font-size: 0.9rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.quantity-btn {
  width: 25px;
  height: 25px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.quantity-display {
  min-width: 20px;
  text-align: center;
}

.remove-btn {
  margin-left: auto;
  padding: 5px 10px;
  background: rgba(231, 76, 60, 0.2);
  border: none;
  border-radius: 4px;
  color: #e74c3c;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.remove-btn:hover {
  background: rgba(231, 76, 60, 0.3);
}

/* Estilos para a seleção de personagens */
.character-selection-container {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.character-selection-title {
  color: #f8f8f8;
  font-size: 1.1rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.character-option {
  display: flex;
  align-items: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.character-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.character-option.selected {
  background: rgba(46, 134, 222, 0.3);
  border-left: 3px solid #2e86de;
}

.character-class-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  margin-right: 12px;
  object-fit: cover;
}

.character-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.character-name {
  font-weight: bold;
  color: #f8f8f8;
  margin-bottom: 3px;
}

.character-details {
  font-size: 0.85rem;
  color: #aaa;
}

.selection-check {
  color: #2ecc71;
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.character-option.selected .selection-check {
  opacity: 1;
}

/* Estilos para o resumo da compra */
.purchase-summary-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.purchase-summary-content {
  background: #2c3e50;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  color: white;
}

.success-icon {
  color: #2ecc71;
  margin-right: 10px;
}

.summary-details {
  margin: 15px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.items-list {
  margin: 15px 0;
}

.items-list ul {
  list-style: none;
  padding: 0;
}

.items-list li {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.item-quantity {
  color: #f39c12;
  margin-right: 10px;
}

.delivery-info {
  font-size: 0.9rem;
  color: #aaa;
  margin: 20px 0;
}

.btn-close-summary {
  width: 100%;
  padding: 10px;
  background: #3498db;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.btn-close-summary:hover {
  background: #2980b9;
}

/* Estilos para o modal de erro */
.error-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.error-modal-content {
  background: #2c3e50;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  color: white;
  text-align: center;
}

.error-modal h3 {
  color: #e74c3c;
  margin-bottom: 15px;
}

.error-modal p {
  margin-bottom: 15px;
}

.btn-close-error {
  padding: 8px 20px;
  background: #e74c3c;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.btn-close-error:hover {
  background: #c0392b;
}

/* Estilos para os botões de erro */
.btn-help {
  background-color: #2196F3;
  color: white;
  border: none;
  padding: 10px 15px;
  margin: 10px 5px 0 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.btn-help:hover {
  background-color: #0b7dda;
}

.btn-help i {
  margin-right: 5px;
}

/* Melhorias no modal de erro */
.error-modal-content {
  max-width: 500px;
  padding: 20px;
  text-align: center;
}

.error-modal-content h3 {
  color: #f44336;
  margin-bottom: 15px;
}

.error-modal-content p {
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Container para botões */
.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}