.cart-page {
  background: var(--paper);
}

.cart-page-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.cart-page-heading {
  margin: 0 0 34px;
  text-align: center;
}

.cart-page-heading p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cart-page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
  gap: 50px;
  align-items: start;
}

.cart-items-section {
  min-width: 0;
}

.cart-selection-bar {
  min-height: 43px;
  border-top: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cart-select-control {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-select-control input,
.cart-item-select-control input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.cart-bulk-remove-button {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0 0 2px;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-bulk-remove-button:hover,
.cart-bulk-remove-button:focus-visible {
  color: var(--ink);
}

.cart-bulk-remove-button:disabled {
  color: #b9b9b9;
  cursor: not-allowed;
}

.cart-items-header {
  min-height: 43px;
  border-bottom: 1px solid #eaeaea;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 150px 110px;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-items-header span:first-child {
  grid-column: 2;
}

.cart-items-header span:nth-child(2) {
  grid-column: 3;
}

.cart-items-header span:last-child {
  grid-column: 4;
  text-align: right;
}

.cart-item {
  padding: 24px 0;
  border-bottom: 1px solid #eaeaea;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 150px 110px;
  align-items: center;
  gap: 24px;
  transition: opacity 160ms ease;
}

.cart-item.is-unselected {
  opacity: 0.58;
}

.cart-item-select-control {
  display: inline-grid;
  place-items: center;
}

.cart-product-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.cart-product-image {
  display: block;
  width: 100px;
  height: 100px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4f1ec;
}

.cart-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.cart-product-copy > a {
  display: inline-flex;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.cart-product-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.cart-remove-button {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0 0 2px;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-remove-button:hover,
.cart-remove-button:focus-visible {
  color: var(--ink);
}

.cart-quantity-cell {
  display: flex;
  justify-content: flex-start;
}

.cart-quantity-selector {
  height: 35px;
  border: 1px solid #eaeaea;
  display: inline-flex;
  align-items: center;
  background: var(--paper);
}

.cart-quantity-selector button {
  width: 30px;
  height: 33px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
}

.cart-quantity-selector input {
  width: 34px;
  height: 33px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.cart-line-total {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-align: right;
}

.order-summary-card {
  position: sticky;
  top: calc(var(--announcement-height) + var(--header-height) + 24px);
  max-height: calc(100vh - var(--announcement-height) - var(--header-height) - 48px);
  overflow: auto;
  background: #f9f9f9;
  padding: 30px;
}

.order-summary-card h2 {
  margin: 0 0 24px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.coupon-code-block {
  margin: 0 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #eaeaea;
}

.coupon-code-block label {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coupon-code-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.coupon-code-entry input {
  min-width: 0;
  height: 40px;
  border: 0;
  border-bottom: 1px solid #d8d8d8;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  outline: 0;
}

.coupon-code-entry input::placeholder {
  color: #9a9a9a;
}

.coupon-code-entry button {
  height: 40px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-row {
  margin-bottom: 15px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.summary-row span:first-child {
  color: var(--muted);
}

.summary-row span:last-child {
  text-align: right;
}

.summary-total {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eaeaea;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
}

.summary-total strong {
  font-size: 18px;
  font-weight: 600;
}

.checkout-button {
  width: 100%;
  height: 50px;
  margin-top: 20px;
  border: none;
  background: #121212;
  color: #ffffff;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.2s, background 0.2s;
}

.checkout-button:hover,
.checkout-button:focus-visible {
  background: #222222;
}

.checkout-button:disabled {
  background: #d4d4d4;
  color: #747474;
  cursor: not-allowed;
}

.empty-cart-state {
  display: none;
  padding: 24px 0 0;
}

.cart-page.is-empty .cart-filled-state {
  display: none;
}

.cart-page.is-empty .empty-cart-state {
  display: block;
}

.empty-cart-message {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  text-align: center;
}

.empty-cart-message h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
}

.empty-cart-message a {
  display: inline-flex;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-cart-best-sellers {
  padding: 34px 0 0;
}

.empty-cart-best-sellers h2 {
  margin: 0 0 28px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-align: center;
}

.empty-cart-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.cart-closing-banner {
  position: relative;
  width: 100vw;
  height: 400px;
  margin-top: 80px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffffff;
}

.cart-closing-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-closing-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.3);
}

.cart-closing-banner-content {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  padding: 0 24px;
}

.cart-closing-banner-tagline {
  margin: 0 0 15px;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cart-closing-banner h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.cart-closing-banner-copy {
  max-width: 520px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.cart-closing-banner-link {
  display: inline-flex;
  border-bottom: 1px solid #ffffff;
  padding-bottom: 5px;
  color: #ffffff;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.cart-closing-banner-link:hover,
.cart-closing-banner-link:focus-visible {
  border-bottom-color: rgba(255, 255, 255, 0.75);
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 900px) {
  .cart-layout {
    gap: 34px;
  }

  .cart-items-header,
  .cart-item {
    grid-template-columns: 24px minmax(0, 1fr) 128px 90px;
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .cart-page-container {
    margin: 30px auto;
  }

  .cart-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cart-items-section {
    min-width: 0;
  }

  .order-summary-card {
    order: 2;
    position: static;
    max-height: none;
    overflow: visible;
  }

  .cart-items-header {
    display: none;
  }

  .cart-item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  .cart-item-select-control {
    padding-top: 36px;
  }

  .cart-product-cell,
  .cart-quantity-cell,
  .cart-line-total {
    grid-column: 2;
  }

  .cart-product-cell {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 15px;
  }

  .cart-product-image {
    width: 92px;
    height: 92px;
  }

  .cart-quantity-cell {
    justify-content: flex-start;
  }

  .cart-line-total {
    text-align: left;
  }

  .order-summary-card {
    padding: 26px 22px;
  }

  .empty-cart-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 14px;
  }

  .cart-closing-banner {
    height: 320px;
  }

  .cart-closing-banner h2 {
    font-size: 24px;
  }

  .cart-closing-banner-copy {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .cart-page-container {
    padding: 0 16px;
  }

  .cart-page-heading h1 {
    font-size: 30px;
  }

  .cart-product-copy > a {
    font-size: 13px;
  }

  .empty-cart-message h2 {
    font-size: 24px;
  }
}
