.cart-page {
  width: min(1320px, 100% - 1.5rem);
  margin: 1.25rem auto 2.5rem;
  display: grid;
  gap: 1rem;
}

.cart-hero,
.cart-body,
.cart-empty {
  border: 1px solid #2a2f42;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(16, 23, 44, 0.95), rgba(8, 12, 24, 0.95));
}

.cart-hero {
  padding: 1rem 1.1rem;
}

.cart-hero__kicker {
  margin: 0;
  font-family: var(--title-font);
  letter-spacing: 0.06em;
  color: #ffb169;
  font-size: 1.15rem;
}

.cart-hero__title {
  margin: 0.2rem 0 0;
  font-family: var(--title-font);
  letter-spacing: 0.05em;
  color: #f7f1df;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.cart-hero__text {
  margin: 0.35rem 0 0;
  color: #c2cee8;
}

.cart-body {
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.cart-main,
.cart-summary {
  border: 1px solid #2f3651;
  border-radius: 12px;
  background: rgba(10, 15, 32, 0.88);
}

.cart-main {
  padding: 0.9rem;
  display: grid;
  gap: 0.85rem;
}

.cart-main__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.cart-main__title {
  margin: 0;
  font-family: var(--title-font);
  letter-spacing: 0.04em;
  color: #f6efe0;
  font-size: 1.7rem;
}

.cart-main__count {
  color: #ffc58c;
  font-weight: 700;
  font-size: 0.96rem;
}

.cart-feedback {
  min-height: 1.25rem;
  margin: 0;
  color: #ffc58c;
}

.cart-lines {
  display: grid;
  gap: 0.75rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(250px, 0.85fr);
  gap: 0.8rem;
  padding: 0.7rem;
  border: 1px solid #2f3651;
  border-radius: 10px;
  background: rgba(14, 21, 43, 0.95);
}

.cart-item.is-unavailable {
  border-color: #6e4b4b;
  background: rgba(30, 18, 24, 0.9);
}

.cart-item__media {
  width: 100%;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #344063;
}

.cart-item__body {
  display: grid;
  align-content: start;
  gap: 0.3rem;
}

.cart-item__name {
  margin: 0;
  font-size: 1.1rem;
  color: #f5efe1;
}

.cart-item__meta {
  margin: 0;
  color: #c2cee8;
  font-size: 0.92rem;
}

.cart-item__status {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.cart-item__status.is-available {
  color: #87d59a;
}

.cart-item__status.is-unavailable {
  color: #ffaba8;
}

.cart-item__controls {
  display: grid;
  gap: 0.35rem;
  align-content: center;
  justify-items: end;
}

.cart-item__unit,
.cart-item__total {
  margin: 0;
  color: #f5efe1;
  font-weight: 700;
}

.cart-item__total {
  color: #ffc58c;
}

.cart-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cart-item__qty-btn,
.cart-item__remove {
  border: 1px solid #3a4365;
  border-radius: 8px;
  background: #151e3c;
  color: #f7f1df;
  cursor: pointer;
}

.cart-item__qty-btn {
  width: 2rem;
  height: 2rem;
}

.cart-item__qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-item__qty-input {
  width: 3.6rem;
  height: 2rem;
  border: 1px solid #3a4365;
  border-radius: 8px;
  background: #0d1530;
  color: #f8f3e6;
  text-align: center;
}

.cart-item__remove {
  min-height: 2rem;
  padding: 0 0.65rem;
}

.cart-main__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.cart-main__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.cart-link,
.cart-clear-btn {
  border: 1px solid #3b4361;
  border-radius: 8px;
  min-height: 2.2rem;
  padding: 0 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-link {
  color: #f8f3e6;
}

.cart-clear-btn {
  background: #1a213f;
  color: #ffd8d8;
  cursor: pointer;
}

.cart-summary {
  padding: 0.9rem;
  display: grid;
  gap: 0.75rem;
  position: sticky;
  top: 95px;
}

.cart-summary__title {
  margin: 0;
  font-family: var(--title-font);
  letter-spacing: 0.04em;
  color: #f6efe0;
  font-size: 1.6rem;
}

.cart-summary__country label {
  display: block;
  color: #bfcced;
  margin-bottom: 0.25rem;
}

.cart-summary__country select,
.cart-summary__address select {
  width: 100%;
  min-height: 2.4rem;
  border: 1px solid #394264;
  border-radius: 8px;
  background: #0f1734;
  color: #f8f3e6;
  padding: 0 0.6rem;
}

.cart-summary__address {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid #2f3651;
  border-radius: 10px;
  background: rgba(14, 21, 43, 0.72);
}

.cart-summary__address label {
  display: block;
  color: #bfcced;
}

.cart-summary__address-note {
  margin: 0;
  color: #aebee6;
  font-size: 0.9rem;
}

.cart-link--small {
  justify-self: start;
  min-height: 2rem;
  padding-inline: 0.7rem;
  font-size: 0.92rem;
}

.cart-summary__request label {
  display: block;
  color: #bfcced;
  margin-bottom: 0.25rem;
}

.cart-summary__request textarea {
  width: 100%;
  border: 1px solid #394264;
  border-radius: 8px;
  background: #0f1734;
  color: #f8f3e6;
  padding: 0.55rem 0.6rem;
  resize: vertical;
  min-height: 86px;
}

.cart-summary__rows {
  display: grid;
  gap: 0.4rem;
}

.cart-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: #c8d5f1;
}

.cart-summary__row--total {
  margin-top: 0.15rem;
  border-top: 1px solid #2f3651;
  padding-top: 0.45rem;
  color: #fff1d8;
  font-weight: 700;
}

.cart-summary__note {
  margin: 0;
  color: #aebee6;
  font-size: 0.9rem;
}

.cart-checkout-btn {
  min-height: 2.45rem;
  border: 1px solid #ff9e47;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff9f43, #ff7f1f);
  color: #11131a;
  font-weight: 800;
  cursor: pointer;
}

.cart-checkout-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.cart-empty {
  padding: 1.4rem;
  display: grid;
  gap: 0.6rem;
}

.cart-empty h2 {
  margin: 0;
  font-family: var(--title-font);
  letter-spacing: 0.04em;
  color: #f6efe0;
  font-size: 1.8rem;
}

.cart-empty p {
  margin: 0;
  color: #bfd0f1;
}

.cart-empty__actions {
  margin-top: 0.2rem;
  display: inline-flex;
  gap: 0.5rem;
}

@media (max-width: 1150px) {
  .cart-body {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 760px) {
  .cart-page {
    width: min(1320px, 100% - 1rem);
    margin-top: 0.8rem;
  }

  .cart-body,
  .cart-main,
  .cart-summary,
  .cart-empty,
  .cart-hero {
    padding: 0.7rem;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-item__media {
    height: 170px;
  }

  .cart-item__controls {
    justify-items: start;
  }
}
