.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.popover {
  position: fixed;
  top: 80px;
  right: 1rem;
  width: 90%;
  max-width: 400px;
  background-color: var(--siphon);
  border: 2px solid var(--plum);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}

@media (min-width: 640px) {
  .popover {
    right: 2rem;
  }
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--plum);
}

.header h2 {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--ice);
  margin: 0;
}

.closeButton {
  background: none;
  border: none;
  color: var(--ice);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.2s;
}

.closeButton:hover {
  color: var(--sohoLights);
}

.emptyCart {
  padding: 3rem 1.5rem;
  text-align: center;
}

.emptyCart p {
  color: var(--purpleHaze);
  font-size: 1.5rem;
}

.items {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
}

.item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--hemocyanin);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.itemTop {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.itemImage {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--ice);
  flex-shrink: 0;
}

.itemDetails {
  flex: 1;
  min-width: 0;
}

.itemName {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ice);
  margin: 0 0 0.25rem 0;
  word-wrap: break-word;
}

.itemPrice {
  font-size: 1.1rem;
  color: var(--sohoLights);
  margin: 0;
}

.itemActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.removeButton {
  background: none;
  border: none;
  color: var(--purpleHaze);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  text-decoration: underline;
  transition: color 0.2s;
}

.removeButton:hover {
  color: var(--sohoLights);
}

.footer {
  padding: 1.5rem;
  border-top: 1px solid var(--plum);
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.6rem;
  color: var(--ice);
}

.totalPrice {
  font-weight: 500;
  font-size: 2rem;
  color: var(--sohoLights);
}

.popover .checkoutButton {
  padding: 1.2rem 1.5rem !important;
  font-size: 1.6rem !important;
}
