#main.container {
  --content-width: 1500px;
  width: min(1500px, calc(100% - 2rem));
  max-width: 1500px;
}

.cart-page {
  margin: 1.25rem 0 2.5rem;
}

.cart-page .products-showcase-section--framed {
  margin-bottom: 0.5rem;
}

.cart-page .products-showcase-section__head {
  align-items: flex-start;
  text-align: left;
}

.cart-page .products-showcase-section__head .g26-section-heading {
  text-align: left;
  width: auto;
}

.cart-page .product-showcase__toolbar {
  margin: -58px 0 10.4px;
}

.cart-empty h1,
.cart-title {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 2vw, 2rem);
}

.cart-title__count {
  color: var(--muted);
  font-weight: 700;
}

.cart-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: clamp(0.8rem, 1.5vw, 1.25rem);
  align-items: start;
}

.cart-main {
  min-width: 0;
}

.cart-layout[hidden],
.cart-empty[hidden],
.cart-summary [hidden],
.cart-summary__row[hidden],
.cart-summary__hint[hidden],
.cart-summary__error[hidden],
.cart-line [hidden] {
  display: none !important;
}

.cart-list {
  padding: 0.35rem 0.5rem 0.5rem;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  padding: 0.75rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.cart-table td {
  padding: 0.9rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.cart-table tbody tr:last-child td {
  border-bottom: 0;
}

.cart-col-check { width: 2.4rem; }
.cart-col-remove { width: 3rem; text-align: right; }

.cart-select {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--brand-blue);
  cursor: pointer;
}

.cart-product__name {
  color: inherit;
  font-weight: 700;
}

.cart-product__name:hover { text-decoration: underline; }

.cart-line .stock-flag {
  display: inline-block;
  margin: 0.2rem 0 0;
}

.cart-line__price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  font-weight: 700;
  white-space: nowrap;
}

.cart-line__price .price-was {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-line__subtotal {
  font-weight: 800;
  white-space: nowrap;
}

.cart-line.is-aside .cart-product,
.cart-line.is-aside .cart-line__price,
.cart-line.is-aside .cart-line__subtotal,
.cart-line.is-aside .product-qty {
  opacity: 0.45;
}

.cart-page .product-qty {
  box-shadow: inset 0 0 0 1px var(--border);
}

.cart-remove {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.cart-remove svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-remove:hover {
  background: color-mix(in srgb, var(--brand-red) 12%, var(--surface));
  color: var(--brand-red);
}

.cart-summary {
  position: sticky;
  top: 5.5rem;
  min-width: 0;
  width: 100%;
  padding: clamp(0.85rem, 1.5vw, 1.2rem);
}

.cart-summary__toggle {
  display: none;
}

.cart-summary__dock-totals {
  display: none;
}

.cart-summary h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.25;
}

.cart-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.4rem 0;
  font-size: clamp(0.86rem, 1.05vw, 1rem);
}

.cart-summary__row strong {
  font-variant-numeric: tabular-nums;
}

.cart-summary__discount {
  color: var(--brand-red);
}

.cart-summary__discount strong {
  font-weight: 700;
}

.cart-summary__total {
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
}

.cart-summary__total strong {
  font-size: clamp(1.08rem, 1.4vw, 1.25rem);
}

.cart-summary__hint,
.cart-summary__error {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.cart-summary__hint { color: var(--muted); }

.cart-summary__error { color: var(--brand-red); }

.cart-summary__cta {
  width: 100%;
  margin-top: 0.9rem;
  min-height: clamp(2.45rem, 3.2vw, 2.85rem);
  padding-inline: 0.85rem;
  font-family: var(--font-button);
  font-size: clamp(0.86rem, 1.05vw, 1rem);
  font-weight: 700;
}

.cart-summary__cta[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 850px) {
  .cart-page {
    padding-bottom: 8.5rem;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 50;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.35rem 1rem 0.85rem;
    border-radius: 1.15rem 1.15rem 0 0;
    overflow: visible;
    box-shadow: 0 -10px 28px rgb(18 24 38 / 12%);
  }

  .cart-summary__toggle {
    display: grid;
    place-items: center;
    position: absolute;
    top: 0;
    left: 50%;
    width: 2.55rem;
    height: 1.35rem;
    padding: 0;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    background: var(--surface);
    color: var(--muted);
    transform: translate(-50%, -100%);
    cursor: pointer;
  }

  .cart-summary__toggle svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .cart-summary.is-open .cart-summary__toggle svg {
    transform: rotate(180deg);
  }

  .cart-summary__details {
    display: none;
    gap: 0.15rem;
    margin-bottom: 0.55rem;
  }

  .cart-summary.is-open .cart-summary__details {
    display: grid;
  }

  .cart-summary__details .cart-summary__total {
    display: none;
  }

  .cart-summary__dock-totals {
    display: grid;
    gap: 0.15rem;
    margin-bottom: 0.7rem;
  }

  .cart-summary__dock-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.95rem;
  }

  .cart-summary__dock-row strong {
    font-variant-numeric: tabular-nums;
  }

  .cart-summary__dock-was {
    color: var(--muted);
  }

  .cart-summary__dock-row.is-deal {
    color: var(--brand-red);
    font-weight: 700;
  }

  .cart-summary__cta {
    margin-top: 0;
    min-height: 2.75rem;
    font-size: 1rem;
  }
}

@media (max-width: 720px) {
  .cart-table thead { display: none; }

  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
  }

  .cart-table tr.cart-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "check product remove"
      "price price price"
      "qty subtotal subtotal";
    gap: 0.35rem 0.65rem;
    padding: 0.85rem 0.35rem;
    border-bottom: 1px solid var(--border);
  }

  .cart-table tbody tr:last-child { border-bottom: 0; }

  .cart-table td {
    padding: 0;
    border: 0;
  }

  .cart-col-check { grid-area: check; align-self: center; }
  .cart-line td:nth-child(2) { grid-area: product; }
  .cart-line__price { grid-area: price; flex-direction: row; align-items: baseline; gap: 0.45rem; }
  .cart-line td:nth-child(4) { grid-area: qty; }
  .cart-line__subtotal { grid-area: subtotal; justify-self: end; align-self: center; }
  .cart-col-remove { grid-area: remove; }
}
