.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("../images/cart/cart-bg.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  height: 230px;
}
@media (min-width: 1440px) {
  .featured-discount-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url("../images/cart/cart-bg-2x.jpg");
  }
}

.banner h2 {
  font-weight: 700;
  font-size: 3rem;
  color: var(--white);
}

/* === CART SECTION === */
/* === GRID HEADER === */
.cart-grid-header {
  display: none;
  place-items: center;
  background-color: var(--lila);
  color: var(--white);
  padding: 0.75rem 1.2rem;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1rem;
  @media (min-width: 1024px) {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr;
  }
}

/* === CART ITEMS GRID === */
.cart-img  { grid-area: image; }
.cart-title { 
  grid-area: title; 
   @media (max-width: 1024px) {
    justify-self: start;
}  
}
.price { 
  grid-area: price;
  @media (max-width: 1024px) {
    display: none;
} 
}
.quantity  { 
  grid-area: quantity; 
  @media (max-width: 1024px) {
    justify-self: start;
}
}
.total { 
  grid-area: total;
  @media (max-width: 1024px) {
    justify-self: start;
}
 }
.remove { 
  grid-area: delete; 
   @media (max-width: 1024px) {
    justify-self:last baseline;
}   
}

.cart-item {
  display: grid;
  grid-template-areas: "image title title title"
                      "image quantity total delete";
  grid-template-columns: auto 1fr 1fr 1fr;
  grid-template-rows: repeat(2, auto);
  place-items: center;
  padding: 0.5rem;
  gap: 0.5rem;
  border-bottom: 2px solid var(--lila);
  @media (min-width: 768px) {
    grid-template-areas: "image title title delete"
                          "image quantity total .";
  grid-template-columns: auto 1fr 1fr 1fr;
  grid-template-rows: repeat(2, auto);
  }
  @media (min-width: 1024px) {
    grid-template-areas: "image title price quantity total delete";
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr;
    grid-template-rows: auto;
  }

}

.cart-items-greed img {
  width: auto;
  height: 7rem;
}

.cart-items-greed h3 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  color: var(--brown);
}

.cart-items-greed .price,
.cart-items-greed .total {
  font-weight: 700;
  font-size: 1rem;
}

.cart-items-greed .quantity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-items-greed .quantity span{
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

.cart-items-greed .quantity button {
  background: none;
  border: none;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--lila-transparent);
}

.remove {
  background: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.remove svg {
  stroke: var(--lila);
  transition: transform 0.2s ease-in-out;
}

.remove svg:hover {
  stroke: var(--lila-accent);
  transform: scale(1.1);
}

/* === CART ACTIONS (buttons below cart) === */
.checkout-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  @media (min-width: 1024px) {
  grid-template-columns: 1fr 1fr;
  }
}
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
  @media (min-width: 1024px) {
    align-items: unset;
    flex-direction: row;
    justify-content: flex-start;
  }
}

/* Continue shopping */
.btn-cart {
  background-color: var(--lila-accent) !important;
  color: #fff;
  height: fit-content;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* === CART SUMMARY === */
.checkout {
  background-color: var(--brown);
  color: var(--white);
  padding: 2rem;
  font-size: 1rem;
  font-weight: 700;
}

.checkout:empty {
  display: none;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
}

.checkout-item + hr {
  border: none;
  height: 2px;
  background: var(--lila-accent);
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1rem 0;
}

.checkout button {
  text-transform: uppercase;
  font-size: 1rem;
}

/* Checkout button */
.btn-checkout {
  text-align: center;
  display: block;
  padding: 0.5rem 3rem;
  margin-top: 2rem;
  font-weight: 600;
  border: none;
}
