:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --background-color: #f8fafc;
  --text-color: #1e293b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary-color);
}

#logout-btn {
  width: auto;
  padding: 0.5rem 1rem;
  margin-left: 2rem;
  background-color: #e53e3e;
}

#logout-btn:hover {
  background-color: #c53030;
}

.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.products {
  padding: 4rem 2rem;
}

.products h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background-color: #f5f5f5;
}

.product-card h3 {
  padding: 1rem;
  font-size: 1.25rem;
}

.product-card p {
  padding: 0 1rem;
  color: #64748b;
}

.price {
  display: block;
  padding: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stock {
  color: #666;
  font-size: 0.9em;
  margin: 5px 0;
  padding: 0 1rem;
}

.out-of-stock {
  color: #e53e3e;
}

button {
  display: block;
  width: calc(100% - 2rem);
  margin: 1rem;
  padding: 0.75rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

button:hover {
  background-color: var(--secondary-color);
}

.add-to-cart-btn {
  cursor: pointer;
}

.add-to-cart-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

footer {
  text-align: center;
  padding: 2rem;
  background-color: white;
  margin-top: 4rem;
}

/* Estilos do Carrinho - Versão Final Ajustada */
.cart-container {
  position: fixed;
  top: 80px;
  right: 0;
  width: 100%;
  max-width: 350px;
  height: calc(100vh - 80px);
  background-color: #f8f9fa;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

.cart-container.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.cart-header h3 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin: 0;
}

.close-cart-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  padding: 5px;
  margin-left: 10px;
}

.close-cart-btn:hover {
  color: #333;
}

.cart-toggle-btn {
  position: fixed;
  top: 100px;
  right: 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-toggle-btn:hover {
  background-color: #2980b9;
  transform: scale(1.1);
}

.cart-content {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 5px; /* Espaço para a barra de rolagem */
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.cart-item span {
  flex: 1;
}

.cart-item button {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-left: 10px;
  width: auto;
}

.cart-item button:hover {
  background-color: #c0392b;
}

.cart-footer {
  margin-top: auto;
  padding-top: 15px;
}

.cart-total {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: right;
  margin-bottom: 15px;
}

#checkout-btn {
  width: 100%;
  background-color: #2ecc71;
  padding: 12px;
  font-size: 1rem;
  transition: background-color 0.3s;
}

#checkout-btn:hover {
  background-color: #27ae60;
}

/* Notificações */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #4CAF50;
  color: white;
  padding: 15px 25px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification.show {
  opacity: 1;
}

.notification.error {
  background-color: #e53e3e;
}

.notification-icon {
  font-size: 20px;
}

/* Estilos do Modal de Feedback */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
}

.modal-content {
  background-color: #f8f9fa;
  margin: 10% auto;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: #333;
}

/* Estilos do Formulário de Feedback */
#feedback-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#feedback-form h2 {
  margin-bottom: 15px;
  color: #2c3e50;
  text-align: center;
}

#feedback-name,
#feedback-text {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
}

#feedback-name:focus,
#feedback-text:focus {
  outline: none;
  border-color: #3498db;
}

#feedback-text {
  min-height: 150px;
  resize: vertical;
}

#feedback-form button[type="submit"] {
  background-color: #3498db;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#feedback-form button[type="submit"]:hover {
  background-color: #2980b9;
}

/* Botão de Feedback */
.feedback-button {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 30%;
  width: 90px;
  height: 60px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-button:hover {
  background-color: #2980b9;
  transform: scale(1.1);
}

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

  .nav-links {
    margin-top: 1rem;
  }

  .nav-links a {
    margin: 0 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .modal-content {
    margin: 20% auto;
    width: 85%;
  }
  
  .cart-container {
    top: 70px;
    height: calc(100vh - 70px);
  }
  
  .feedback-button {
    width: 50px;
    height: 50px;
    font-size: 20px;
    bottom: 90px;
    right: 20px;
  }

  .cart-toggle-btn {
    top: 80px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
}