.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100dvh;
  background: #ffffff;
  box-shadow: -20px 0 50px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 120;
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.cart-drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 16px;
  border-bottom: 1px solid #e6edf5;
}

.cart-drawer-header h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  color: #0f172a;
  font-weight: 900;
}

.cart-progress-wrap {
  padding: 14px 20px 16px;
  border-bottom: 1px solid #edf2f7;
}

.cart-progress-text {
  font-size: 14px;
  line-height: 1.5;
  color: #5f6f85;
  margin-bottom: 10px;
}

.cart-progress-text strong {
  color: #244aa5;
}

.cart-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e7eef7;
  overflow: hidden;
}

.cart-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #4fa2dc, #2b78d0);
  transition: width 0.25s ease;
}

.cart-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
}

.cart-empty-state {
  text-align: center;
  padding: 34px 8px 10px;
}

.cart-empty-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: #f4f7fb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #244aa5;
  font-size: 28px;
}

.cart-empty-text {
  margin: 0 0 16px;
  color: #415168;
  font-size: 18px;
  line-height: 1.6;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #dce6f1;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.cart-item-image-wrap {
  width: 92px;
  height: 92px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  border: 1px solid #e5edf5;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.cart-item-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cart-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cart-item-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  color: #0f172a;
}

.cart-item-variant {
  margin: 4px 0 0;
  font-size: 14px;
  color: #66778d;
}

.cart-item-remove {
  width: 38px;
  height: 38px;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  background: #ffffff;
  color: #7a8da5;
  cursor: pointer;
  flex-shrink: 0;
}

.cart-item-remove:hover {
  color: #d14343;
  border-color: #efc9c9;
}

.cart-item-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e2ef;
  border-radius: 999px;
  overflow: hidden;
  background: #f9fbfd;
}

.cart-qty button {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 20px;
  cursor: pointer;
}

.cart-qty span {
  min-width: 34px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.cart-item-price-wrap {
  text-align: right;
}

.cart-item-old-price {
  display: block;
  font-size: 14px;
  color: #a4aebb;
  text-decoration: line-through;
  margin-bottom: 3px;
  font-weight: 700;
}

.cart-item-price {
  display: block;
  font-size: 20px;
  color: #244aa5;
  font-weight: 900;
  line-height: 1;
}

.cart-recommend-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #edf2f7;
}

.cart-recommend-section h3 {
  margin: 0 0 14px;
  font-size: 20px;
  color: #0f172a;
}

.cart-recommend-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-recommend-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dce6f1;
  border-radius: 18px;
  background: #fff;
}

.cart-recommend-item img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 12px;
  background: #f7faff;
  border: 1px solid #ebf1f7;
}

.cart-recommend-title {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.cart-recommend-price {
  font-size: 14px;
  color: #244aa5;
  font-weight: 800;
}

.cart-add-small {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #325fcb, #244aa5);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.cart-footer {
  border-top: 1px solid #e7edf5;
  padding: 18px 20px 20px;
  background: #ffffff;
}

.cart-discount-box {
  margin-bottom: 16px;
}

.cart-discount-box label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #47576d;
  margin-bottom: 8px;
}

.cart-discount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.cart-discount-row input {
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid #d6dfeb;
  padding: 0 14px;
  font-size: 15px;
}

.cart-discount-row button {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid #d6dfeb;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

.cart-discount-message {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #2f7f46;
}

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #48586d;
  font-size: 15px;
}

.cart-summary-row strong {
  color: #0f172a;
  font-size: 16px;
}

.cart-summary-discount strong {
  color: #2f7f46;
}

.cart-summary-total {
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid #edf2f7;
}

.cart-summary-total span,
.cart-summary-total strong {
  font-size: 19px;
  font-weight: 900;
  color: #0f172a;
}

.cart-action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-pill-btn {
  min-height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
  font-size: 17px;
}

.cart-muted-btn {
  background: #eef2f7;
  color: #0f172a;
}

.cart-outline-btn {
  background: #ffffff;
  border: 1px solid #d6dfeb;
  color: #0f172a;
}

.cart-primary-btn {
  background: linear-gradient(135deg, #244aa5, #1b3475);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(36, 74, 165, 0.2);
}

@media (max-width: 480px) {
  .cart-drawer {
    width: 100vw;
  }

  .cart-item-card {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .cart-item-image-wrap {
    width: 78px;
    height: 78px;
  }

  .cart-item-name {
    font-size: 16px;
  }

  .cart-item-price {
    font-size: 18px;
  }
}

.cart-drawer-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-drawer-title-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #367ec3, #2f60d5);
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 96, 213, 0.22);
  flex-shrink: 0;
}

.cart-drawer-title-icon i {
  font-size: 22px;
}

.cart-drawer-title-copy h2 {
  margin: 0;
}

.cart-drawer-title-copy p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.cart-empty-subtext {
  margin: 10px 0 18px;
  color: #64748b;
  line-height: 1.7;
  text-align: center;
}

.cart-outline-btn {
  border: 2px solid #cfd8e6;
  background: #fff;
  color: #0f172a;
}

.cart-outline-btn:hover {
  border-color: #367ec3;
  color: #367ec3;
}

.cart-muted-btn {
  background: #eaf1fb;
  color: #0f172a;
}

.cart-muted-btn:hover {
  background: #dbe8fb;
}

.cart-primary-btn {
  background: linear-gradient(135deg, #367ec3, #2f60d5);
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 96, 213, 0.2);
}

.cart-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(47, 96, 213, 0.24);
}

.cart-summary-total strong,
.cart-summary-total span {
  color: #0f172a;
}

.cart-discount-box {
  border: 1px solid #dbe4f0;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.cart-discount-box label {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-weight: 800;
}

.cart-discount-row input {
  border: 1px solid #d7dfeb;
  border-radius: 999px;
  min-height: 50px;
  padding: 0 16px;
}

.cart-discount-row button {
  border: none;
  border-radius: 999px;
  min-height: 50px;
  padding: 0 20px;
  background: linear-gradient(135deg, #367ec3, #2f60d5);
  color: #fff;
  font-weight: 800;
}

.cart-progress-bar {
  background: #e8eef8;
}

.cart-progress-bar span {
  background: linear-gradient(135deg, #5aa9e6, #2f60d5);
}

@media (max-width: 640px) {
  .cart-drawer-title-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .cart-drawer-title-icon i {
    font-size: 20px;
  }

  .cart-drawer-title-copy p {
    font-size: 13px;
  }
}

.cart-discount-box {
  padding: 16px 16px 14px;
  border-radius: 20px;
}

.cart-discount-box label {
  margin-bottom: 10px;
  font-size: 16px;
}

.cart-discount-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
  align-items: center;
}

.cart-discount-row input {
  min-height: 52px;
}

.cart-discount-row button {
  min-height: 52px;
}

@media (max-width: 640px) {
  .cart-discount-box {
    padding: 14px;
  }

  .cart-discount-row {
    grid-template-columns: 1fr 96px;
    gap: 10px;
  }

  .cart-discount-row input,
  .cart-discount-row button {
    min-height: 48px;
  }
}
