* {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

.sort-btn {
  background-color: #fd9c6b;
  border-radius: 15px;
  color: white;
  padding: .6em 1em;  
  font-weight: bolder;
  border: none;
  cursor: pointer;
  display: inline-block;
  margin-bottom: 10px; 
}

.cart-btn {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

#cart {
  position: relative;
  font-size: 2rem;
  cursor: pointer;
  margin: 1em 4em 0 0;
}

.cart-quantity {
  color: white;
  background-color: red;
  padding: .2em .3em;
  position: absolute;
  margin: .8em 7.5em 0 0;
  right: 0;
  border: solid 2px red;
  border-radius: 15px;
  font-weight: bolder;
}

.items-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 1em
}

.card {
/*   width: 15rem; */
  margin: 1em;
  position: relative;
  overflow: hidden; 
  text-align: center
}

.card:hover .add-to-cart {
  transform: translateX(0);
}

.product-image {
  margin-bottom: 1em
}

.add-to-cart {
  background-color: rgb(0, 0, 0);
  color: white;
  position: absolute;
  right: 0;
  top: 65%;
  padding: .5em 1em; 
  transform: translateX(300px);
  transition: .5s ease;
  outline: none;
  border: none;
  cursor: pointer;
  font-weight: bolder;
  font-size: 1.2rem
}

.product-price {
  padding-top: 1em;
  font-weight: bold;
  font-size: 1.5rem;
}

.cart-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  z-index: 10; 
  transform: translateX(-200%);
  transition: .5s ease-out;
}

.cart-modal {
  height: 100vh;
  width: 50%;
  background-color: #160e0b;
  float: right;
  overflow: scroll;
  overflow-x: hidden;
  z-index: 11; 
}

#close-btn {
  font-size: 1.5rem;
  float: right;
  margin: .5em 2em 0 0;
  color: white;
  cursor: pointer;
}

.cart-is-empty {
  color: white;
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1em;
  display: none;
  
}

.total {
  text-align: center;
  margin: 2em 0 2em 0;
/*   display: none; */
}

/* Overall Cart Styling */
.cart-total, .total-price, .cart-name, .cart-price {
  color: #e0e0e0;
}

.total-price {
  color: #ffcc00;
  font-size: 2.5rem;
  display: block;
  text-shadow: 0 0 10px #ffcc00, 0 0 20px #ffcc00;
}

.purchase-btn {
  font-size: 1.2rem;
  font-weight: bolder;
  background: linear-gradient(45deg, #00b09b, #96c93d);
  color: white;
  padding: 1em 2em;
  border-radius: 10px;
  outline: none;
  border: none;
  cursor: pointer;
  margin: 2em 0 1em 0;
  transition: transform 0.3s, box-shadow 0.3s;
}

.purchase-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.product-rows {
  margin-top: 3em;
  width: 95%;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid #444;
  padding: 1em;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.product-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #333;
  padding: 10px 0 0 0;
}

.cart-image {
  width: 10rem;
  margin: 1em;
  border: 2px solid #555;
  border-radius: 10px;
}

.cart-price {
  color: #ffcc00;
  padding-left: 20px;
  font-size: 1.5rem;
  font-weight: bolder;
  text-shadow: 0 0 5px #ffcc00;
}

.cart-name {
  margin: 0;
}

.product-quantity {
  width: 4rem;
  font-size: 2rem;
  margin-left: 3rem;
  background: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 5px;
  text-align: center;
}

.remove-btn {
  padding: 1em 2em;
  background: linear-gradient(45deg, #ff416c, #ff4b2b);
  color: white;
  outline: none;
  border: none;
  cursor: pointer;
  margin-left: 3rem;
  font-weight: bolder;
  font-size: 1rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.remove-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.remove-btn:active {
  transform: translateY(5px);
}

/* Promo code section styling */
.promo-code-section {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 15px;
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border-radius: 0 0 10px 10px;
}

.promo-code-section input[type="text"] {
  padding: 10px;
  width: 200px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 10px;
  background: #333;
  color: #fff;
}

.promo-code-section button {
  padding: 10px 15px;
  border: none;
  background: linear-gradient(45deg, #00b09b, #96c93d);
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.promo-code-section button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

#discount-message {
  margin-left: 10px;
  font-weight: bold;
  color: green;
}

.form-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.form-container h2 {
  text-align: center;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
}
.form-group input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}
.submit-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #fd9c6b;
  color: white;
  border: none;
  cursor: pointer;
}
.submit-btn:hover {
  background-color: #e07b49;
}

@media (max-width: 1000px){
  .cart-modal {
    width: 100vw;
  } 
  
  .product-row {
    flex-direction: column;
    text-align: center;
    margin-bottom: 2em;
  }
  
  .remove-btn {
    margin: 0
  }
  
  .product-quantity {
    margin: .5em 0 .5em 0
  }
}