.title {
  margin-block-end: 0;
}

.subtitle {
  font-size: 18px;
  font-weight: normal;
  max-width: 944px;
  margin-block-end: 2rem;
}

.cart-container {
  max-width: 1400px;
  padding-inline: 1rem;
  padding-block: 4rem;
  margin-inline: auto;
  isolation: isolate;
  position: relative;
  z-index: 9999;
}

.cart-item-list {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.cart-item {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 0.5rem !important;
  border: 1px solid #7379844d;
}

.cart-item__title {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.cart-item__image {
  display: block;
  width: 100%;
  object-fit: cover;
  border-top-left-radius: 0.5rem !important;
  border-top-right-radius: 0.5rem !important;
  aspect-ratio: 16 / 9;
}

.cart-item__content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-item__actions {
  display: flex;
  margin-block-start: auto;
  gap: 1rem;
}

.cart-item__button {
  cursor: pointer;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-basis: 40px;
  flex-shrink: 0;
  flex-grow: 0;
}

.cart-summary {
  padding: 1.5rem;
  background-color: #fff;
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 9999;
  height: 100%;
}

.cart-summary.is-open {
  display: flex;
}

.cart-summary__header {
  display: flex;
  justify-content: space-between;
}

.cart-summary__close-button {
  all: unset;
  display: grid;
  place-content: center;
  width: 48px;
  height: 48px;
  cursor: pointer;
}

.cart-summary__close-icon {
  width: 36px;
  height: 36px;
}

.cart-summary__total {
  font-weight: bold;
  margin-block-start: auto;
  margin-block-end: 0.75rem;
}

/***
  Simplecart styling
***/

[class$="_items"] {
  margin-block-end: 1.5rem;
  overflow-y: auto;
  border-block-start: 1px solid #7379844d;
  background: linear-gradient(white 30%, rgba(255, 255, 255, 0)) center top,
    linear-gradient(rgba(255, 255, 255, 0), white 70%) center bottom,
    radial-gradient(
        farthest-side at 50% 0,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0)
      )
      center top,
    radial-gradient(
        farthest-side at 50% 100%,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0)
      )
      center bottom;
  background-repeat: no-repeat;
  background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
  background-attachment: local, local, scroll, scroll;
}

[class$="_items"] .headerRow {
  display: none;
}

[class$="_items"] .itemRow + .itemRow {
  border-block-start: 1px solid #7379844d;
}

[class$="_items"] .item-name {
  grid-area: title;
  font-weight: bold;
}

[class$="_items"] .item-price {
  white-space: nowrap;
  grid-area: price;
  width: fit-content;
}

[class$="_items"] .item-price::after {
  content: " x";
}

[class$="_items"] .item-remove {
  grid-area: delete;
  text-align: right;
}

[class$="_items"] .item-total {
  white-space: nowrap;
  grid-area: total;
}

[class$="_items"] .item-quantity {
  grid-area: quantity;
  width: fit-content;
}

[class$="_items"] .itemRow {
  display: grid;
  grid-template-areas:
    "title title title delete"
    "price quantity . total";
  grid-template-columns: auto auto 1fr auto;
  grid-template-rows: 1fr 1fr;
  padding-block: 0.5rem;
}

[class$="_checkout"] {
  width: 100%;
  padding-inline: 2.5rem;
  padding-block: 1rem;
  cursor: pointer;
  border-radius: 0.25rem;
  background-color: #bc955c;
  color: #fff;
  font-weight: bold;
}

.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;
}

.cart-mobile-button {
  all: unset;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background-color: #bc955c;
  z-index: 9999;
  border-radius: 0.25rem;
  color: #fff;
  fill: #fff;
  cursor: pointer;
  min-width: 180px;
}

@media (min-width: 1048px) {
  .cart-summary {
    position: sticky;
    top: 210px;
    max-height: 600px;
    border: 1px solid #7379844d;
    border-radius: 0.5rem;
    display: flex;
  }

  .cart-wrapper {
    display: grid;
    gap: 4rem;
    grid-template-columns: auto 360px;
    margin-block-start: 1rem;
  }

  .cart-summary__close-button,
  .cart-mobile-button {
    display: none;
  }
}

.js-open-cart-button.is-hidden {
  display: none;
}

body.cart-is-open {
  overflow: hidden;
}

body.cart-is-open #header {
  display: none;
}

body.admin-bar .cart-summary {
  margin-block-start: var(--admin-bar);
  height: calc(100% - var(--admin-bar));
}

@media (max-width: 600px) {
  body.admin-bar .cart-summary {
    --admin-bar: 46px;
  }
}

#main {
  isolation: isolate;
}
