.cart-page {
  max-width: 1180px;
  margin: 48px auto 90px;
  padding: 0 24px;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1998;
  display: block;
  visibility: hidden;
  opacity: 0;
  background: rgba(6, 22, 51, 0.42);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.cart-overlay.active {
  visibility: visible;
  opacity: 1;
}

body > .cart {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1999;
  width: min(420px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1px 1fr 1px auto;
  padding: 22px;
  color: #061633;
  background: #ffffff;
  box-shadow: -24px 0 70px rgba(6, 22, 51, 0.18);
  transform: translateX(105%);
  transition: transform 0.26s ease;
}

body > .cart.active {
  transform: translateX(0);
}

body > .cart .cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  text-align: left;
}

body > .cart .cart-header h3 {
  margin: 0;
  color: #061633;
  font-size: 20px;
  letter-spacing: 0.03em;
}

body > .cart .close-cart {
  cursor: pointer;
  color: #061633;
  font-size: 20px;
}

body > .cart hr {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(9, 31, 77, 0.1);
}

body > .cart .cart-items {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 12px 2px;
}

body > .cart .cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  box-shadow: none;
}

body > .cart .cart-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

body > .cart .cart-info h4 {
  margin: 0 0 6px;
  color: #061633;
  font-size: 14px;
}

body > .cart .cart-price {
  color: #b41232;
  font-weight: 900;
}

body > .cart .cart-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

body > .cart .qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body > .cart .qty button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #061633;
  font-weight: 900;
}

body > .cart .remove {
  cursor: pointer;
  color: #b41232;
}

body > .cart .cart-footer {
  display: grid;
  gap: 14px;
}

body > .cart .subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #061633;
  font-weight: 900;
}

body > .cart .checkout-btn {
  min-height: 48px;
  margin-top: 0;
}

.cart-header {
  text-align: center;
  margin-bottom: 34px;
}

.cart-header h1 {
  margin: 14px 0 10px;
  color: #061633;
  font-size: 56px;
  line-height: 1;
}

.cart-header p {
  color: #465a7a;
  font-size: 17px;
}

.empty-cart {
  max-width: 620px;
  margin: 0 auto;
  padding: 42px;
  text-align: center;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(9, 31, 77, 0.08);
  box-shadow: 0 18px 55px rgba(9, 31, 77, 0.08);
}

.empty-cart h2 {
  margin: 0 0 10px;
  color: #061633;
  font-size: 34px;
}

.empty-cart p {
  color: #465a7a;
}

.empty-cart a,
.checkout-btn,
.continue-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  padding: 14px 20px;
  text-decoration: none;
  font-weight: 900;
}

.empty-cart a,
.checkout-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #123b8a, #b41232);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.cart-items {
  display: grid;
  gap: 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(9, 31, 77, 0.08);
  box-shadow: 0 18px 55px rgba(9, 31, 77, 0.07);
}

.cart-item-image {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: #f8faff;
}

.cart-item-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item-info h2 {
  margin: 0 0 8px;
  color: #061633;
  font-size: 24px;
  text-transform: capitalize;
}

.cart-item-info p {
  margin: 0 0 10px;
  color: #465a7a;
}

.cart-item-info strong {
  color: #d71234;
  font-size: 22px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cart-item-actions button {
  border: 0;
  border-radius: 999px;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  color: #ffffff;
  background: #061633;
  font-weight: 900;
  cursor: pointer;
}

.cart-item-actions span {
  min-width: 26px;
  text-align: center;
  color: #061633;
  font-weight: 900;
}

.cart-item-actions .remove-btn {
  background: #d71234;
}

.cart-summary {
  position: sticky;
  top: 24px;
  padding: 26px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(9, 31, 77, 0.08);
  box-shadow: 0 18px 55px rgba(9, 31, 77, 0.08);
}

.cart-summary h2 {
  margin: 0 0 20px;
  color: #061633;
  font-size: 30px;
}

.summary-row,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(9, 31, 77, 0.08);
  color: #465a7a;
}

.summary-total {
  border-bottom: 0;
  color: #061633;
  font-size: 22px;
  font-weight: 900;
}

.checkout-btn,
.continue-btn {
  width: 100%;
  margin-top: 14px;
}

.continue-btn {
  color: #061633;
  background: #f8faff;
  border: 1px solid rgba(9, 31, 77, 0.1);
}

@media (max-width: 900px) {
  .cart-layout,
  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-item-image {
    width: 100%;
    height: 220px;
  }

  .cart-item-actions {
    flex-wrap: wrap;
  }
}
