.cart-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
}
.cart-modal-overlay.is-open { display: flex; }
.cart-modal {
  background: #fff;
  margin-top: 56px;
  margin-right: 12px;
  border-radius: 6px;
  width: min(520px, 95vw);
  max-height: calc(100vh - 80px);
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.cart-modal__header {
  background: #2E5590;
  color: #fff;
  padding: 10px 14px;
  font-size: 13px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
.cart-modal__close {
  background: transparent; color: #fff;
  border: 0; font-size: 20px; cursor: pointer;
  line-height: 1;
}
.cart-modal__body { padding: 12px 14px; overflow-y: auto; }
.cart-modal__empty {
  padding: 32px 12px; text-align: center;
  color: #9ca3af; font-size: 13px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.cart-table thead th {
  background: #f7f3e8;
  color: #6b5b3f;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid #e8dfc7;
  letter-spacing: .02em;
}
.cart-table tbody td {
  padding: 12px 4px;
  border-bottom: 1px dashed #eee;
  vertical-align: middle;
  text-align: center;
}
.cart-table tbody tr:last-child td { border-bottom: 0; }
.cart-table__no { width: 32px; color: #999; font-size: 12px; }
.cart-table__name {
  text-align: left; padding-left: 6px;
  font-weight: 600; color: #1f2937;
  white-space: normal; word-break: break-word;
}
.cart-table__qty { width: 92px; }
.cart-table__price { width: 72px; font-weight: 700; color: #1f2937; white-space: nowrap; }

.cart-modal__totals {
  background: #fafafa;
  padding: 12px 14px;
  border-top: 1px solid #eee;
  margin: 8px -14px -12px;
}
.cart-modal__totals-row {
  display: flex; justify-content: space-between;
  padding: 3px 0;
  font-size: 12px; color: #666;
}
.cart-modal__totals-row--grand {
  margin-top: 8px; padding-top: 10px;
  border-top: 1px solid #ddd;
  font-size: 16px; font-weight: 700;
  color: #1f2937;
}
.cart-modal__totals-row--grand span:last-child {
  color: #c33;
  font-size: 20px;
}

@media (max-width: 520px) {
  .cart-table { font-size: 12px; }
  .cart-table thead th { font-size: 11px; padding: 6px 2px; }
  .cart-table tbody td { padding: 10px 2px; }
  .cart-table__no { width: 24px; }
  .cart-table__qty { width: 60px; }
  .cart-table__price { width: 60px; font-size: 12px; }
}
