/* ===== Cart Sidebar ===== */
.cart-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  background: #f5f5f5;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}
.cart-sidebar.active {
  transform: translateX(0);
}

/* Header */
.cart-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  background: #f5f5f5;
}
.cart-sidebar__title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 0;
}
.cart-sidebar__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Labels */
.cart-sidebar__labels {
  display: flex;
  justify-content: space-between;
  padding: 0 20px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e0e0e0;
}

/* Items list */
.cart-sidebar__items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cart-sidebar__items::-webkit-scrollbar {
  width: 4px;
}
.cart-sidebar__items::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

/* Single item */
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f5f5f5;
}
.cart-item__image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #eee;
}
.cart-item__info {
  flex: 1;
  min-width: 0;
}
.cart-item__name {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
  margin: 0 0 4px;
}
.cart-item__color {
  font-size: 13px;
  color: #555;
  margin: 0 0 10px;
}
.cart-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid #ccc;
  border-radius: 999px;
  padding: 4px 14px;
}
.cart-item__qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #333;
  line-height: 1;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item__qty-num {
  font-size: 15px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}
.cart-item__price {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Footer */
.cart-sidebar__footer {
  padding: 16px 20px 24px;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
}
.cart-sidebar__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.cart-sidebar__total-label {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}
.cart-sidebar__total-price {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}
.cart-sidebar__note {
  font-size: 12px;
  color: #777;
  margin: 0 0 12px;
}
.cart-sidebar__agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #555;
  margin-bottom: 16px;
  cursor: pointer;
  line-height: 1.5;
}
.cart-sidebar__agree input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.cart-sidebar__checkout {
  display: block;
  width: 100%;
  background: #e53935;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding: 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s;
}
.cart-sidebar__checkout:hover {
  background: #c62828;
  color: #fff;
}

/* Empty state */
.cart-sidebar__empty {
  text-align: center;
  color: #aaa;
  font-size: 14px;
  padding: 40px 0;
}
