@font-face {
    font-family: 'RedHat';
    src: url('assets/fonts/RedHatText-VariableFont_wght.ttf');
}

:root {
    --Red: hsl(14, 86%, 42%);
    --Green: hsl(159, 69%, 38%);
    --Rose-50: hsl(20, 50%, 98%);
    --Rose-100: hsl(13, 31%, 94%);
    --Rose-300: hsl(14, 25%, 72%);
    --Rose-400: hsl(7, 20%, 60%);
    --Rose-500: hsl(12, 20%, 44%);
    --Rose-900: hsl(14, 65%, 9%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'RedHat', sans-serif;
  background-color: var(--Rose-50);
  color: var(--Rose-900);
  min-height: 100vh;
}

.container {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
}

.product-section {
  flex: 1;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.product-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

/* .product-card:hover {
  transform: translateY(-5px);
} */

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1rem;
}

.product-category {
  color: var(--Rose-500);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-price {
  color: var(--Red);
  font-weight: 700;
}

.add-to-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem;
  background-color: white;
  border: 1px solid var(--Rose-100);
  border-radius: 8px;
  font-family: 'Red Hat Text', sans-serif;
  font-weight: 600;
  color: var(--Rose-900);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
  background-color: var(--Rose-100);
}

.add-to-cart-btn img {
  margin-right: 0.5rem;
}

.quantity-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem;
  background-color: var(--Red);
  border-radius: 8px;
  color: white;
}

.quantity-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity {
  font-weight: 600;
}

.cart-section {
  width: 350px;
}

.cart-container {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 2rem;
}

.cart-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--Red);
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  color: var(--Rose-400);
  text-align: center;
}

.empty-cart-icon {
  width: 80px;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.cart-items {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--Rose-100);
}

.cart-item-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 1rem;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  display: flex;
  align-items: center;
  color: var(--Rose-500);
  font-size: 0.9rem;
}

.cart-item-quantity {
  margin-right: 0.5rem;
  color: var(--Rose-400);
}

.cart-item-total {
  font-weight: 600;
  margin-left: auto;
}

.remove-item-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 1rem;
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.carbon-neutral {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--Rose-500);
  font-size: 0.9rem;
}

.leaf-icon {
  margin-right: 0.5rem;
}

.carbon-neutral-text {
  color: var(--Green);
  font-weight: 600;
}

.confirm-order-btn {
  width: 100%;
  padding: 1rem;
  background-color: var(--Red);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Red Hat Text', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.confirm-order-btn:hover {
  background-color: hsl(14, 76%, 37%);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  text-align: center;
}

.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.modal h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.modal p {
  color: var(--Rose-500);
  margin-bottom: 2rem;
}

.order-summary {
  background-color: var(--Rose-50);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.order-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.order-item:last-child {
  margin-bottom: 0;
}

.order-item-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 1rem;
}

.order-item-details {
  flex: 1;
  text-align: left;
}

.order-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.order-item-quantity {
  color: var(--Rose-400);
  font-size: 0.8rem;
}

.order-item-price {
  font-weight: 600;
}

.modal-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 2rem;
}

.start-new-order-btn {
  width: 100%;
  padding: 1rem;
  background-color: var(--Red);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Red Hat Text', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.start-new-order-btn:hover {
  background-color: hsl(14, 76%, 37%);
}

/* Responsive styles */
@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }
  
  .cart-section {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
}