: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%);
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Red Hat Text', sans-serif;
  background-color: var(--rose-50);
  color: var(--rose-900);
  line-height: 1.5;
}

.container {
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
}


.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.product-card {
  background-color: var(--white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  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-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.product-category {
  color: var(--rose-400);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.product-price {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.btn-add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--red);
  color: var(--white);
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  font-family: 'Red Hat Text', sans-serif;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease;
}

.btn-add-to-cart:hover, .btn-add-to-cart:focus {
  background-color: hsl(14, 86%, 35%);
}

.btn-add-to-cart img {
  width: 20px;
  height: 20px;
}


.cart-container {
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  margin-top: 2rem;
  overflow: hidden;
}

.cart-title {
  padding: 1.5rem;
  border-bottom: 1px solid var(--rose-100);
}

.cart-content {
  min-height: 200px;
  padding: 1.5rem;
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--rose-400);
  text-align: center;
}

.empty-cart img {
  width: 128px;
  height: 128px;
}

.cart-items {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

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

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: 0.25rem;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--rose-500);
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  background-color: var(--rose-100);
  border-radius: 0.25rem;
  overflow: hidden;
}

.btn-quantity {
  background-color: var(--red);
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-quantity:hover, .btn-quantity:focus {
  background-color: hsl(14, 86%, 35%);
}

.quantity-value {
  padding: 0 1rem;
  font-weight: 600;
}

.btn-remove {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.btn-remove:hover, .btn-remove:focus {
  opacity: 0.7;
}

.cart-summary {
  padding: 1.5rem;
  border-top: 1px solid var(--rose-100);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.btn-confirm-order {
  width: 100%;
  background-color: var(--green);
  color: var(--white);
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  font-family: 'Red Hat Text', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.btn-confirm-order:hover, .btn-confirm-order:focus {
  background-color: hsl(159, 69%, 30%);
}

.btn-confirm-order:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  max-width: 500px;
  width: 90%;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-content {
  padding: 2rem;
}

.modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-header img {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin-bottom: 0.5rem;
  color: var(--green);
}

.modal-items {
  margin-bottom: 1.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.modal-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rose-100);
}

.modal-item:last-child {
  border-bottom: none;
}

.modal-item-name {
  font-weight: 600;
}

.modal-item-quantity {
  color: var(--rose-400);
}

.modal-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rose-100);
}

.btn-new-order {
  width: 100%;
  background-color: var(--red);
  color: var(--white);
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  font-family: 'Red Hat Text', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-new-order:hover, .btn-new-order:focus {
  background-color: hsl(14, 86%, 35%);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}


.carbon-neutral {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--green);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.carbon-neutral img {
  width: 20px;
  height: 20px;
}


@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-image {
    height: 250px;
  }
}

@media (min-width: 1024px) {
  .container {
    flex-direction: row;
    gap: 2rem;
    padding: 3rem 2rem;
  }
  
  .products-container {
    flex: 2;
  }
  
  .cart-container {
    flex: 1;
    margin-top: 0;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
  }
  
  .cart-content {
    overflow-y: auto;
    flex: 1;
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 3rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


button:focus, a:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}