header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
  }

  .navbar {
    padding: 0.8rem 1rem;
  }

  .navbar-toggler {
    border: none;
    background-color: transparent;
  }

  .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 50%;
  }

  .nav-link {
    color: #333;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
  }

  .nav-link:hover {
    color: #007bff; 
  }

  ol {
    padding-left: 20px;
  }

  .link-u {
    background-color: green;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
    color: #fff;
    display: inline-block;
    margin: 10px;
  }

  .link-d {
    background-color: red;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
    color: #fff;
    display: inline-block;
  }

  .link-ud:hover {
    opacity: 0.8;
  }

  html, body {
    height: 100%; 
    margin: 0; 
    padding: 5px;
  }
  body {
    display: flex;
    flex-direction: column; 
  }

  main {
    flex: 1; 
  }
 
 .flash {
  background-color: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
  padding: 12px;
  margin: 15px auto;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  width: 90%;
  max-width: 600px;
  animation: fadeOut 0.5s ease-out 3s forwards;
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 0;
  list-style: none;
}

.product-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

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

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

.product-card h2 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.product-card p {
  font-weight: bold;
  color: #333;
}

.product-card button {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.product-card button:hover {
  background-color: #0056b3;
}

#buy-button {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

#buy-button:hover {
  background-color: #0056b3;
}

#clear-cart {
   margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background-color: #f50505;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

#clear-cart:hover {
  background-color: #700505;
}

.cart-page {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
  color: #333;
  margin: 0;
  padding: 2rem 0;
}

.cart-title {
  text-align: center;
  color: #222;
  margin-bottom: 2rem;
}

.cart-table {
  width: 80%;
  margin: 0 auto;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  border-radius: 10px;
  overflow: hidden;
}

.cart-table td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.cart-row:hover {
  background-color: #f3f4f6;
}

.cart-btn {
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cart-btn-remove {
  background-color: #f87171;
  color: white;
}

.cart-btn-remove:hover {
  background-color: #dc2626;
}

.cart-btn-clear {
  background-color: #dc3545;
  color: white;
}

.cart-btn-clear:hover {
  background-color: #b02a37;
}

.cart-btn-discount {
  background-color: #007bff;
  color: white;
}

.cart-btn-discount:hover {
  background-color: #0056b3;
}

.cart-discount-form {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.cart-discount-input {
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 200px;
}

.cart-summary {
  width: 80%;
  margin: 2rem auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  padding: 1rem;
  text-align: center;
}

.cart-summary p {
  margin: 0.4rem 0;
}

.cart-error {
  text-align: center;
  color: red;
}

.cart-success {
  text-align: center;
  color: green;
}

.cart-link {
  display: block;
  text-align: center;
  color: #007bff;
  text-decoration: none;
  margin-top: 2rem;
}

.cart-link:hover {
  text-decoration: underline;
}

.welcome {
  background: white;
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.intro {
  text-align: center;
  color: #555;
  font-size: 1rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
  }
  
.feature {
  background: #f8f9ff;
  padding: 25px;
  border-radius: 15px;
  border-left: 4px solid #667eea;
  transition: transform 0.3s ease;
  }
  
.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
  }
  
.feature h3 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.3em;
  }
  
.feature p {
  color: #666;
  line-height: 1.6;
  }
  
.discount-info {
  background: linear-gradient(135deg, #1350f8 0%, #f5576c 100%);
  color: white;
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  }
  
.discount-info h3 {
  margin-bottom: 15px;
  font-size: 1.4em;
  }

.codes {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
   margin-top: 15px;
  }
        
.code {
  background: rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  letter-spacing: 1px;
  border: 2px solid white;
  }

.wallet-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
  animation: slideIn 0.5s ease;
  }

.wallet-error {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
  animation: slideIn 0.5s ease;
  }

.balance-display {
  background: linear-gradient(135deg, #0f7926 0%, #22d30b 100%);
  color: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  }

.balance-display strong {
  display: block;
  font-size: 1em;
  opacity: 0.9;
  margin-bottom: 10px;
  }

.balance-amount {
  font-size: 3em;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  }

form {
  background: #f8f9ff;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
 }
 
 input[type="number"] {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1.1em;
  margin-bottom: 15px;
  transition: all 0.3s ease;
 }
 
 input[type="number"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
 }

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

ul li {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
  }

ul li:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.no-transactions {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 30px;
  background: #f8f9ff;
  border-radius: 10px;
  }
