.products {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-16);
  background-color: var(--y-color-fg);
  border-radius: var(--y-space-20);
  padding: var(--y-space-32) var(--y-space-20);
}
.products h3 {
  font-size: var(--y-space-32);
  font-weight: 700;
  color: var(--y-color-text);
}
.products .header {
  grid-template-columns: 2fr 1fr 1fr 1fr;
  display: grid;
  align-items: center;
  gap: var(--y-space-16);
  text-align: center;
}
.products .header p {
  font-size: var(--y-space-16);
  font-weight: 300;
  color: var(--y-color-text);
  text-align: center;
}
.products .product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--y-space-16);
}
.products .product-item {
  display: grid;
  grid-template-columns: 2fr 3fr;
  align-items: center;
  border-top: var(--y-border);
  padding-top: var(--y-space-16);
}
.products .product-item > * {
  justify-content: center;
}
.products .product-item .product {
  display: flex;
  align-items: center;
}
.products .product-item .product > button,
.products .product-item .product > a.remove {
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  display: inline-flex;
}
.products .product-item .product > button:hover,
.products .product-item .product > a.remove:hover {
  transform: scale(1.1);
  filter: brightness(0.5);
}
.products .product-item .product > button > img,
.products .product-item .product > a.remove > img {
  width: 24px;
  height: 24px;
}
/* Product image: fixed size for all, rounded corners, yellow/cream background */
.products .product-item .product > a:not(.remove) {
  display: block;
  width: 105px;
  height: 105px;
  border-radius: var(--y-space-20);
  background-color: var(--y-color-primary);
  margin: var(--y-space-6);
  overflow: hidden;
  flex-shrink: 0;
}
.products .product-item .product > a:not(.remove) img {
  width: 105px;
  height: 105px;
  object-fit: cover;
  display: block;
}
.products .product-item .product p {
  font-size: var(--y-space-16);
  font-weight: 700;
  color: var(--y-color-text);
}
.products .product-item .price,
.products .product-item .total {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--y-space-8);
}
.products .product-item .price p,
.products .product-item .total p {
  font-size: var(--y-space-16);
  font-weight: 700;
  color: var(--y-color-text);
}
.products .product-item .price img {
  width: 24px;
  height: 24px;
}

.products .product-item .others {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: var(--y-space-16);
}
.products .product-item .others .mobile {
  display: none;
}

@media (max-width: 480px) {
  .products .header {
    display: none;
  }
  .products .product-grid .product-item:first-child {
    border-top: none;
  }
  .products .product-item {
    grid-template-columns: auto 2fr;
    gap: var(--y-space-16);
  }
  .products .product-item .others {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
  }
  .products .product-item .total {
    order: 2;
  }
  .products .product-item .price {
    display: none;
  }
  .products .product-item .others .mobile {
    order: 1;
    display: block;
    width: 100%;
  }
  .products .product-item .product p {
    display: none;
  }
  .products .product-item .quantity {
    order: 3;
  }
}
@media (max-width: 330px) {
  .products .product-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}
