@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;700&family=Merriweather:wght@400;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Merriweather', serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(#31220b, #382e1b);
  color: #f3e7d4;
  min-height: 100vh;
}

#main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 15%;
}

#main-title {
  display: flex;
  align-items: center;
}

#main-title img {
  width: 5rem;
  margin-right: 1.5rem;
}

h1 {
  text-align: center;
  text-transform: uppercase;
  color: #edbf68;
  text-shadow: 0 0 4px rgba(35, 34, 34, 0.4);
  font-size: 2.5rem;
  margin: 0;
}

#main-header button {
  background: #edbf68;
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1.5rem;
  color: #201e1a;
  font-size: 1.25rem;
  cursor: pointer;
}

#main-header button:hover {
  background: #f5b744;
}

#shop {
  width: 70%;
  margin: 2rem auto;
}

#shop h2 {
  font-size: 1.5rem;
  color: #a59b8b;
  text-transform: uppercase;
}

#products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 2rem;
}

.product {
  height: 100%;
  background: #5f4e33;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.product img {
  width: 100%;
  border-radius: 6px;
}

.product-content {
  flex: 1;
  padding: 0 1rem 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-content h3 {
  font-size: 1.25rem;
  color: #fbd392;
  margin-bottom: 0.15rem;
}

.product-price {
  font-size: 1rem;
  color: #d1b68b;
  margin: 0;
}

.product-actions {
  text-align: right;
}

.product-actions button {
  background: #f4b115;
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  color: #201e1a;
  font-size: 1rem;
  cursor: pointer;
}

.product-actions button:hover {
  background: #f5b744;
}

#cart-modal {
  top: 5rem;
  width: 30%;
  background: #d3b17b;
  border: none;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  animation: fade-slide-in-from-top 0.3s ease-in-out;
}

.cart-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
}

#cart-modal h2 {
  font-size: 1.5rem;
  color: #4f3807;
  text-transform: uppercase;
  margin: 0;
}

#cart-items {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#cart-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #fbd392;
  border-radius: 5px;
  font-size: 0.9rem;
}

.cart-item-actions {
  font-size: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.cart-item-actions button {
  background: transparent;
  border: none;
  border-radius: 5px;
  color: #201e1a;
  cursor: pointer;
  font-size: 1.1rem;
}

.cart-item-actions button:hover {
  background: #f5b744;
}

.cart-item-actions button:first-of-type {
  padding-bottom: 0.2rem;
}

#cart-total-price {
  text-align: right;
}

#cart-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}

#cart-actions button {
  background: transparent;
  border: none;
  border-radius: 5px;
  color: #201e1a;
  cursor: pointer;
  font-size: 1.1rem;
}

#cart-actions button:hover {
  color: #453719;
}

#cart-actions button:last-of-type {
  background: #271e07;
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  color: #f9efda;
  font-size: 1rem;
  cursor: pointer;
}

#cart-actions button:last-of-type:hover {
  background: #382e1b;
}

#checkout {
  animation: fade-slide-in-from-right 0.3s ease-in-out;
}

#checkout label {
  display: block;
  margin-bottom: 0.5rem;
}

#checkout input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 5px;
  border: none;
  margin-bottom: 1rem;
}

@keyframes fade-slide-in-from-top {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-slide-in-from-right {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}