.products {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  min-height: 520px;
  padding: 0 22px 20px;
}

.product-banner {
  display: block;
  width: calc(100% + 44px);
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  margin: 0 -22px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, #172334);
  position: relative;
  z-index: 1;
}

.badge {
  right: 14px;
  top: 14px;
  border-radius: 7px;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

.product-card .badge + .card-top {
  margin-top: 0;
}

.faction-card {
  grid-column: 1 / -1;
  min-height: 0;
}

.faction-card .product-banner {
  aspect-ratio: 6 / 1;
}

.faction-card ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

@media (max-width: 760px) {
  .products {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 0;
  }

  .faction-card {
    grid-column: auto;
  }

  .faction-card .product-banner {
    aspect-ratio: 3 / 1;
    object-fit: cover;
    object-position: left center;
  }

  .faction-card ul {
    grid-template-columns: 1fr;
  }
}

/* Custom storefront icons */
.cart-button {
  color: #fff;
  border-color: rgba(255, 255, 255, .76);
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 8px 24px rgba(0, 0, 0, .24);
}

.cart-button:hover {
  background: #fff;
  color: #06101c;
  border-color: #fff;
}

.cart-symbol,
.drawer-cart-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.cart-symbol img,
.drawer-cart-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(1);
}

.filter .category-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.filter[data-filter="all"] .category-icon {
  width: 23px;
  height: 23px;
}

.filter[data-filter="faccao"] .category-icon {
  width: 25px;
  height: 25px;
}

.shield-icon {
  padding: 6px;
}

.shield-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(1);
}

.product-card li::before {
  content: "";
  width: 14px;
  height: 14px;
  top: .12em;
  background: url("icons/aprovado.png") center / contain no-repeat;
}

.toast-check {
  background: transparent;
  width: 31px;
  height: 31px;
}

.toast-check img,
.success-check img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.success-check {
  background: transparent;
  overflow: visible;
}

/* Centered cart checkout, inspired by the supplied reference */
.drawer-backdrop {
  background: rgba(0, 3, 10, .82);
  backdrop-filter: blur(7px);
}

.cart-drawer {
  left: 50%;
  right: auto;
  top: 50%;
  width: min(580px, calc(100% - 28px));
  height: auto;
  max-height: min(720px, calc(100vh - 32px));
  border: 1px solid #26364b;
  border-radius: 20px;
  background: #0b111d;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .72), 0 0 50px rgba(0, 148, 255, .08);
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: transform .24s ease, opacity .2s ease;
}

.cart-drawer.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.drawer-head {
  padding: 21px 24px;
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.drawer-cart-icon {
  width: 23px;
  height: 23px;
}

.drawer-cart-icon img {
  filter: invert(64%) sepia(94%) saturate(2800%) hue-rotate(158deg) brightness(106%);
}

.drawer-head h2 {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.16rem;
  line-height: 1;
  text-transform: none;
}

.drawer-head button {
  border: 0;
  background: transparent;
  color: #8290a4;
  font-weight: 700;
}

.drawer-head button:hover {
  color: #fff;
}

.cart-items {
  flex: none;
  max-height: 390px;
  padding: 16px;
}

.empty-cart {
  margin: 44px auto;
}

.cart-item {
  grid-template-columns: 52px minmax(0, 1fr) auto 28px;
  gap: 13px;
  padding: 13px;
  margin-bottom: 10px;
  border: 1px solid #273347;
  border-radius: 13px;
  background: #151c28;
}

.cart-item:last-child {
  margin-bottom: 0;
}

.cart-item-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #087cff, #06d8f5);
  color: #00131d;
  box-shadow: 0 6px 18px rgba(0, 149, 255, .22);
}

.cart-item-copy {
  min-width: 0;
}

.cart-item-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-copy small {
  display: block;
  margin-top: 4px;
  color: var(--cyan);
  font-weight: 800;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 7px;
}

.qty-button,
.qty-value {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.qty-button {
  border: 0;
  background: #2b3342;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.qty-button:hover {
  background: #087fff;
}

.qty-value {
  border: 1px solid #3a4557;
  background: #111722;
  font-size: .8rem;
  font-weight: 800;
}

.remove-item {
  font-size: 1.35rem;
  line-height: 1;
}

.cart-footer {
  padding: 20px 24px 22px;
  background: #0d131f;
}

.total {
  align-items: end;
  margin-bottom: 15px;
}

.total strong {
  font-size: 1.45rem;
}

.checkout-button {
  min-height: 48px;
  text-transform: none;
  font-size: .86rem;
}

.checkout-button span {
  margin-left: 7px;
  font-size: 1.1rem;
}

.secondary-checkout-button {
  width: 100%;
  min-height: 43px;
  margin-top: 10px;
  border: 1px solid #334056;
  border-radius: 9px;
  background: transparent;
  color: #e9eef7;
  font-weight: 800;
  cursor: pointer;
}

.secondary-checkout-button:hover {
  border-color: #708099;
  background: rgba(255, 255, 255, .04);
}

@media (max-width: 580px) {
  .cart-drawer {
    max-height: calc(100vh - 20px);
  }

  .drawer-head,
  .cart-footer {
    padding-inline: 16px;
  }

  .cart-item {
    grid-template-columns: 45px minmax(0, 1fr) 24px;
  }

  .cart-item-icon {
    width: 45px;
    height: 45px;
  }

  .quantity-control {
    grid-column: 2 / 4;
    justify-content: flex-end;
  }

  .remove-item {
    grid-column: 3;
    grid-row: 1;
  }
}
