/* Estilos do carrinho automático */
.wp-cart-auto-button {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.wp-cart-auto-button:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cart-count {
  background: #dc3545;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Botões automáticos */
.wp-cart-auto-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 14px;
}

.wp-cart-auto-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.wp-cart-auto-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.wp-cart-loop-btn {
  padding: 8px 15px;
  font-size: 12px;
}

.wp-cart-auto-button-container {
  margin: 10px 0;
  text-align: center;
}

/* Container do carrinho */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  transform: translateX(0);
}

/* Header do carrinho */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  background: #f8f9ff;
}

.cart-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2563eb;
}

.cart-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.close-cart {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.close-cart:hover {
  background: #f0f0f0;
}

/* Items do carrinho */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
  text-align: center;
}

.empty-cart svg {
  margin-bottom: 15px;
  opacity: 0.5;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: box-shadow 0.2s ease;
}

.cart-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #f5f5f5;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 600;
  font-size: 14px;
  color: #2563eb;
  line-height: 1.3;
  margin-bottom: 5px;
}

.item-flavor {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background: #f5f5f5;
  border-color: #2563eb;
}

.quantity {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.remove-item {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.remove-item:hover {
  background: #fee;
  transform: scale(1.1);
}

.item-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.item-price .calculation {
  color: #666;
}

.item-price .total {
  font-weight: 600;
  color: #2563eb;
}

/* Footer do carrinho */
.cart-footer {
  border-top: 1px solid #eee;
  padding: 20px;
  background: #fafafa;
}

.cart-subtotal {
  text-align: center;
  margin-bottom: 20px;
}

.subtotal-amount {
  font-size: 18px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 5px;
}

.subtotal-note {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.continue-shopping {
  width: 100%;
  padding: 12px;
  border: 1px solid #2563eb;
  background: white;
  color: #2563eb;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.continue-shopping:hover {
  background: #f8f9ff;
  transform: translateY(-1px);
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.checkout-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Responsivo */
@media (max-width: 768px) {
  .cart-sidebar {
    max-width: 100%;
  }

  .wp-cart-auto-button {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
  }

  .wp-cart-auto-btn {
    padding: 8px 15px;
    font-size: 13px;
  }
}

/* Integração com temas populares */
.woocommerce .wp-cart-auto-button-container {
  margin: 15px 0;
}

.woocommerce-loop-product .wp-cart-auto-button-container {
  margin-top: 10px;
}

/* Animações */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

.cart-sidebar.active {
  animation: slideInRight 0.3s ease;
}

/* Notificações */
.wp-cart-notification {
  font-size: 14px;
  font-weight: 500;
}
